//@version=6 indicator( "LabotKripto Trend Helper", shorttitle = "LK Trend Helper", overlay = true, max_labels_count = 500 ) fastLength = input.int(21, "Gyors EMA", minval = 1) slowLength = input.int(50, "Lassú EMA", minval = 1) rsiLength = input.int(14, "RSI periódus", minval = 1) longRsiLevel = input.float(55.0, "Long watch RSI-szint", minval = 0, maxval = 100, step = 0.5) shortRsiLevel = input.float(45.0, "Short watch RSI-szint", minval = 0, maxval = 100, step = 0.5) showBackground = input.bool(true, "Háttérszínezés") showSignals = input.bool(true, "Jelölések") emaFast = ta.ema(close, fastLength) emaSlow = ta.ema(close, slowLength) rsiValue = ta.rsi(close, rsiLength) bullTrend = emaFast > emaSlow and close > emaFast bearTrend = emaFast < emaSlow and close < emaFast longWatch = bullTrend and rsiValue >= longRsiLevel shortWatch = bearTrend and rsiValue <= shortRsiLevel plot(emaFast, "EMA gyors", color = color.new(color.green, 0), linewidth = 2) plot(emaSlow, "EMA lassú", color = color.new(color.orange, 0), linewidth = 2) bgColor = longWatch ? color.new(color.green, 88) : shortWatch ? color.new(color.red, 88) : na bgcolor(showBackground ? bgColor : na) plotshape( showSignals and longWatch and not longWatch[1], title = "Long watch indul", style = shape.labelup, location = location.belowbar, color = color.new(color.green, 0), text = "LONG\nWATCH", textcolor = color.white, size = size.tiny ) plotshape( showSignals and shortWatch and not shortWatch[1], title = "Short watch indul", style = shape.labeldown, location = location.abovebar, color = color.new(color.red, 0), text = "SHORT\nWATCH", textcolor = color.white, size = size.tiny ) alertcondition( longWatch and not longWatch[1], title = "LabotKripto Long watch", message = '{"source":"labotkripto","script":"trend_helper","symbol":"{{ticker}}","timeframe":"{{interval}}","side":"long_watch","close":"{{close}}"}' ) alertcondition( shortWatch and not shortWatch[1], title = "LabotKripto Short watch", message = '{"source":"labotkripto","script":"trend_helper","symbol":"{{ticker}}","timeframe":"{{interval}}","side":"short_watch","close":"{{close}}"}' ) trendText = longWatch ? "LONG WATCH" : shortWatch ? "SHORT WATCH" : bullTrend ? "EMELKEDŐ TREND" : bearTrend ? "CSÖKKENŐ TREND" : "SEMLEGES" trendColor = longWatch ? color.new(color.green, 0) : shortWatch ? color.new(color.red, 0) : color.new(color.gray, 20) var table statusTable = table.new(position.top_right, 2, 4, border_width = 1) if barstate.islast table.cell(statusTable, 0, 0, "LabotKripto", text_color = color.white, bgcolor = color.new(color.black, 0)) table.cell(statusTable, 1, 0, "Trend Helper", text_color = color.white, bgcolor = color.new(color.black, 0)) table.cell(statusTable, 0, 1, "Állapot") table.cell(statusTable, 1, 1, trendText, text_color = color.white, bgcolor = trendColor) table.cell(statusTable, 0, 2, "RSI") table.cell(statusTable, 1, 2, str.tostring(rsiValue, "#.0")) table.cell(statusTable, 0, 3, "EMA") table.cell(statusTable, 1, 3, str.tostring(fastLength) + " / " + str.tostring(slowLength))