Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/unit-testing/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Pine script Pine脚本-如何设置回溯测试的特定时间段?_Pine Script_Trading_Tradingview Api - Fatal编程技术网

Pine script Pine脚本-如何设置回溯测试的特定时间段?

Pine script Pine脚本-如何设置回溯测试的特定时间段?,pine-script,trading,tradingview-api,Pine Script,Trading,Tradingview Api,我对编程很陌生,所以如果我用错了词,请不要介意 我开始编写我的第一个交易视图策略。我在M5的时间范围内完成了 我的问题是:它只在过去几天内进行了回溯测试(当你在图表中的M5时间段内滚动到最长时间) 在参考资料中,我没有找到允许我从2012年开始在M5或H1图表中回溯测试策略的运算符 我希望你明白我的意思 期待一些答案 一个角落 供参考代码: strategy("Versuchs BOT") overlay=false //=== EMA ===// ema60= ema(cl

我对编程很陌生,所以如果我用错了词,请不要介意

我开始编写我的第一个交易视图策略。我在M5的时间范围内完成了

我的问题是:它只在过去几天内进行了回溯测试(当你在图表中的M5时间段内滚动到最长时间)

在参考资料中,我没有找到允许我从2012年开始在M5或H1图表中回溯测试策略的运算符

我希望你明白我的意思

期待一些答案

一个角落

供参考代码:

strategy("Versuchs BOT")
overlay=false
//=== EMA ===//
ema60= ema(close, 60)
ema200 = ema(close, 200)
//=== Long Condition ===//
long = crossover(ema60, ema200)
//=== short Condition ===//
short = crossunder(ema60, ema200)
//=== Placing long Trade ===//
strategy.entry("Long", strategy.long, 1, when = long)
//=== Placing short trade ===//
strategy.entry("Short", strategy.short, 1, when = short)
//=== Closing Long Trade ===//
strategy.exit("Long Exit", "Long", loss = 4000, when = short)
//=== Closing short ===//
strategy.exit("Short Exit", "Short", loss = 4000,  when = long)