【发布时间】:2018-02-26 19:43:44
【问题描述】:
下面的脚本将触发策略的开盘部分,收盘后的柱。如何更改变量“关闭”,以便在 SMA 14 和 28 交叉点的确切点而不是之后的柱上测试策略?或者那不可能
longCondition = crossover(sma(close, 14), sma(close, 28))
if (longCondition)
strategy.entry("My Long Entry Id", strategy.long)
shortCondition = crossunder(sma(close, 14), sma(close, 28))
if (shortCondition)
strategy.entry("My Short Entry Id", strategy.short)
【问题讨论】:
标签: variables back-testing pine-script