Janavski v2

Wait 5 sec.

Janavski v2GOLD (US$/OZ)TVC:GOLDthabanijanavski//@version=5 indicator("Clean Buy/Sell Entry Signals", overlay=true) // --- Inputs --- fastMA = input.int(9, title="Fast Moving Average") slowMA = input.int(21, title="Slow Moving Average") // --- Moving Average Calculations --- ma9 = ta.ema(close, fastMA) ma21 = ta.ema(close, slowMA) // --- Plot lines on the chart --- plot(ma9, color=color.aqua, title="Fast EMA (9)") plot(ma21, color=color.orange, title="Slow EMA (21)") // --- Signal Logic (Moving Average Crossover) --- // Buy when fast line crosses above slow line. Sell when it crosses below. buySignal = ta.crossover(ma9, ma21) and barstate.isconfirmed sellSignal = ta.crossunder(ma9, ma21) and barstate.isconfirmed // --- Plotting Visual Entry Labels --- plotshape(buySignal, title="Buy Entry Point", style=shape.labelup, location=location.belowbar, color=color.green, text="BUY", textcolor=color.white, size=size.normal) plotshape(sellSignal, title="Sell Entry Point", style=shape.labeldown, location=location.abovebar, color=color.red, text="SELL", textcolor=color.white, size=size.normal)