Tradingview 使用给定的开始日期测试策略

时间:2021-02-22 03:50:59

标签: pine-script

我想测试一个策略。但是,无论我如何拖动图表,测试的开始日期都不能早于2020 Sep 01。我想使用更早的数据进行测试。有没有办法为策略测试器选择日期范围?

我的脚本:

//@version=3
strategy("My Strategy", overlay=true)

longCondition = crossover(sma(close, 14), sma(close, 28))
if (longCondition)
    strategy.entry("My Long Entry Id", strategy.long)

plotshape(longCondition, color = blue)

shortCondition = crossunder(sma(close, 14), sma(close, 28))
if (shortCondition)
    strategy.entry("My Short Entry Id", strategy.short)

plotshape(shortCondition, color = red)

我使用 15 分钟图,以 ES 作为交易目标。 enter image description here

有没有可以让回测用更多数据完成的声明?

谢谢

0 个答案:

没有答案