12341234

12341234

//@version=5
strategy("استراتژی نمونه MA", overlay=true)

fastMA = ta.sma(close, 9)
slowMA = ta.sma(close, 21)

buyCondition = ta.crossover(fastMA, slowMA)
sellCondition = ta.crossunder(fastMA, slowMA)

if (buyCondition)
strategy.entry("Buy", strategy.long)
if (sellCondition)
strategy.entry("Sell", strategy.short)

plot(fastMA, color=color.blue)
plot(slowMA, color=color.red)

Read More

Share:

Latest News