開拓者超級好用的股指日內(nèi)模型源碼
作者:開拓者 TB 來源:cxh99.com 發(fā)布時間:2013年04月12日
- 開拓者超級好用的股指日內(nèi)模型源碼: 股指指數(shù)1分鐘
來源 http://www.tumamayizhan.com/2013/04/12/12119.shtml 轉(zhuǎn)載請保留出處
Params
Numeric M(25);
Numeric LOTS(1);
Vars
Numeric offset;
Numeric offset1;
NumericSeries MA1;
NumericSeries MA2;
Numeric spread;
Numeric OPENP;
Begin
offset = MinMove()*PriceScale();
spread=Max(HighD(1)-CloseD(1),CloseD(1)-LowD(1));
OPENP=OpenD(0);
MA1=OPENP+0.01*M*spread;
MA2=OPENP-0.01*M*spread;
if(Time>0.0915 && Time<=0.1450)
{
If(l[1]<MA2 )
{
SellShort(LOTS,ma2-offset);
}//程序化交易 www.tumamayizhan.com
If(h[1]>ma1 )
{
Buy(LOTS,ma1+offset);
}}
if(Time*100>=15.12 and Time<0.1600)
{
if(marketposition==-1)
{
BuyToCover(0,Open+offset);
PlotString("Vol","平12",Low,blue);
Return;// 來源:www.tumamayizhan.com
}
if(marketposition==1)
{
Sell(0,Open-offset);
PlotString("Vol","平11",high,Red);
Return;
}}
End