- 精华
- 0
- 在线时间
- 925 小时
- UID
- 4647
- 积分
- 1403
- 帖子
- 432
- 阅读权限
- 60
- 注册时间
- 2009-6-16
- 最后登录
- 2019-10-27
- 精华
- 0
- UID
- 4647
- 积分
- 1403
- 帖子
- 432
- 主题
- 31
- 阅读权限
- 60
- 注册时间
- 2009-6-16
- 最后登录
- 2019-10-27
|
我看的是《Building Winning Trading System with TradeStation》的第6章
与本帖有所不同,摘要如下:
。。。。。。
lookBackDays = MaxList(lookBackDays,floorAmt);
upBand = BollingerBand(Close,lookBackDays,+bolBandTrig);
dnBand = BollingerBand(Close,lookBackDays,-bolBandTrig);
buyPoint = Highest(High,lookBackDays);
sellPoint = Lowest(Low,lookBackDays);
longLiqPoint = Average(Close,lookBackDays);
shortLiqPoint = Average(Close,lookBackDays);
if(Close > upBand) then Buy("DBS-2 Buy") tomorrow at buyPoint stop;
if(Close < dnBand) then SellShort("DBS-2 Sell") tomorrow at sellPoint stop;
if(MarketPosition = 1) then Sell("LongLiq") tomorrow at longLiqPoint stop;
if(MarketPosition = -1) then BuyToCover("ShortLiq") tomorrow at shortLiqPoint
stop;
对照一下可以看出,开仓的处理是不同的。尤其是在下一根K线跳空时,原版是等待回调,这样就可能无法成交,而本帖的系统则做了一个两选一,确保以最高或最低价成交,这就有未来函数之嫌,实际上一根K线未结束时是无法确定最高或最低价的。 |
|