Untitled
unknown
plain_text
10 months ago
1.1 kB
8
Indexable
//@version=5
indicator("ema5 and psar ", shorttitle="Parabolic SAR & CCI Indicator", overlay=true)
// ~~ Girişler (Inputs)
sarStart = 0.02
sarIncrement = 0.02
sarMax = 0.2
emaLength = input.int(5, "EMA Length", minval=1)
// ~~ Hesaplamalar (Calculations)
psar = ta.sar(sarStart, sarIncrement, sarMax)
ema5 = ta.ema(close, emaLength)
cci1h = request.security(syminfo.tickerid, "60", ta.cci(close, 14))
cci1d = request.security(syminfo.tickerid, "D", ta.cci(close, 14))
// ~~ Koşullar (Conditions)
sarCondition = psar < close
cci1hCondition = ta.crossover(cci1h, 100)
cci1dCondition = cci1d < -100
emaCondition = ema5 < close
// ~~ Tetikleme (Trigger Condition)
triggerCondition = sarCondition and cci1hCondition and cci1dCondition and emaCondition
colorLine = ema5<psar ? #ff0000 : #54ff9f
// ~~ Grafik Çizimleri (Plots)
plot(ema5, "EMA 5", color=colorLine, linewidth=2)
// ~~ Koşul Etiketi (Condition Label)
if triggerCondition
label.new(bar_index, high, "Signal!", style=label.style_circle, color=color.green, textcolor=color.white)
Editor is loading...
Leave a Comment