价格-SMA交叉策略

问题描述

与 SMA 交叉策略相反,我正在寻找价格 SMA 交叉策略。

换句话说:

如果价格 > SMA -> 买入

如果价格 卖出。

如果有人帮助我调整以下代码,我会很高兴。

longCondition = crossover(sma(open,1),sma(close,25)) 

if (inDaterange and longCondition)
    strategy.entry(id="EL",long=true)

 
exitLong = crossunder(sma(open,sma(open,25)) 
strategy.close(id="EL",when=exitLong)

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)