欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 模型下单问题,,

   

欢迎使用金字塔普通技术服务论坛,您可以在相关区域发表技术支持贴。
我司技术服务人员将优先处理 VIP客服论坛 服务贴,普通区问题处理速度慢,请耐心等待。谢谢您对我们的支持与理解。    


  共有3045人关注过本帖平板打印复制链接

主题:模型下单问题,,

帅哥哟,离线,有人找我吗?
muxia5568
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:论坛游侠 帖子:488 积分:0 威望:0 精华:0 注册:2015/3/11 12:14:43
模型下单问题,,  发帖心情 Post By:2015/12/18 10:20:54    Post IP:119.62.204.23[只看该作者]

请教老师;我的模型在程序化下单时,除了按模型设计的手数下单外,还自动下单一手,(操作周期15分钟)不知道是模型有问题还是是没问题?这是模型,请老师看看是什么问题;
VARIABLE:x=0,y=0;
MID:MA(CLOSE,26);
UPPER:MID + 2*STD(CLOSE,26),COLORMAGENTA;//上轨
LOWER:MID - 2*STD(CLOSE,26),COLORMAGENTA;//下轨

RSV:=(CLOSE-LLV(LOW,9))/(HHV(HIGH,9)-LLV(LOW,9))*100;
K:=SMA(RSV,3,1);
D:=SMA(K,3,1);
J:=3*K-2*D;

k30_min30:=stkindi('','kdj.k',0,4);
j30_min30:=stkindi('','kdj.j',0,4);
30sc:=cross(k30_min30,j30_min30);
30jc:=cross(j30_min30,k30_min30);

nn:=15;
jisl:=10;

hh:=hhv(h,enterbars+1);
ll:=llv(l,enterprice+1);



abb:=(timetot0(dynainfo(207))>=time0-5 and islastbar) or not(islastbar); 
if holding>0 and 30sc and abb then sell(1,1,thisclose);
if holding<0 and 30jc and abb then sellshort(1,1,thisclose);
if holding=0 and 30jc and abb then buy(1,1,thisclose);
if holding=0 and 30sc and abb then buyshort(1,1,thisclose);
 


if 30sc  then begin 
   平多A1:sell(holding>0,holding,market);
   开空A1: buyshort(holding=0,jisl,market);
   //n:=1;
end


if 30jc  then begin 
   平空B1:sellshort(1,0,market);  
   开多B1: buy(holding=0,jisl,market); 
   //m:=1;   
end


//止损
if enterprice-c>=3 then
平多:sell(holding>0,holding,market);
if c-enterprice>=3 then
平空:sellshort(holding<0,holding,market);


持仓:=holding,linethick0;
资产:=asset,noaxis;
//可用现金:=cash(0),linethick0;

谢谢

 回到顶部
总数 16 1 2 下一页