OPEN-SOURCE SCRIPT

Basit Trend AL/SAT

42
//version=5
indicator("Basit Trend AL/SAT", overlay=true)


yesil = close > open
kirmizi = close < open

1 = yeşil, -1 = kırmızı, 0 = başlangıç
var int trend = 0


trend := yesil ? 1 : kirmizi ? -1 : trend


al = yesil and trend[1] != 1
sat = kirmizi and trend[1] != -1


plotshape(al, title="AL", location=location.belowbar, color=color.lime, style=shape.triangleup, size=size.large, text="AL")
plotshape(sat, title="SAT", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.large, text="SAT")


bgcolor(trend == 1 ? color.new(color.green, 85) : trend == -1 ? color.new(color.red, 85) : na)

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.