代码:
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © mgibson91
//@version=3
strategy("My Strategy", overlay=true, pyramiding=100)
longCondition = crossover(close, sma(close, 20))
if (longCondition)
strategy.entry("long", strategy.long)
strategy.exit("long", qty=1, profit=2000)
plot(strategy.position_avg_price)
症状: SO answer
理论价格:
任何解决方法将不胜感激!