oliverzrl 的 Dynamic Break Out II 策略 是不是有未来函数 [开拓者 TB]
- 咨询内容:
Numeric ceilingAmt(60);
Numeric floorAmt(20);
Numeric bolBandTrig(2.00);
Vars
Numeric lookBackDays(20);
Numeric todayVolatility(0);
Numeric yesterDayVolatility(0);
Numeric deltaVolatility(0);
NumericSeries buyPoint(0);
NumericSeries sellPoint(0);
NumericSeries longLiqPoint(0);
NumericSeries shortLiqPoint(0);
Numeric upBand(0);
Numeric dnBand(0);
Numeric MidLine(0);
Numeric Band(0);
Begin
todayVolatility = StandardDev(Close,30,1);
yesterDayVolatility = StandardDev(Close[1],30,1);
deltaVolatility = (todayVolatility - yesterDayVolatility)/todayVolatility;
lookBackDays = lookBackDays * (1 + deltaVolatility);
lookBackDays = Round(lookBackDays,0);
lookBackDays = Min(lookBackDays,ceilingAmt);
lookBackDays = Max(lookBackDays,floorAmt);
MidLine = AverageFC(Close,lookBackDays);
Band = StandardDev(Close,lookBackDays,bolBandTrig);
upBand = MidLine + bolBandTrig * Band;
dnBand = MidLine - bolBandTrig * Band;
buyPoint = Highest(High[1],lookBackDays);
sellPoint = Lowest(Low[1],lookBackDays);
longLiqPoint = Average(Close[1],lookBackDays);
shortLiqPoint = Average(Close[1],lookBackDays);
if(Close > upBand)
{
If(CrossOver(high,buyPoint))
{
Buy(1,max( buyPoint, Low ));
}
Commentary("多头触发价:"+Text(buyPoint));
}
if(Close < dnBand)
{
If(CrossUnder(Low,sellPoint ))
{
SellShort(1,min( sellPoint , High ));
}
Commentary("空头触发价:"+Text(sellPoint));
}
if(MarketPosition == 1)
{
If(CrossUnder(Low,longLiqPoint ))
{
Sell(1,min( longLiqPoint , High ));
}
Commentary("多头退出:"+Text(longLiqPoint));
}
if(MarketPosition == -1)
{
If(CrossOver(high,shortLiqPoint))
{
BuyToCover(1,max( shortLiqPoint, Low ));
}
Commentary("多头退出:"+Text(shortLiqPoint));
}
End - TB技术人员:
哪位高手 帮忙翻译一下
- TB客服:
看下来感觉是一个类似于布林带突破的趋势系统,然后加了移动平均线止损。
- 网友回复:
学习了,谢谢分享
- 网友回复:
哪来的策略,确实含有未来函数,todayVolatility = StandardDev(Close,30,1);
有思路,想编写各种指标公式,程序化交易模型,选股公式,预警公式的朋友
可联系技术人员 QQ: 1145508240 进行 有偿 编写!(不贵!点击查看价格!)
相关文章
-
没有相关内容