用于股指期货的突破交易策略源码及解析[金字塔模型]
- 源码内容:
 input:n1(32,6,50,1); W1:=-100*(HHV(H,N1)-C)/(HHV(H,N1)-LLV(L,N1))+50; 
 T1:=TIME>093000 AND TIME<143500;
 T2:=TIME>150500;if W1>45 AND REF(ANY(W1>45,9),1) then begin 
 sellshort(holding<0, 0, thisclose);
 buy(holding=0 AND T1, 1, thisclose);
 endif HHV(H,5)>1.0094*C OR T2 then sell(holding>0, 0, thisclose); if W1<-45 AND REF(ANY(W1<-45,9),1) then begin 
 sell(holding>0, 0, thisclose);
 buyshort(holding=0 AND T1, 1, thisclose);
 endif C>1.0094*LLV(L,5) OR T2 then sellshort(holding<0, 0, thisclose); 
- 源码解析:
		input:n1(32,6,50,1);//参数n1,默认值为32 W1:=-100*(HHV(H,N1)-C)/(HHV(H,N1)-LLV(L,N1))+50;//定义w1 
 T1:=TIME>093000 AND TIME<143500;//时间段1,下单时间T2:=TIME>150500;//时间段2,强平时间 if W1>45 AND REF(ANY(W1>45,9),1) then begin//满足w1>45和 前9个周期中任意一个周期满足w1>45 则平空开多 
 sellshort(holding<0, 0, thisclose);
 buy(holding=0 AND T1, 1, thisclose);//开多还需要在T1时间内
 endif HHV(H,5)>1.0094*C OR T2 then sell(holding>0, 0, thisclose);//5周期最高价> 收盘价*1.0094 或者 T1时间时,平仓 if W1<-45 AND REF(ANY(W1<-45,9),1) then begin//满足w1<-45 和 前9个周期中任意一个周期满足w2<-45,则平多开空 
 sell(holding>0, 0, thisclose);
 buyshort(holding=0 AND T1, 1, thisclose);//开空还要在T1时间内
 endif C>1.0094*LLV(L,5) OR T2 then sellshort(holding<0, 0, thisclose);//收盘价>5周期最低价*1.0094 或者在T2时间时,平空 
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 262069696  进行 有偿 编写!(不贵!点击查看价格!)
                    
相关文章
- 
                        没有相关内容
                       

 
                     会员登录/注册
会员登录/注册