OPEN-SOURCE SCRIPT

SHAAKUNI INDICATO

//version=5
indicator("Simple Moving Average Crossover", overlay=true)

// Input for Moving Averages
fastLength = input.int(10, title="Fast MA Length")
slowLength = input.int(20, title="Slow MA Length")

// Calculating Moving Averages
fastMA = ta.sma(close, fastLength)
slowMA = ta.sma(close, slowLength)

// Plotting Moving Averages
plot(fastMA, color=color.green, title="Fast MA")
plot(slowMA, color=color.red, title="Slow MA")

// Highlight Buy/Sell Signals
buySignal = ta.crossover(fastMA, slowMA)
sellSignal = ta.crossunder(fastMA, slowMA)

plotshape(series=buySignal, title="Buy Signal", location=location.belowbar, color=color.new(color.green, 0), style=shape.labelup, text="BUY")
plotshape(series=sellSignal, title="Sell Signal", location=location.abovebar, color=color.new(color.red, 0), style=shape.labeldown, text="SELL")
almaaverageCandlestick analysisChart patternsmoving_average

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?

免責聲明