您现在的位置:程序化交易>> 期货公式>> 交易开拓者(TB)>> 开拓者公式>>正文内容

开拓者TB 夹板震荡系统 源码[开拓者公式]

开拓者TB《期市截拳道夹板震荡系统》源码:

 

Params


Numeric
today(20090419)


Numeric
endTime(150000)

Numeric
interval(30)

Numeric
outStep(50)

Vars


Numeric
tem:

Numeric
needPosition(0):

NumericSeries
upLine(0)

NumericSeries
downLine(0)

NumericSeries
wantStopLong(0)

NumericSeries
wantStopShort(0)

Begin


if(Date!=today)

{return;}


if(date!=date[1]||CurrentBar==0)

{upLine=close+interval;

downLine=close-interval;

wantStopShort=upLine+outStep;

wantStopLong=downLine-outStep;

}Else

{upLine=upLine[1];


downLine=downLine[1];


wantStopShort=wantStopShort[1];

wantStopLong= wantStopLong[1];}

if(NumLosTrades==0)

{tem=0C4TwoLine3(MarketPosition(),downline,upline,wantStopLong,wantStopShort,90000,endTime,needPosition;}

Commentary(“upLine:”+Text(upLine));

Commentary(“downLine:”+Text(downLine));

Commentary(“wantStopShort:”+Text(wantStopShort));

Commentary(“wantStopLong:”+Text(wantStopLong));

Commentary(“tem1:”+Text(tem));

Commentary(“needPosition:”+Text(needPosition)):

if(tem==0)

{return;}

if(MarketPosition==0)

{if(needPosition>0)

{buy(1,close);}Else

{SellShort(1,close);}

return;}

if(MarketPosition>0)

{if(needPosition<0)

{SellShort(1,close);}Else

{Sell(1,close);}

return;}

if(MarketPosition<0)

{if(needPosition>0)

{buy(1,close);}Else

{BuyToCover(1,close);}}

End

 

 

 

有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友

可联系技术人员 QQ: 262069696  点击在线交流进行 有偿 编写!不贵!点击查看价格!

 


【字体: 】【打印文章】【查看评论

相关文章

    没有相关内容