开拓者适用5分钟15分钟股指回调开仓模型源码表现不错
//---------------------------------------
//名称:回调开仓模型
////-----------------------------------------
Params
Numeric lenth(10);
Numeric Lots(1);
Numeric ExitOnCloseMins(15.10);
Vars
Numeric H1;
Numeric H2;
Numeric H3;
Numeric L1;
Numeric L2;
Numeric L3;
Numeric HH;
Numeric LL;
Numeric Stopline;
Numeric C1;
Numeric C2;
Numeric C3;
Begin
H1=H[1];
H2=H[2];
H3=H[3];
L1=L[1];
L2=L[2];
L3=L[3];
HH=Highest(High[1],Lenth);
LL=Lowest(Low[1],lenth);
If(H1H3 H1>H3 High>=H2 MarketPosition!=1)
{
Buy(Lots,Max(Open,H2));
Return;
}
If(L1>L2 L20)Sell(Lots,Min(Open,LL));
If(MarketPosition==-1 H>=HH BarsSinceEntry>0)BuyToCover(Lots,Max(Open,HH));
If(Time >=ExitOnCloseMins/100)
{
Sell(0,Open);
BuyToCover(0,Open);
}
End