谁能帮我将妈妈策略松脚本代码转换为警报?这是代码:
//@version=3
strategy("Momentum Strategy", overlay=true)
length = input(12)
price = close
momentum(seria, length) =>
mom = seria - seria[length]
mom
mom0 = momentum(price, length)
mom1 = momentum(mom0, 1)
if (mom0 > 0 and mom1 > 0)
stop_price = high+syminfo.mintick
strategy.entry("MomLE", strategy.long, stop=stop_price, comment="MomLE", qty=2)
else
strategy.cancel("MomLE")
if (mom0 < 0 and mom1 < 0)
stop_price = low - syminfo.mintick
strategy.entry("MomSE", strategy.short, stop=stop_price, comment="MomSE", qty=2)
else
strategy.cancel("MomSE")