Antigravity Elite is an overlay indicator that screens price with seven selectable components: Mercury Fear, Connors RSI-2, volatility-spike reversal, EMA stack, Supertrend, multi-sigma bands, and an optional funding proxy.
// This Pine Script(TM) v6 source code is subject to the terms of the Mozilla Public License 2.0
// Antigravity Elite v1.4.1 — Screener-Compatible Indicator
// Top-performing strategies from 13 autonomous ML trading systems
// Built by Claude Opus 4.6 | Feb 25, 2026
// v1.5.0: Auto-Detect crypto → Elite Consensus, removed low-TF short override,
// minScore relaxation 0.67→0.85
// v1.4.2: BB squeeze filter for VSR/Sigma, ATR + Funding dashboard rows
// v1.4.1: +consensus 2-vote gate, maxBars 16 cap, SL floor 0.2%
// RSI 15/85, ATR spike x0.8, cooldown 1, maxBars 16, consensus x0.67
// Re-enables shorts on low TF (crypto intraday benefits from both sides)
//@version=6
indicator("Antigravity Elite v1.4.1 [7-Strategy Screener]", shorttitle="AGElite", overlay=true, max_labels_count=50, max_lines_count=50, max_bars_back=500)
// ═══════════════════════════════════════════════════════════════
// INPUTS
// ═══════════════════════════════════════════════════════════════
string GP_MAIN = "─── Strategy Selection ───"
string i_strategy = input.string("Auto-Detect", "Active Strategy", options=["Auto-Detect","Mercury Fear Contrarian","Connors RSI-2","Volatility Spike Reversal","EMA Stack Momentum","Supertrend Trend","Multi-Sigma Reversal","Elite Consensus"], group=GP_MAIN, tooltip="Auto-Detect picks best strategy for current asset. Elite Consensus requires N strategies to agree.")
bool i_nonRepaint = input.bool(true, "Non-Repainting Mode", group=GP_MAIN, tooltip="Only signals on confirmed (closed) bars")
string i_htfTrend = input.string("None", "HTF Trend Filter", options=["None","15","60","240","D","W"], group=GP_MAIN, tooltip="Higher timeframe EMA200 trend gate. Default None for all-timeframe compatibility.")
bool i_longOnly = input.bool(true, "Long-Only Mode (Crypto)", group=GP_MAIN, tooltip="Disables short signals for crypto assets. On low TF (<=1H) with TF Adaptive ON, shorts are re-enabled automatically.")
bool i_tfAdaptive = input.bool(true, "TF Adaptive Mode", group=GP_MAIN, tooltip="Auto-relaxes thresholds on 1H and below. Keeps 4H+ settings untouched. Disable to use raw input values on all TFs.")
string GP_RISK = "─── Risk Management ───"
bool i_useTP = input.bool(false, "Enable TP/SL Zones", group=GP_RISK, tooltip="Off by default — exit on signal reversal instead.")
float i_tpMult = input.float(3.0, "TP ATR Multiplier", minval=0.5, maxval=10, step=0.5, group=GP_RISK)
float i_slMult = input.float(2.0, "SL ATR Multiplier", minval=0.5, maxval=5, step=0.25, group=GP_RISK)
int i_atrLen = input.int(14, "ATR Length", minval=5, maxval=50, group=GP_RISK)
string GP_PARAMS = "─── Strategy Parameters ───"
int i_rsiLen = input.int(2, "RSI Length (Connors)", minval=2, maxval=14, group=GP_PARAMS)
int i_rsiOS = input.int(10, "RSI Oversold", minval=1, maxval=30, group=GP_PARAMS, tooltip="Auto-relaxed to 15 on low TF when TF Adaptive is ON.")
int i_rsiOB = input.int(90, "RSI Overbought", minval=70, maxval=99, group=GP_PARAMS, tooltip="Auto-relaxed to 85 on low TF when TF Adaptive is ON.")
float i_atrSpikeMult = input.float(1.5, "ATR Spike Multiplier (vs 30-bar avg)", minval=1.0, maxval=4.0, step=0.1, group=GP_PARAMS, tooltip="Auto-reduced to x0.8 on low TF (1.5 -> 1.2).")
int i_emaFast = input.int(9, "EMA Fast", minval=3, maxval=50, group=GP_PARAMS)
int i_emaSlow = input.int(21, "EMA Slow", minval=10, maxval=100, group=GP_PARAMS)
float i_bbSigma = input.float(2.6, "Multi-Sigma BB Width", minval=2.0, maxval=4.0, step=0.1, group=GP_PARAMS)
float i_stFactor = input.float(3.0, "Supertrend Factor", minval=1.0, maxval=6.0, step=0.5, group=GP_PARAMS)
int i_stLen = input.int(10, "Supertrend ATR Len", minval=5, maxval=30, group=GP_PARAMS)
int i_adxLen = input.int(14, "ADX Length", minval=7, maxval=30, group=GP_PARAMS)
int i_adxTrend = input.int(25, "ADX Trend Threshold", minval=15, maxval=40, group=GP_PARAMS, tooltip="ADX above this = strong trend (for Supertrend confirmation)")
int i_adxRange = input.int(20, "ADX Range Threshold", minval=10, maxval=30, group=GP_PARAMS, tooltip="ADX below this = range-bound (for Vol Spike, Multi-Sigma)")
string GP_CONSENSUS = "─── Elite Consensus ───"
float i_minScore = input.float(1.5, "Min Weighted Score", minval=0.5, maxval=4.0, step=0.1, group=GP_CONSENSUS, tooltip="Auto-reduced to x0.67 on low TF (1.5 -> 1.0).")
bool i_c1 = input.bool(true, "Mercury Fear", group=GP_CONSENSUS)
bool i_c2 = input.bool(true, "Connors RSI-2", group=GP_CONSENSUS)
bool i_c3 = input.bool(true, "Vol Spike Rev", group=GP_CONSENSUS)
bool i_c4 = input.bool(true, "EMA Stack", group=GP_CONSENSUS)
bool i_c5 = input.bool(true, "Supertrend", group=GP_CONSENSUS)
bool i_c6 = input.bool(true, "Multi-Sigma", group=GP_CONSENSUS)
bool i_c7 = input.bool(false, "Funding Proxy", group=GP_CONSENSUS)
string GP_VIS = "─── Visual Settings ───"
bool i_showLabels = input.bool(true, "Show Signal Labels", group=GP_VIS)
bool i_showDash = input.bool(true, "Show Dashboard", group=GP_VIS)
color i_longColor = input.color(#22c55e, "Long Color", group=GP_VIS)
color i_shortColor = input.color(#ef4444, "Short Color", group=GP_VIS)
// ═══════════════════════════════════════════════════════════════
// TF-ADAPTIVE PARAMETER ADJUSTMENT
// ═══════════════════════════════════════════════════════════════
int tfSeconds = timeframe.in_seconds()
bool isLowTF = i_tfAdaptive and tfSeconds <= 3600
int eff_rsiOS = isLowTF ? math.max(i_rsiOS, 15) : i_rsiOS
int eff_rsiOB = isLowTF ? math.min(i_rsiOB, 85) : i_rsiOB
float eff_atrSpikeMult = isLowTF ? i_atrSpikeMult * 0.8 : i_atrSpikeMult
float eff_minScore = isLowTF ? i_minScore * 0.85 : i_minScore
// Keep long-only on crypto regardless of TF (shorts consistently underperform)
bool eff_longOnly = i_longOnly
// ═══════════════════════════════════════════════════════════════
// CORE CALCULATIONS
// ═══════════════════════════════════════════════════════════════
bool barOK = i_nonRepaint ? barstate.isconfirmed : true
float atr = ta.atr(i_atrLen)
float e9 = ta.ema(close, i_emaFast)
float e21 = ta.ema(close, i_emaSlow)
float e50 = ta.ema(close, 50)
float e200 = ta.ema(close, 200)
float rsi2 = ta.rsi(close, i_rsiLen)
float rsi14 = ta.rsi(close, 14)
[macdLine, macdSig, macdHist] = ta.macd(close, 12, 26, 9)
[bbMid, bbUp, bbLow] = ta.bb(close, 20, 2.0)
float bbUpSigma = bbMid + i_bbSigma * ta.stdev(close, 20)
float bbLowSigma = bbMid - i_bbSigma * ta.stdev(close, 20)
float bbWidth = bbUp - bbLow
bool bbSqueeze = bbWidth < ta.sma(bbWidth, 20) * 0.85
[stVal, stDir] = ta.supertrend(i_stFactor, i_stLen)
// ── ADX for regime detection (Pine v6: use ta.dmi) ──
[diPlus, diMinus, adxVal] = ta.dmi(i_adxLen, i_adxLen)
bool strongTrend = adxVal > i_adxTrend
bool rangeBound = adxVal < i_adxRange
// ── MACD confirmation filter (used by Mercury only) ──
bool macdBull = macdHist > 0
bool macdBear = macdHist < 0
// ── Rolling ATR spike (uses effective multiplier) ──
float atrBaseline = ta.sma(atr, 30)
bool atrSpike = atr > atrBaseline * eff_atrSpikeMult
// ── Volume spike (relaxed on low TF) ──
float volSMA = ta.sma(volume, 20)
float vol3 = ta.sma(volume, 3)
float volMult1 = isLowTF ? 1.15 : 1.2
float volMult2 = isLowTF ? 1.05 : 1.1
bool volSpike = vol3 > volSMA * volMult1 and volume > volume[1] * volMult2
// Funding rate proxy
float vwapVal = ta.vwap(hlc3)
float fundingProxy = (close - vwapVal) / atr
// ── Asset detection ──
string sym = syminfo.ticker
bool isCrypto = str.contains(sym, "BTC") or str.contains(sym, "ETH") or str.contains(sym, "SOL") or str.contains(sym, "DOGE") or str.contains(sym, "ADA") or str.contains(sym, "XRP") or str.contains(sym, "BNB") or str.contains(sym, "DOT") or str.contains(sym, "AVAX") or str.contains(sym, "LINK") or str.contains(sym, "USDT") or str.contains(sym, "USDC")
bool isForex = str.contains(sym, "USD") and (str.contains(sym, "EUR") or str.contains(sym, "GBP") or str.contains(sym, "JPY") or str.contains(sym, "AUD") or str.contains(sym, "CAD") or str.contains(sym, "CHF") or str.contains(sym, "NZD"))
bool longOnlyMode = eff_longOnly and isCrypto
// ── HTF Trend Filter (NO LOOKAHEAD) ──
float htfEma200 = e200
if i_htfTrend == "15"
htfEma200 := request.security(syminfo.tickerid, "15", ta.ema(close, 200), lookahead=barmerge.lookahead_off)
if i_htfTrend == "60"
htfEma200 := request.security(syminfo.tickerid, "60", ta.ema(close, 200), lookahead=barmerge.lookahead_off)
if i_htfTrend == "240"
htfEma200 := request.security(syminfo.tickerid, "240", ta.ema(close, 200), lookahead=barmerge.lookahead_off)
if i_htfTrend == "D"
htfEma200 := request.security(syminfo.tickerid, "D", ta.ema(close, 200), lookahead=barmerge.lookahead_off)
if i_htfTrend == "W"
htfEma200 := request.security(syminfo.tickerid, "W", ta.ema(close, 200), lookahead=barmerge.lookahead_off)
bool htfBullish = i_htfTrend == "None" ? true : (not na(htfEma200) and close > htfEma200)
bool htfBearish = i_htfTrend == "None" ? true : (not na(htfEma200) and close < htfEma200)
// ═══════════════════════════════════════════════════════════════
// STRATEGY SIGNALS (uses effective thresholds)
// ═══════════════════════════════════════════════════════════════
bool mercLong = rsi14 < 40 and close < e200 and atrSpike and close > low[1] and volSpike and macdBull and barOK
bool mercShort = rsi14 > 70 and close > e200 and atrSpike and close < high[1] and volSpike and macdBear and barOK
bool cr2Long = rsi2 < eff_rsiOS and close > e200 and barOK
bool cr2Short = rsi2 > eff_rsiOB and close < e200 and barOK
bool vsrLong = atrSpike and close > open and close[1] < open[1] and rsi14 < 40 and (rangeBound or bbSqueeze) and barOK
bool vsrShort = atrSpike and close < open and close[1] > open[1] and rsi14 > 60 and (rangeBound or bbSqueeze) and barOK
// S4: EMA Stack — v1.3.1: EMA 9/21 cross + EMA50 trend filter
bool emaCrossUp = ta.crossover(e9, e21)
bool emaCrossDown = ta.crossunder(e9, e21)
bool emaLong = emaCrossUp and close > e50 and barOK
bool emaShort = emaCrossDown and close < e50 and barOK
bool stCrossUp = ta.crossover(close, stVal)
bool stCrossDown = ta.crossunder(close, stVal)
bool stLong = stCrossUp and stDir == -1 and strongTrend and barOK
bool stShort = stCrossDown and stDir == 1 and strongTrend and barOK
bool sigmaLong = close[1] < bbLowSigma and close > bbLowSigma and volSpike and (rangeBound or bbSqueeze) and barOK
bool sigmaShort = close[1] > bbUpSigma and close < bbUpSigma and volSpike and (rangeBound or bbSqueeze) and barOK
bool fundLong = fundingProxy < -2.0 and rsi14 < 40 and barOK
bool fundShort = fundingProxy > 2.0 and rsi14 > 60 and barOK
// ═══════════════════════════════════════════════════════════════
// WEIGHTED CONSENSUS
// ═══════════════════════════════════════════════════════════════
float bullScore = 0.0
float bearScore = 0.0
if i_c1 and mercLong
bullScore += 0.80
if i_c2 and cr2Long
bullScore += 0.76
if i_c3 and vsrLong
bullScore += 0.72
if i_c4 and emaLong
bullScore += 0.68
if i_c5 and stLong
bullScore += 0.65
if i_c6 and sigmaLong
bullScore += 0.66
if i_c7 and fundLong
bullScore += 0.60
if i_c1 and mercShort
bearScore += 0.80
if i_c2 and cr2Short
bearScore += 0.76
if i_c3 and vsrShort
bearScore += 0.72
if i_c4 and emaShort
bearScore += 0.68
if i_c5 and stShort
bearScore += 0.65
if i_c6 and sigmaShort
bearScore += 0.66
if i_c7 and fundShort
bearScore += 0.60
int bullVotes = 0
int bearVotes = 0
if i_c1 and mercLong
bullVotes += 1
if i_c2 and cr2Long
bullVotes += 1
if i_c3 and vsrLong
bullVotes += 1
if i_c4 and emaLong
bullVotes += 1
if i_c5 and stLong
bullVotes += 1
if i_c6 and sigmaLong
bullVotes += 1
if i_c7 and fundLong
bullVotes += 1
if i_c1 and mercShort
bearVotes += 1
if i_c2 and cr2Short
bearVotes += 1
if i_c3 and vsrShort
bearVotes += 1
if i_c4 and emaShort
bearVotes += 1
if i_c5 and stShort
bearVotes += 1
if i_c6 and sigmaShort
bearVotes += 1
if i_c7 and fundShort
bearVotes += 1
// Requires 2+ strategies to agree + effective min score
bool consensusLong = bullVotes >= 2 and bullScore >= eff_minScore
bool consensusShort = bearVotes >= 2 and bearScore >= eff_minScore
// ═══════════════════════════════════════════════════════════════
// ASSET DETECTION + ROUTING
// ═══════════════════════════════════════════════════════════════
// Auto-Detect: crypto → Elite Consensus (requires 2+ strategies to agree)
string autoStrat = "Elite Consensus"
if isForex
autoStrat := "EMA Stack Momentum"
if str.contains(sym, "SPY") or str.contains(sym, "QQQ") or str.contains(sym, "AAPL")
autoStrat := "Connors RSI-2"
string activeStrat = i_strategy == "Auto-Detect" ? autoStrat : i_strategy
// ═══════════════════════════════════════════════════════════════
// FINAL SIGNAL DISPATCH
// ═══════════════════════════════════════════════════════════════
bool goLong = false
bool goShort = false
float sigStrength = 0.0
string sigName = ""
if activeStrat == "Mercury Fear Contrarian"
goLong := mercLong
goShort := mercShort
sigStrength := mercLong ? math.min(100, (40 - rsi14) * 3) : mercShort ? math.min(100, (rsi14 - 70) * 3) : 0
sigName := "Mercury"
if activeStrat == "Connors RSI-2"
goLong := cr2Long and htfBullish
goShort := cr2Short and htfBearish
sigStrength := cr2Long ? math.min(100, (eff_rsiOS - rsi2) * 5) : cr2Short ? math.min(100, (rsi2 - eff_rsiOB) * 5) : 0
sigName := "CR2"
if activeStrat == "Volatility Spike Reversal"
goLong := vsrLong and htfBullish
goShort := vsrShort and htfBearish
sigStrength := atrSpike ? 80.0 : 0
sigName := "VSR"
if activeStrat == "EMA Stack Momentum"
goLong := emaLong and htfBullish
goShort := emaShort and htfBearish
sigStrength := emaLong or emaShort ? 75.0 : 0
sigName := "EMA"
if activeStrat == "Supertrend Trend"
goLong := stLong and htfBullish
goShort := stShort and htfBearish
sigStrength := 65.0
sigName := "ST"
if activeStrat == "Multi-Sigma Reversal"
goLong := sigmaLong and htfBullish
goShort := sigmaShort and htfBearish
sigStrength := volSpike ? 80.0 : 50.0
sigName := "Sigma"
if activeStrat == "Elite Consensus"
goLong := consensusLong and htfBullish
goShort := consensusShort and htfBearish
sigStrength := math.max(bullScore, bearScore) / 4.87 * 100
sigName := "ELITE"
// ── Long-only mode: suppress shorts (auto-disabled on low TF) ──
if longOnlyMode
goShort := false
// ═══════════════════════════════════════════════════════════════
// TP/SL CALCULATION
// ═══════════════════════════════════════════════════════════════
float tpLong = na
float slLong = na
float tpShort = na
float slShort = na
// SL floor: minimum 0.2% distance prevents sub-penny stops on low-ATR bars
float slDist = math.max(atr * i_slMult, close * 0.002)
if goLong and i_useTP
tpLong := close + atr * i_tpMult
slLong := close - slDist
if goShort and i_useTP and not longOnlyMode
tpShort := close - atr * i_tpMult
slShort := close + slDist
// ═══════════════════════════════════════════════════════════════
// SCREENER-COMPATIBLE PLOTS
// ═══════════════════════════════════════════════════════════════
float signalVal = goLong ? 1 : goShort and not longOnlyMode ? -1 : 0
plot(signalVal, "Signal", color=color.new(color.blue, 100), display=display.data_window + display.status_line)
plot(sigStrength, "Strength", color=color.new(color.purple, 100), display=display.data_window + display.status_line)
plot(bullVotes, "Bull Votes", color=color.new(color.green, 100), display=display.data_window + display.status_line)
plot(bearVotes, "Bear Votes", color=color.new(color.red, 100), display=display.data_window + display.status_line)
plot(bullScore, "Bull Score", color=color.new(color.green, 100), display=display.data_window + display.status_line)
plot(bearScore, "Bear Score", color=color.new(color.red, 100), display=display.data_window + display.status_line)
plot(rsi2, "RSI-2", color=color.new(color.orange, 100), display=display.data_window + display.status_line)
plot(adxVal, "ADX", color=color.new(color.aqua, 100), display=display.data_window + display.status_line)
plot(fundingProxy, "Funding Proxy", color=color.new(color.teal, 100), display=display.data_window + display.status_line)
plot(tpLong, "TP Long", color=color.new(i_longColor, 80), style=plot.style_circles, linewidth=1, display=display.data_window)
plot(slLong, "SL Long", color=color.new(i_shortColor, 80), style=plot.style_circles, linewidth=1, display=display.data_window)
plot(tpShort, "TP Short", color=color.new(i_shortColor, 80), style=plot.style_circles, linewidth=1, display=display.data_window)
plot(slShort, "SL Short", color=color.new(i_longColor, 80), style=plot.style_circles, linewidth=1, display=display.data_window)
// Overlays
plot(stVal, "Supertrend", color=stDir == -1 ? i_longColor : i_shortColor, linewidth=1)
plot(e9, "EMA 9", color=color.new(#3b82f6, 40), linewidth=2)
plot(e21, "EMA 21", color=color.new(#8b5cf6, 40), linewidth=2)
plot(e50, "EMA 50", color=color.new(#f97316, 50), linewidth=1)
plot(e200, "EMA 200", color=color.new(#f59e0b, 40), linewidth=2)
plot(bbUpSigma, "BB Upper Sigma", color=color.new(#ef4444, 80), linewidth=1, style=plot.style_circles)
plot(bbLowSigma, "BB Lower Sigma", color=color.new(#22c55e, 80), linewidth=1, style=plot.style_circles)
// ═══════════════════════════════════════════════════════════════
// VISUAL SIGNALS
// ═══════════════════════════════════════════════════════════════
bool exitSignal = emaCrossDown and barOK
plotshape(goLong and i_showLabels, "Long Signal", style=shape.triangleup, location=location.belowbar, color=i_longColor, size=size.small, text="LONG")
plotshape(goShort and i_showLabels and not longOnlyMode, "Short Signal", style=shape.triangledown, location=location.abovebar, color=i_shortColor, size=size.small, text="SHORT")
plotshape(exitSignal and i_showLabels and longOnlyMode, "Exit Signal", style=shape.xcross, location=location.abovebar, color=#f59e0b, size=size.tiny, text="EXIT")
bgcolor(goLong ? color.new(i_longColor, 92) : goShort and not longOnlyMode ? color.new(i_shortColor, 92) : na)
// ═══════════════════════════════════════════════════════════════
// ALERT CONDITIONS
// ═══════════════════════════════════════════════════════════════
alertcondition(goLong, "AGElite Long", "Antigravity Elite LONG signal on {{ticker}} at {{close}}")
alertcondition(goShort and not longOnlyMode, "AGElite Short", "Antigravity Elite SHORT signal on {{ticker}} at {{close}}")
alertcondition(exitSignal, "EMA Exit", "EMA cross-under exit signal on {{ticker}} at {{close}}")
alertcondition(consensusLong, "Consensus Long", "Elite Consensus LONG: multiple strategies agree on {{ticker}}")
alertcondition(cr2Long, "Connors RSI-2 Buy", "Connors RSI-2 BUY on {{ticker}} — RSI2 extreme oversold")
// ═══════════════════════════════════════════════════════════════
// DASHBOARD TABLE
// ═══════════════════════════════════════════════════════════════
var table dash = table.new(position.top_right, 3, 12, bgcolor=#12121e, border_color=#1e1e3a, border_width=1, frame_color=#1e1e3a, frame_width=1)
if barstate.islast and i_showDash
string modeStr = longOnlyMode ? "LONG ONLY" : "Long+Short"
string tfStr = isLowTF ? "LowTF" : "HiTF"
table.cell(dash, 0, 0, "AG Elite v1.4.1", text_color=#ffffff, text_size=size.small, text_halign=text.align_left, bgcolor=#1a1a2e)
table.cell(dash, 1, 0, activeStrat, text_color=#3b82f6, text_size=size.small, text_halign=text.align_center, bgcolor=#1a1a2e)
table.cell(dash, 2, 0, modeStr, text_color=longOnlyMode ? #22c55e : #888888, text_size=size.small, text_halign=text.align_right, bgcolor=#1a1a2e)
// Row 1: TF Adaptive status
table.cell(dash, 0, 1, "TF Mode", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 1, tfStr, text_color=isLowTF ? #f59e0b : #22c55e, text_size=size.tiny, text_halign=text.align_center)
string adaptStr = isLowTF ? "RSI " + str.tostring(eff_rsiOS) + "/" + str.tostring(eff_rsiOB) + " Spike:" + str.tostring(eff_atrSpikeMult, "#.1") : "Default params"
table.cell(dash, 2, 1, adaptStr, text_color=isLowTF ? #f59e0b : #666666, text_size=size.tiny, text_halign=text.align_right)
// Row 2: EMA
table.cell(dash, 0, 2, "EMA 9/21", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 2, e9 > e21 ? "BULL" : "BEAR", text_color=e9 > e21 ? #22c55e : #ef4444, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 2, close > e200 ? "> EMA200" : "< EMA200", text_color=close > e200 ? #22c55e : #ef4444, text_size=size.tiny, text_halign=text.align_right)
// Row 3: RSI-2
table.cell(dash, 0, 3, "RSI-2", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 3, str.tostring(rsi2, "#.0"), text_color=rsi2 < 20 ? #22c55e : rsi2 > 80 ? #ef4444 : #888888, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 3, rsi2 < eff_rsiOS ? "OVERSOLD" : rsi2 > eff_rsiOB ? "OVERBOUGHT" : "Neutral", text_color=rsi2 < eff_rsiOS ? #22c55e : rsi2 > eff_rsiOB ? #ef4444 : #666666, text_size=size.tiny, text_halign=text.align_right)
// Row 4: RSI-14
table.cell(dash, 0, 4, "RSI-14", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 4, str.tostring(rsi14, "#.0"), text_color=rsi14 < 35 ? #22c55e : rsi14 > 70 ? #ef4444 : #888888, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 4, rsi14 < 35 ? "FEAR" : rsi14 > 70 ? "GREED" : "Neutral", text_color=rsi14 < 35 ? #22c55e : rsi14 > 70 ? #ef4444 : #666666, text_size=size.tiny, text_halign=text.align_right)
// Row 5: ADX
table.cell(dash, 0, 5, "ADX", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 5, str.tostring(adxVal, "#.0"), text_color=strongTrend ? #22c55e : rangeBound ? #3b82f6 : #888888, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 5, strongTrend ? "TREND" : rangeBound ? "RANGE" : "Mixed", text_color=strongTrend ? #22c55e : rangeBound ? #3b82f6 : #666666, text_size=size.tiny, text_halign=text.align_right)
// Row 6: Supertrend
table.cell(dash, 0, 6, "Supertrend", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 6, stDir == -1 ? "BULL" : "BEAR", text_color=stDir == -1 ? #22c55e : #ef4444, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 6, str.tostring(stVal, "#.2"), text_color=#666666, text_size=size.tiny, text_halign=text.align_right)
// Row 7: HTF Trend
table.cell(dash, 0, 7, "HTF Trend", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 7, htfBullish ? "BULL" : "BEAR", text_color=htfBullish ? #22c55e : #ef4444, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 7, i_htfTrend == "None" ? "OFF" : i_htfTrend + " EMA200", text_color=#666666, text_size=size.tiny, text_halign=text.align_right)
// Row 8: Consensus
string bullStr = str.tostring(bullVotes) + "/7 (" + str.tostring(bullScore, "#.1") + ")"
string bearStr = str.tostring(bearVotes) + "/7 (" + str.tostring(bearScore, "#.1") + ")"
table.cell(dash, 0, 8, "Consensus", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 8, bullStr, text_color=consensusLong ? #22c55e : #888888, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 8, bearStr, text_color=consensusShort ? #ef4444 : #888888, text_size=size.tiny, text_halign=text.align_right)
// Row 9: Signal
string sigLabel = goLong ? ">>> LONG <<<" : goShort and not longOnlyMode ? ">>> SHORT <<<" : "No Signal"
color sigColor = goLong ? #22c55e : goShort and not longOnlyMode ? #ef4444 : #666666
table.cell(dash, 0, 9, sigLabel, text_color=sigColor, text_size=size.small, text_halign=text.align_left, bgcolor=#0a0a12)
string strengthStr = str.tostring(sigStrength, "#.0") + "%"
table.cell(dash, 1, 9, strengthStr, text_color=sigColor, text_size=size.small, text_halign=text.align_center, bgcolor=#0a0a12)
table.cell(dash, 2, 9, sigName, text_color=sigColor, text_size=size.small, text_halign=text.align_right, bgcolor=#0a0a12)
// Row 10: ATR
string atrStr = str.tostring(atr, "#.3")
table.cell(dash, 0, 10, "ATR", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 10, atrStr, text_color=atrSpike ? #f59e0b : #22c55e, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 10, atrSpike ? "SPIKE" : "Normal", text_color=atrSpike ? #f59e0b : #666666, text_size=size.tiny, text_halign=text.align_right)
// Row 11: Funding Proxy
string fundStr = str.tostring(fundingProxy, "#.2")
table.cell(dash, 0, 11, "Funding", text_color=#888888, text_size=size.tiny, text_halign=text.align_left)
table.cell(dash, 1, 11, fundStr, text_color=fundingProxy < -2.0 ? #22c55e : fundingProxy > 2.0 ? #ef4444 : #888888, text_size=size.tiny, text_halign=text.align_center)
table.cell(dash, 2, 11, fundingProxy < -2.0 ? "BEARISH" : fundingProxy > 2.0 ? "BULLISH" : "Neutral", text_color=fundingProxy < -2.0 ? #22c55e : fundingProxy > 2.0 ? #ef4444 : #666666, text_size=size.tiny, text_halign=text.align_right)
Overview
Auto-Detect chooses one method, while Elite Consensus requires agreement and a minimum weighted score. Users can filter with a higher-timeframe EMA, force long-only signals, and relax thresholds on lower timeframes. Signal labels mark entries on the price chart. Take-profit and stop zones are off by default, so exits follow signal reversal unless ATR zones are enabled. Confirmed-bar mode is on by default.
The inputs you can change from the gear icon on the chart. Defaults are the author's.
Setting
Type
Default
Variable
Active Strategy
string
Auto-Detect
i_strategy
Non-Repainting Mode
bool
true
i_nonRepaint
HTF Trend Filter
string
None
i_htfTrend
Long-Only Mode (Crypto)
bool
true
i_longOnly
TF Adaptive Mode
bool
true
i_tfAdaptive
Enable TP/SL Zones
bool
false
i_useTP
TP ATR Multiplier
float
3.0
i_tpMult
SL ATR Multiplier
float
2.0
i_slMult
ATR Length
int
14
i_atrLen
RSI Length (Connors)
int
2
i_rsiLen
RSI Oversold
int
10
i_rsiOS
RSI Overbought
int
90
i_rsiOB
Show all 33 settings
Setting
Type
Default
Variable
ATR Spike Multiplier (vs 30-bar avg)
float
1.5
i_atrSpikeMult
EMA Fast
int
9
i_emaFast
EMA Slow
int
21
i_emaSlow
Multi-Sigma BB Width
float
2.6
i_bbSigma
Supertrend Factor
float
3.0
i_stFactor
Supertrend ATR Len
int
10
i_stLen
ADX Length
int
14
i_adxLen
ADX Trend Threshold
int
25
i_adxTrend
ADX Range Threshold
int
20
i_adxRange
Min Weighted Score
float
1.5
i_minScore
Mercury Fear
bool
true
i_c1
Connors RSI-2
bool
true
i_c2
Vol Spike Rev
bool
true
i_c3
EMA Stack
bool
true
i_c4
Supertrend
bool
true
i_c5
Multi-Sigma
bool
true
i_c6
Funding Proxy
bool
false
i_c7
Show Signal Labels
bool
true
i_showLabels
Show Dashboard
bool
true
i_showDash
Long Color
color
#22c55e
i_longColor
Short Color
color
#ef4444
i_shortColor
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.
This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre
Ari zScore calculates a z-score as the difference between a fast and a slow simple moving average of close, divided by the standard deviation of close. It plots numbered triangles above and below price bars when that value enters fixed magnitude bands, optiona
This indicator plots standard Bollinger Bands consisting of an upper band, lower band, and a simple moving average directly on the price chart. It calculates the Relative Strength Index to identify overbought conditions. A bearish signal displays as a red down
This overlay indicator estimates intraday reversal probabilities from a daily session VWAP and its standard-deviation bands. It scores upside and downside setups with RSI extremes, band touches, a 9/21 EMA relationship, and candle direction, then reduces a sco
This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver
Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a