PineScript 4 中的代码:进入或不同标准的两种策略;但根据策略结果的屏幕截图,Entry Long "E2" 在 Enter Long "E1" 上退出——我需要正确关联这些才能在同一个脚本中运行两个不同的系统。
//@version=4
strategy("My Strategy", overlay=true)
strategy.order("E1", strategy.long, when=crossover(sma(close, 14), sma(close, 28)))
strategy.exit("E1", "E1", stop=strategy.position_avg_price * .90)
strategy.order("E2", strategy.long, when=crossover(sma(close, 28), sma(close, 60)))
strategy.exit("E2", "E2", stop=strategy.position_avg_price * .80)
