为什么如此简单的一个策略,我自己搞的策略比它好的没几个? var Bar: integer; for Bar := 21 to BarCount() - 1 do begin if LastPositionActive() then SellAtStop( Bar + 1, Lowest( Bar, #Low, 20 ), LastPosition(), '' ) else BuyAtStop( Bar + 1, Highest( Bar, #High, 20 ), '' ); end;
也和你截取测试的时间段有关的。 对于一个趋势系统来说,如果你选择的测试起点和终点正好处于震荡期,那收益的回落会很大的,而选择的测试起点和终点正好处于趋势阶段,那收益会很可观,所谓“适应性” 反之,对一个非趋势系统来说也有类似的情况的。 所以测试结果还是需要进行人工分析的。
var Bar: integer; for Bar := 21 to BarCount() - 1 do begin if LastPositionActive() then SellAtStop( Bar + 1, Lowest( Bar, #Low, 20 ), LastPosition(), '' ) else BuyAtStop( Bar + 1, Highest( Bar, #High, 20 ), '' ); end; 这个是什么语言?