OPEN-SOURCE SCRIPT

Ustad e Muhtram Buy/Sell Signal

63
// Pine Script (TradingView) for Custom High-Accuracy Indicator
//version=5
indicator("Ustad e Muhtram Buy/Sell Signal", overlay=true)

// Define inputs
fastLength = input(9, title="Fast EMA")
slowLength = input(21, title="Slow EMA")
rsiLength = input(14, title="RSI Length")
adxLength = input(14, title="ADX Length")
atrLength = input(14, title="ATR Length")

// Calculate EMAs
emaFast = ta.ema(close, fastLength)
emaSlow = ta.ema(close, slowLength)

// RSI Calculation
rsi = ta.rsi(close, rsiLength)

// ADX Calculation
[dmiPlus, dmiMinus, adx] = ta.dmi(adxLength)

// ATR Calculation
atr = ta.atr(atrLength)

// Buy/Sell Conditions
buyCondition = ta.crossover(emaFast, emaSlow) and rsi > 50 and adx > 20
sellCondition = ta.crossunder(emaFast, emaSlow) and rsi < 50 and adx > 20

// Plot Buy/Sell Signals
plotshape(buyCondition, location=location.belowbar, color=color.green, style=shape.labelup, title="BUY Signal")
plotshape(sellCondition, location=location.abovebar, color=color.red, style=shape.labeldown, title="SELL Signal")

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.