sherwannajmm
@t_sherwannajmm
تریدر چه نمادی را توصیه به خرید کرده؟
سابقه خرید
تخمین بازدهی ماه به ماه تریدر
پیام های تریدر
فیلتر
نوع پیام
سوپرترند، 50/200 EMA و RSI: اندیکاتور ترکیبی حرفهای برای ترید (نسخه 5)

// version =5 indicator("Supertrend + EMA50/200 + RSI — XAUUSD Template", overlay=true, shorttitle="ST+EMA+RSI") // ====== INPUTS ====== atrPeriod = input.int(10, "ATR Period", minval=1) atrMultiplier = input.float(3.0, "ATR Multiplier", step=0.1) atrSource = input.source(close, "ATR Source") atrMethod = input.string("RMA", "ATR Calc Method", options= ["RMA", "SMA", "EMA", "WMA"]) showSignals = input.bool(true, "Show Buy / Sell Signals") showHighlighter= input.bool(true, "Show Trend Highlighter") showEMAs = input.bool(true, "Show EMA 50/200") ema50Period = input.int(50, "EMA 50 Period") ema200Period = input.int(200, "EMA 200 Period") showRSI = input.bool(true, "Show RSI (14)") rsiLength = input.int(14, "RSI Length") rsiOB = input.int(70, "RSI Overbought") rsiOS = input.int(30, "RSI Oversold") precision_val = input.int(2, "Price Precision (decimals)", minval=0, maxval=8) // Colors / Style upColor = input.color(color.green, "Uptrend Color") downColor = input.color(color.red, "Downtrend Color") ema50Color = input.color(color.blue, "EMA50 Color") ema200Color= input.color(color.orange, "EMA200 Color") rsiColor = input.color(color.white, "RSI Color") // ====== ATR CALC ====== tr = ta.tr(true) atr = switch atrMethod "RMA" => ta.rma(tr, atrPeriod) "SMA" => ta.sma(tr, atrPeriod) "EMA" => ta.ema(tr, atrPeriod) "WMA" => ta.wma(tr, atrPeriod) => ta.rma(tr, atrPeriod) // ====== SUPERTREND LOGIC ====== hl2 = (high + low) / 2.0 upperBand = hl2 + atrMultiplier * atr lowerBand = hl2 - atrMultiplier * atr var float finalUpper = na var float finalLower = na finalUpper := na(finalUpper [1]) ? upperBand : (upperBand < finalUpper [1] or close [1] > finalUpper [1]) ? upperBand : finalUpper [1] finalLower := na(finalLower [1]) ? lowerBand : (lowerBand > finalLower [1] or close [1] < finalLower [1]) ? lowerBand : finalLower [1] // trend: 1 = up, -1 = down var int trend = 1 trend := close > finalUpper [1] ? 1 : close < finalLower [1] ? -1 : trend [1] // selected Supertrend line depending on trend stLine = trend == 1 ? finalLower : finalUpper // format value for labels if needed stLabel = str.tostring(stLine, format.mintick, precision = precision_val) // ====== EMA & RSI ====== ema50 = ta.ema(close, ema50Period) ema200 = ta.ema(close, ema200Period) rsi = ta.rsi(close, rsiLength) // ====== SIGNALS ====== bullChange = trend == 1 and trend [1] == -1 bearChange = trend == -1 and trend [1] == 1 // Combined bias filter examples (optional - used in plots/alerts) longBias = close > ema200 shortBias = close < ema200 // ====== PLOTTING ====== // Supertrend line plot(stLine, title="Supertrend", color = trend==1 ? upColor : downColor, linewidth=2, style=plot.style_line) // Fill background to highlight trend if showHighlighter bgcolor(trend==1 ? color.new(upColor, 90) : color.new(downColor, 90), title="Trend Highlighter") // Plot EMAs plot(showEMAs ? ema50 : na, title="EMA " + str.tostring(ema50Period), color=ema50Color, linewidth=1) plot(showEMAs ? ema200 : na, title="EMA " + str.tostring(ema200Period), color=ema200Color, linewidth=1) // Plot buy/sell arrows plotshape(showSignals and bullChange, title="Buy Signal", style=shape.labelup, location=location.belowbar, color=upColor, text="BUY", textcolor=color.white, size=size.tiny) plotshape(showSignals and bearChange, title="Sell Signal", style=shape.labeldown, location=location.abovebar, color=downColor,text="SELL", textcolor=color.white, size=size.tiny) // Plot small marker for trend (optional) plotchar(trend==1 ? 1 : na, title="UpMarker", char='▲', location=location.top, color=upColor, size=size.tiny) plotchar(trend==-1 ? -1 : na, title="DownMarker", char='▼', location=location.top, color=downColor, size=size.tiny) // ====== RSI PANE ====== rsiTitle = "RSI " + str.tostring(rsiLength) rsiPlot = request.security(syminfo.tickerid, timeframe.period, rsi) // same timeframe if showRSI rsiPane = ta.plot(rsiPlot, title=rsiTitle, color=rsiColor) // will appear in a separate pane if you add this script to a new pane hline(rsiOB, "Overbought", color=color.red) hline(rsiOS, "Oversold", color=color.green) hline(50, "Midline", color=color.gray) // ====== ALERT CONDITIONS ====== alertcondition(bullChange, "Supertrend Bullish Flip", "Supertrend flipped bullish on {{ticker}}") alertcondition(bearChange, "Supertrend Bearish Flip", "Supertrend flipped bearish on {{ticker}}") alertcondition(bullChange and longBias, "Bullish + EMA Filter", "Supertrend bullish flip and price above EMA200 (long bias)") alertcondition(bearChange and shortBias, "Bearish + EMA Filter", "Supertrend bearish flip and price below EMA200 (short bias)") // ====== STATUS LABEL (top-left summarizer) ====== var label stLabelBox = na label.delete(stLabelBox [1]) stLabelBox := label.new(x=bar_index, y=high, text = "ST: " + (trend==1 ? "UP" : "DOWN") + " | st=" + stLabel + "\n" + "EMA50=" + str.tostring(ema50, format.mintick, precision = precision_val) + " EMA200=" + str.tostring(ema200, format.mintick, precision = precision_val) + "\n" + "RSI=" + str.tostring(rsi, format.mintick, precision = 1), xloc = xloc.bar_index, yloc = yloc.price, color=color.new(color.black,85), textcolor=color.white, style=label.style_label_left, size=size.small) label.delete(stLabelBox [1]) // keep only latest // End of script
سلب مسئولیت
هر محتوا و مطالب مندرج در سایت و کانالهای رسمی ارتباطی سهمتو، جمعبندی نظرات و تحلیلهای شخصی و غیر تعهد آور بوده و هیچگونه توصیهای مبنی بر خرید، فروش، ورود و یا خروج از بازارهای مالی نمی باشد. همچنین کلیه اخبار و تحلیلهای مندرج در سایت و کانالها، صرفا بازنشر اطلاعات از منابع رسمی و غیر رسمی داخلی و خارجی است و بدیهی است استفاده کنندگان محتوای مذکور، مسئول پیگیری و حصول اطمینان از اصالت و درستی مطالب هستند. از این رو ضمن سلب مسئولیت اعلام میدارد مسئولیت هرنوع تصمیم گیری و اقدام و سود و زیان احتمالی در بازار سرمایه و ارز دیجیتال، با شخص معامله گر است.