📅  最后修改于: 2022-03-11 15:00:39.480000             🧑  作者: Mango
//@version=4
strategy("My Strategy", overlay=true)
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)