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


金字塔客服中心 - 专业程序化交易软件提供商金字塔软件公式模型编写问题提交 → 当日平掉仓单以后,不再开反向仓单怎么写全局变量

   

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


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

主题:当日平掉仓单以后,不再开反向仓单怎么写全局变量

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


加好友 发短信
等级:论坛游侠 帖子:120 积分:0 威望:0 精华:0 注册:2013/8/7 11:03:57
  发帖心情 Post By:2014/1/30 9:53:04    Post IP:182.37.83.249[只看该作者]

Variable:a=0;
Variable:b=0;


BIAS60 : -(MA(C,60)-C);
bias10:(ma(c,10)- c);
MA10:=MA(C,10);
MA60:=MA(C,60);

BIAS2 : =AVGENTERPRICE-MA60;

 
W1:=-100*(HHV(H,32)-C)/(HHV(H,32)-LLV(L,32))+48;
T1:=TIME>=094000 AND TIME<143500;
T2:=TIME>=15050;
con1:= W1>45  and REF(ANY(W1>45,9),1) AND T1  and a=0 and holding=0 

con2:= W1<-45  and REF(ANY(W1<-45,9),1) AND T1  and b=0 and holding=0  

Con3:= HHV(H,5)>1.0094*C;
Con4:=C>1.0094*LLV(L,5)
con5:=REF(ANY(bias60>40,15),1);
con6:=REF(ANY(bias60<-40,15),1);
con7:=BIAS2>32 AND enterbars<=5 and cross(ma10,c)
con8:=BIAS2<-32 AND enterbars<=5 and cross(c,ma10)
con9:=REF(ANY(bias60>28,24),1);
con10:=REF(ANY(bias60<-28,24),1);
con11:=C<REF(LLV(C,12),1)
con12:=C>REF(HHV(C,12),1)
con13:=C<MA10
con14:=C>MA10
con15:=bias60<0
con16:= bias60>0


Input:tq(3,1,60,1);
abb:=(time0-timetot0(dynainfo(207))<=tq) or not(islastbar);
if abb then begin

if con1 then begin
 sellshort(holding<0, 0, market);
 buy(1 ,1, market);
 
 end
 
 if con5 then begin
 if con13 then begin sell(holding>0, 0, market);
 end
 end
 
  if con9 then begin
 if con11 then begin sell(holding>0, 0, market);
 end
 end
 
If  con3 OR con7 OR T2 or con15 or w1<0 then sell(holding>0, 0, market);

if con2 then begin
 sell(holding>0, 0, MARKET);
 buyshort(1 , 1,market);

 end
 
 if con6  then begin
 if con14 then begin sellshort(holding<0, 0, market);
 end
 end
 
 
 if con10  then begin
 if con12 then begin sellshort(holding<0, 0, market);
 end
 end
 
if con4 OR con8 OR T2 or con16 or w1>0  then sellshort(holding<0, 0, market);

 

if L<ref(LLv(L,todaybar),1)-5*mindiff  and holding>0 then begin sell(1,0,market);
a:=1;
end

if H>ref(hhv(h,todaybar),1)+5*MINDIFF  and holding<0 then begin sellshort(1,0,market);
b:=1;
end


if time>=150000 then a:=0;
if time>=150000 then b:=0;部分代码,如果加上上边的变量会没有信号

[此贴子已经被作者于2014/1/30 9:54:10编辑过]

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