Untitled

 avatar
unknown
plain_text
a month ago
1.6 kB
28
Indexable
//@version=5
indicator("Mum Formasyonları ile Al/Sat Sinyalleri (Renkli Mumlar)", overlay=true)

// Formasyonların Algılanması
// Hammer Formasyonu
is_hammer = close > open and (high - low) > 3 * (close - open) and (open - low) > 2 * (close - open)

// Engulfing Formasyonları
bullish_engulfing = close > open and close[1] < open[1] and close > open[1] and open < close[1]
bearish_engulfing = close < open and close[1] > open[1] and close < open[1] and open > close[1]

// Al/Sat Sinyalleri
buy_signal = is_hammer or bullish_engulfing
sell_signal = bearish_engulfing

// AL Sinyalinden Önceki Mumun Belirlenmesi
yellow_candle = buy_signal[1] // AL sinyalinden önceki mum

// Mumları Renklendirme
barcolor(yellow_candle ? color.yellow : na) // AL sinyalinden önceki mumu sarıya boyar

// Al/Sat İşaretlerini Gösterme
plotshape(buy_signal, title="Buy Signal", style=shape.labelup, location=location.belowbar, color=color.new(color.green, 0), text="AL", size=size.small)
plotshape(sell_signal, title="Sell Signal", style=shape.labeldown, location=location.abovebar, color=color.new(color.red, 0), text="SAT", size=size.small)

// Strateji Giriş ve Çıkış İşlemleri
strategy.entry("AL", strategy.long, when=buy_signal)
strategy.close("AL", when=sell_signal)

// Görsel İşaretçiler
plotshape(is_hammer, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(bullish_engulfing, style=shape.triangleup, location=location.belowbar, color=color.blue, size=size.small)
plotshape(bearish_engulfing, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
Leave a Comment