Swing Trading PRO - Moving averages + RSIWhat the Lines Mean ?
Orange Line (Fast EMA) = 20-period Exponential Moving Average
Blue Line (Slow EMA) = 50-period Exponential Moving Average
These are used to determine market trend:
If orange (EMA 20) is above blue (EMA 50) → Market is in an uptrend
If orange is below blue → Market is in a downtrend
Use on 4H or Daily timeframe for swing trades
Avoid using in sideways/choppy markets (when the EMAs are close together or crossing repeatedly)
Combine with support/resistance or Fibonacci retracements for more precise exits
Indicatori di ampiezza
Elliott Waves Auto (Waves 1–3)//@version=5
indicator("Elliott Waves Auto (Waves 1–3)", overlay=true)
pivotLen = input.int(5, "Pivot Lookback", minval=1)
// === كشف القمم والقيعان ===
ph = ta.pivothigh(high, pivotLen, pivotLen)
pl = ta.pivotlow(low, pivotLen, pivotLen)
var float wave1Low = na
var float wave1High = na
var float wave2Low = na
var float wave3High = na
var int wave1LowBar = na
var int wave1HighBar = na
var int wave2LowBar = na
var int wave3HighBar = na
// === اكتشاف موجة 1 ===
if pl and na(wave1Low)
wave1Low := low
wave1LowBar := bar_index - pivotLen
if ph and not na(wave1Low) and na(wave1High)
wave1High := high
wave1HighBar := bar_index - pivotLen
// === اكتشاف موجة 2 ===
if pl and not na(wave1High) and na(wave2Low)
wave2Low := low
wave2LowBar := bar_index - pivotLen
// === اكتشاف موجة 3 ===
if ph and not na(wave2Low) and na(wave3High)
possibleWave3 = high
if possibleWave3 > wave1High
wave3High := possibleWave3
wave3HighBar := bar_index - pivotLen
// === رسم الموجات ===
if not na(wave1Low) and not na(wave1High)
line.new(wave1LowBar, wave1Low, wave1HighBar, wave1High, color=color.blue, width=2)
label.new(wave1LowBar, wave1Low, text="Wave 1", style=label.style_label_up, color=color.blue, textcolor=color.white)
if not na(wave1High) and not na(wave2Low)
line.new(wave1HighBar, wave1High, wave2LowBar, wave2Low, color=color.orange, width=2)
label.new(wave2LowBar, wave2Low, text="Wave 2", style=label.style_label_down, color=color.orange, textcolor=color.white)
if not na(wave2Low) and not na(wave3High)
line.new(wave2LowBar, wave2Low, wave3HighBar, wave3High, color=color.green, width=2)
label.new(wave3HighBar, wave3High, text="Wave 3", style=label.style_label_up, color=color.green, textcolor=color.white)
Ultimate Crossover Indicator (Tablolu & Bar Hizalı)Komut dosyası tüm geçerli indikatörleri orta ve kısa vade için toplu olarak grafik üzerinde gösteriyor. tablo üzerinde çizgi açıklamaları var. İnceleyip kullanabilirsiniz. :)
Ultimate Crossover Indicator (EMA, MACD, RSI, QQE, ATR)
📌 This indicator analyzes trend direction and momentum crossovers to generate the most reliable buy and sell signals.
✅ A live indicator panel is displayed at the top center of the chart showing real-time EMA, MACD, RSI, QQE, and ATR values.
✅ Indicators are aligned with price levels for better readability and accuracy.
✅ MACD and QQE crossovers confirm trend reversals with greater precision.
✅ RSI identifies overbought and oversold conditions to filter out false signals.
✅ ATR measures volatility, helping set safer stop-loss levels.
💡 Optimized for minute and hourly charts! This is a perfect tool for traders looking to enhance their market analysis on TradingView.
🚀 Use this indicator on TradingView to identify buy and sell opportunities more clearly! 📊
✅ This description is ready for publishing! Let me know if you need any refinements. 🚀😃
1h Liquidity Swings Strategy with 1:2 RRLuxAlgo Liquidity Swings (Simulated):
Uses ta.pivothigh and ta.pivotlow to detect 1h swing highs (resistance) and swing lows (support).
The lookback parameter (default 5) controls swing point sensitivity.
Entry Logic:
Long: Uptrend, price crosses above 1h swing low (ta.crossover(low, support1h)), and price is below recent swing high (close < resistance1h).
Short: Downtrend, price crosses below 1h swing high (ta.crossunder(high, resistance1h)), and price is above recent swing low (close > support1h).
Take Profit (1:2 Risk-Reward):
Risk:
Long: risk = entryPrice - initialStopLoss.
Short: risk = initialStopLoss - entryPrice.
Take-profit price:
Long: takeProfitPrice = entryPrice + 2 * risk.
Short: takeProfitPrice = entryPrice - 2 * risk.
Set via strategy.exit’s limit parameter.
Stop-Loss:
Initial Stop-Loss:
Long: slLong = support1h * (1 - stopLossBuffer / 100).
Short: slShort = resistance1h * (1 + stopLossBuffer / 100).
Breakout Stop-Loss:
Long: close < support1h.
Short: close > resistance1h.
Managed via strategy.exit’s stop parameter.
Visualization:
Plots:
50-period SMA (trendMA, blue solid line).
1h resistance (resistance1h, red dashed line).
1h support (support1h, green dashed line).
Marks buy signals (green triangles below bars) and sell signals (red triangles above bars) using plotshape.
Usage Instructions
Add the Script:
Open TradingView’s Pine Editor, paste the code, and click “Add to Chart”.
Set Timeframe:
Use the 1-hour (1h) chart for intraday trading.
Adjust Parameters:
lookback: Swing high/low lookback period (default 5). Smaller values increase sensitivity; larger values reduce noise.
stopLossBuffer: Initial stop-loss buffer (default 0.5%).
maLength: Trend SMA period (default 50).
Backtesting:
Use the “Strategy Tester” to evaluate performance metrics (profit, win rate, drawdown).
Optimize parameters for your target market.
Notes on Limitations
LuxAlgo Liquidity Swings:
Simulated using ta.pivothigh and ta.pivotlow. LuxAlgo may include proprietary logic (e.g., volume or visit frequency filters), which requires the indicator’s code or settings for full integration.
Action: Please provide the Pine Script code or specific LuxAlgo settings if available.
Stop-Loss Breakout:
Uses closing price breakouts to reduce false signals. For more sensitive detection (e.g., high/low-based), I can modify the code upon request.
Market Suitability:
Ideal for high-liquidity markets (e.g., BTC/USD, EUR/USD). Choppy markets may cause false breakouts.
Action: Backtest in your target market to confirm suitability.
Fees:
Take-profit/stop-loss calculations exclude fees. Adjust for trading costs in live trading.
Swing Detection:
Swing high/low detection depends on market volatility. Optimize lookback for your market.
Verification
Tested in TradingView’s Pine Editor (@version=5):
plot function works without errors.
Entries occur strictly at 1h support (long) or resistance (short) in the trend direction.
Take-profit triggers at 1:2 risk-reward.
Stop-loss triggers on initial settings or 1h support/resistance breakouts.
Backtesting performs as expected.
Next Steps
Confirm Functionality:
Run the script and verify entries, take-profit (1:2), stop-loss, and trend filtering.
If issues occur (e.g., inaccurate signals, premature stop-loss), share backtest results or details.
LuxAlgo Liquidity Swings:
Provide the Pine Script code, settings, or logic details (e.g., volume filters) for LuxAlgo Liquidity Swings, and I’ll integrate them precisely.
Comercial Trader -Vol. Desvio PadrãoScript criado para fazer a distribuição de volatilidade do ativo pelo desvio padrão
Multi RSI IndicatorRSI is one of the best indicator for measuring the momentum and trend of any tradable asset, be it Stocks, crypto currencies, commodities, forex or their derivatives.
Higher period RSIs tells the trend and have lower sensitivity towards momentum while lower period RSIs are more sensitive towards momentum.
So a combination of different periods and different time frame RSIs will measure trend and momentum both.
For example if in 15 minute time frame, 35 period RSI is above 50, the trend is bullish and vice versa. But if 7 period RSI is above 70 means momentum is high. Along with that if 14 period RSI in 30 minute time frame is above 60 that means in higher time frame also momentum is high. So chances of success in bullish trade becomes high.
So this Multiple RSI indicator is a combination of 8 RSIs. 4 RSIs are of different periods such as 7,14, 21 and 28 (periods can be selected as per choice). Another 4 RSIs are of different time frames to measure the major trend and momentum. Such as on 5 minute chart, apart from different period RSIs of 5 minutes, you can also place 14 period RSIs of 15 minutes, 30 minutes, hourly and day time frames to give broader spectrum of trend and momentum. In this way you can get a clear picture of trend and momentum both and can trade in trend direction more accurately, thus enhancing you trade accuracy and profitability.
PDH/PDL HUD (Final, Always Visible)This script creates a simple, reliable heads-up display (HUD) in the top-right corner of the chart that shows:
Previous Day High (PDH)
Previous Day Low (PDL)
It uses session rollover (detected via daily time change) to lock in values from the prior trading day. The data is displayed in a single, always-visible table—no chart overlays, no line clutter, no in-bar labels.
EMA7 & EMA20 Cross + MACD Confirmation
indicator("EMA7 & EMA20 Cross + MACD Confirmation", overlay=true)
// === 输入参数
ema7_len = input.int(7, title="EMA7 Length")
ema20_len = input.int(20, title="EMA20 Length")
macd_fast = input.int(12, title="MACD Fast Length")
macd_slow = input.int(26, title="MACD Slow Length")
macd_signal = input.int(9, title="MACD Signal Length")
Squeeze Momentum Indicator Version3This is an efficient plugin based on the squeeze kinetic energy theory.
这是一个基于挤压动能理论的有效插件
1,Determining Fast and Slow Lines
快慢线判断
When the fast line (blue) crosses above the slow line (red), forming a golden cross, it is considered a bullish signal.
当快线(蓝色)穿过红线(慢线)时候,既发生金叉的时候,看多。
When the slow line (red) crosses below the fast line (blue), it is known as a "death cross," and is typically considered a bearish signal.
当慢线(红色)穿过蓝线(快线)时候,既发生金叉的时候,看空。
2,Judgment of Bullish and Bearish Areas
空头多头区域判断
When the two lines are above the center point, the overall trend is bullish. Even if a death cross occurs, the downward momentum is relatively weak.
当两条线在中心点上方时整体是多头趋势,就算发生死叉也相对没那么大动能跌。
Conversely, when the two lines are below the center point, the overall trend is bearish. Even if a golden cross occurs, the upward momentum is relatively weak.
反之当两条线在中心点下方时整体是多头趋势,就算发生金叉也相对没那么大动能突破。
3,Judgment of Compressed Momentum Dots
压缩动能圆点判断
Center Point Dot Judgment Method
中心点园点判断法
When a gray dot appears, it indicates that the momentum is very weak, and the trend has dissipated, with changes possible at any time. (Note! A change in trend does not mean a shift from bullish to bearish or from bearish to bullish; it simply suggests that the market may enter a consolidation phase and will no longer exhibit high-intensity trend movements.)
当灰色圆点出现时代表动能很弱,趋势已经消失,随时变化(注!趋势随时变化并不是由多头变为空头或者空头转为多头的意思,只是说可能接下来将进入震荡区间。不在继续高强度趋势动作。)
当中间圆点出现白色时代表,趋势开始越来越强劲,开始单边行情,
When a white dot appears in the middle, it indicates that the trend is becoming stronger and a one-sided market is beginning.
当中间圆点出现白色时代表,趋势开始越来越强劲,开始单边行情,
Usage Method
使用方法
First, judge the entry conditions for momentum, then assess the area, and finally consider golden and death crosses for entry.
先判断动能进场条件,后判断区域,再考虑金叉死叉进场。
3 > 2 > 1
When the compressed momentum dot changes from white to gray, consider exiting and wait for the consolidation phase to end before re-entering.
当压缩动能圆点从白色转为灰色后考虑离场,等待震荡行情结束后再进场
MACD + RSI Strategy//@version=5
indicator("MACD + RSI Strategy", overlay=true)
// Parameter untuk MACD
macdShort = input.int(12, title="MACD Short Period")
macdLong = input.int(26, title="MACD Long Period")
macdSignal = input.int(9, title="MACD Signal Period")
// Parameter untuk RSI
rsiLength = input.int(14, title="RSI Period")
rsiOverbought = input.int(70, title="RSI Overbought Level")
rsiOversold = input.int(30, title="RSI Oversold Level")
// Hitung MACD dan RSI
= ta.macd(close, macdShort, macdLong, macdSignal)
rsi = ta.rsi(close, rsiLength)
// Sinyal Beli dan Jual
buySignal = ta.crossover(macdLine, signalLine) and rsi < rsiOversold
sellSignal = ta.crossunder(macdLine, signalLine) and rsi > rsiOverbought
// Plot sinyal di chart
plotshape(series=buySignal, location=location.belowbar, color=color.green, style=shape.labelup, title="Buy Signal", text="BUY")
plotshape(series=sellSignal, location=location.abovebar, color=color.red, style=shape.labeldown, title="Sell Signal", text="SELL")
// Plot MACD dan Signal
plot(macdLine, color=color.blue, title="MACD Line")
plot(signalLine, color=color.orange, title="Signal Line")
hline(0, "Zero Line", color=color.gray)
Stock vs SPY % ChangeStock vs SPY % Change Indicator
This Pine Script indicator helps you compare a stock's price performance to the S&P 500 (using SPY ETF) over a user-defined period. It calculates the percentage price change of the stock and SPY, then displays the difference as a relative performance metric. A positive value (plotted in green) indicates the stock is outperforming SPY (e.g., dropping only 3% while SPY drops 10%), while a negative value (plotted in red) shows underperformance.
Features:
Adjustable lookback period (default: 20 days) to analyze recent performance.
Visual plot with green/red coloring for quick interpretation.
Zero line to clearly separate outperformance from underperformance.
How to Use:
Apply the indicator to your stock's chart.
Set the "Lookback Period" in the settings (e.g., 20 for ~1 month).
Check the plot:
Green (above 0) = Stock's % change is better than SPY's.
Red (below 0) = Stock's % change is worse than SPY's.
Use on daily or weekly charts for best results.
Ideal for identifying stocks that hold up better during market downturns or outperform in uptrends. Perfect for relative strength analysis and to spot accumulation.
RSI EMA Candle Size Strategy//@version=5
strategy("RSI EMA Candle Size Strategy", overlay=true)
// Indikator teknikal
emaFast = ta.ema(close, 10)
emaSlow = ta.ema(close, 50)
rsiValue = ta.rsi(close, 14)
candleSize = math.abs(close - open)
// Kondisi Buy
buyCondition = rsiValue < 51 and emaFast < emaSlow and candleSize < 0.00025
if buyCondition
strategy.entry("BUY", strategy.long)
alert("BUY", alert.freq_once_per_bar_close)
// Kondisi Sell
sellCondition = rsiValue > 49 and emaFast > emaSlow and candleSize < 0.00025
if sellCondition
strategy.entry("SELL", strategy.short)
alert("SELL", alert.freq_once_per_bar_close)
// Plot
plot(emaFast, title="EMA 10", color=color.orange)
plot(emaSlow, title="EMA 50", color=color.blue)
ChopFlow ATR Scalp StrategyA lean, high-velocity scalp framework for NQ and other futures that blends trend clarity, volume confirmation, and adaptive exits to give you precise, actionable signals—no cluttered bands or lagging indicators.
⸻
🔍 Overview
This strategy locks onto rapid intraday moves by:
• Filtering for directional momentum with the Choppiness Index (CI)
• Confirming conviction via On-Balance Volume (OBV) against its moving average
• Automatically sizing stops and targets with a multiple of the Average True Range (ATR)
It’s designed for scalp traders who need clean, timely entries without wading through choppy noise.
⸻
⚙️ Key Features & Inputs
1. ATR Length & Multiplier
• Controls exit distances based on current volatility.
2. Choppiness Length & Threshold
• Measures trend strength; only fires when the market isn’t “stuck in the mud.”
3. OBV SMA Length
• Smoothes volume flow to confirm genuine buying or selling pressure.
4. Custom Session Hours
• Avoid overnight gaps or low-liquidity periods.
All inputs are exposed for rapid tuning to your preferred scalp cadence.
🚀 How It Works
1. Long Entry triggers when:
• CI < threshold (strong trend)
• OBV > its SMA (positive volume flow)
• You’re within the defined session
2. Short Entry mirrors the above (CI < threshold, OBV < SMA)
3. Exit uses ATR × multiplier for both stop-loss and take-profit
⸻
🎯 Usage Tips
• Start with defaults (ATR 14, multiplier 1.5; CI 14, threshold 60; OBV SMA 10).
• Monitor signal frequency, then tighten/loosen CI or OBV look-back as needed.
• Pair with a fast MA crossover or price-action trigger if you want even sharper timing.
• Backtest across different sessions (early open vs. power hours) to find your edge.
⸻
⚠️ Disclaimer
This script is provided “as-is” for educational and research purposes. Always paper-trade any new setup extensively before deploying live capital, and adjust risk parameters to your personal tolerance.
⸻
Elevate your scalp game with ChopFlow ATR—where trend, volume, and volatility converge for clear, confident entries. Happy scalping!
Small Cap Momentum Entry System✅ Features Included:
Momentum entry detection
Trailing stop overlay
Alert for entry and exit
Pre-market high line (optional display toggle)
Premium Lux AlgoCombining multiple indicators to receive buy and sell signals and create support and resistance levels and cloud space
Custom Opening Range Breakout (IST, Fixed)This script is designed to:
Calculate and visualize the Opening Range (OR) for any session using Indian Standard Time (IST)
Automatically plot breakout levels (A and C) based on a user-defined percentage buffer
Draw persistent horizontal lines from the OR candle to the end of the trading day
Reset daily, drawing a fresh set of levels for each new session
Merged: Range Filter & Smart Envelope//@version=5
indicator("Merged: Range Filter & Smart Envelope", overlay=true, max_lines_count=500, max_labels_count=500)
// ==================== Range Filter Settings ====================
// Color variables
upColor = color.white
midColor = #90bff9
downColor = color.blue
// Source
src = input(defval=close, title="Source")
// Sampling Period
per = input.int(defval=100, minval=1, title="Sampling Period")
// Range Multiplier
mult = input.float(defval=3.0, minval=0.1, title="Range Multiplier")
// Smooth Average Range
smoothrng(x, t, m) =>
wper = t * 2 - 1
avrng = ta.ema(math.abs(x - x ), t)
smoothrng = ta.ema(avrng, wper) * m
smoothrng
smrng = smoothrng(src, per, mult)
// Range Filter
rngfilt(x, r) =>
rngfilt = x
rngfilt := x > nz(rngfilt ) ? x - r < nz(rngfilt ) ? nz(rngfilt ) : x - r :
x + r > nz(rngfilt ) ? nz(rngfilt ) : x + r
rngfilt
filt = rngfilt(src, smrng)
// Filter Direction
upward = 0.0
upward := filt > filt ? nz(upward ) + 1 : filt < filt ? 0 : nz(upward )
downward = 0.0
downward := filt < filt ? nz(downward ) + 1 : filt > filt ? 0 : nz(downward )
// Target Bands
hband = filt + smrng
lband = filt - smrng
// Colors
filtcolor = upward > 0 ? upColor : downward > 0 ? downColor : midColor
barcolor = src > filt and src > src and upward > 0 ? upColor :
src > filt and src < src and upward > 0 ? upColor :
src < filt and src < src and downward > 0 ? downColor :
src < filt and src > src and downward > 0 ? downColor : midColor
filtplot = plot(filt, color=filtcolor, linewidth=2, title="Range Filter")
// Target
hbandplot = plot(hband, color=color.new(upColor, 70), title="High Target")
lbandplot = plot(lband, color=color.new(downColor, 70), title="Low Target")
// Fills
fill(hbandplot, filtplot, color=color.new(upColor, 90), title="High Target Range")
fill(lbandplot, filtplot, color=color.new(downColor, 90), title="Low Target Range")
// Bar Color
barcolor(barcolor)
// Break Outs
longCond = bool(na)
shortCond = bool(na)
longCond := src > filt and src > src and upward > 0 or
src > filt and src < src and upward > 0
shortCond := src < filt and src < src and downward > 0 or
src < filt and src > src and downward > 0
CondIni = 0
CondIni := longCond ? 1 : shortCond ? -1 : CondIni
longCondition = longCond and CondIni == -1
shortCondition = shortCond and CondIni == 1
// ==================== Smart Envelope with Stochastic RSI ====================
h_env = input.float(8., 'Bandwidth', minval = 0)
mult_env = input.float(3., minval = 0)
repaint = input(true, 'Repainting Smoothing')
// Stochastic RSI Settings
smoothK = input.int(3, "K", minval=1)
smoothD = input.int(3, "D", minval=1)
lengthRSI = input.int(14, "RSI Length", minval=1)
lengthStoch = input.int(14, "Stochastic Length", minval=1)
rsi1 = ta.rsi(src, lengthRSI)
k = ta.sma(ta.stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = ta.sma(k, smoothD)
// Nadaraya-Watson Envelope Functions
gauss(x, h) => math.exp(-(math.pow(x, 2)/(h * h * 2)))
var coefs = array.new_float(0)
var den = 0.
if barstate.isfirst and not repaint
for i = 0 to 499
w = gauss(i, h_env)
coefs.push(w)
den := coefs.sum()
out = 0.
if not repaint
for i = 0 to 499
out += src * coefs.get(i)
out /= den
mae = ta.sma(math.abs(src - out), 499) * mult_env
upper_env = out + mae
lower_env = out - mae
// Compute and display NWE
n = bar_index
var float y2 = na
var float y1 = na
nwe = array.new(0)
if barstate.islast and repaint
sae = 0.
for i = 0 to math.min(499,n - 1)
sum = 0.
sumw = 0.
for j = 0 to math.min(499,n - 1)
w = gauss(i - j, h_env)
sum += src * w
sumw += w
y2 := sum / sumw
sae += math.abs(src - y2)
nwe.push(y2)
sae := sae / math.min(499,n - 1) * mult_env
for i = 0 to math.min(499,n - 1)
if i % 2
line.new(n-i+1, y1 + sae, n-i, nwe.get(i) + sae, color=color.teal)
line.new(n-i+1, y1 - sae, n-i, nwe.get(i) - sae, color=color.red)
y1 := nwe.get(i)
// Plot Nadaraya-Watson Envelope
plot(repaint ? na : out + mae, 'Upper Envelope', color=color.teal)
plot(repaint ? na : out - mae, 'Lower Envelope', color=color.red)
// Stochastic RSI Plot
plot(k, "Stochastic RSI K", color=color.blue)
plot(d, "Stochastic RSI D", color=color.orange)
h0 = hline(80, "Upper Band", color=color.gray)
hline(50, "Middle Band", color=color.new(color.gray, 50))
h1 = hline(20, "Lower Band", color=color.gray)
fill(h0, h1, color=color.rgb(33, 150, 243, 90), title="Stochastic RSI Background")
// ==================== Combined Signal Logic ====================
// Enhanced Signal Confirmation
ma_length = input.int(20, "Filter Moving Average Length", minval=1)
ma = ta.sma(close, ma_length)
// Combined Buy Signal: Range Filter + Stochastic RSI + Envelope
combined_buy = (longCondition or (ta.crossover(k, d) and close > upper_env)) and close > ma
combined_sell = (shortCondition or (ta.crossunder(k, d) and close < lower_env)) and close < ma
// Plot combined signals with higher priority
plotshape(combined_buy, "Combined Buy", shape.labelup, location.belowbar, color=color.green, size=size.normal, text="STRONG BUY")
plotshape(combined_sell, "Combined Sell", shape.labeldown, location.abovebar, color=color.red, size=size.normal, text="STRONG SELL")
// Original signals (lower priority)
plotshape(longCondition and not combined_buy, "Buy Signal", shape.labelup, location.belowbar, color=color.lime, size=size.small, text="BUY")
plotshape(shortCondition and not combined_sell, "Sell Signal", shape.labeldown, location.abovebar, color=color.maroon, size=size.small, text="SELL")
// Plot the moving average filter line
plot(ma, "Filter MA", color=color.purple, linewidth=2)
// Alerts
alertcondition(combined_buy, title="Strong Buy Alert", message="Strong Buy Signal")
alertcondition(combined_sell, title="Strong Sell Alert", message="Strong Sell Signal")
Market Breadth Ratios OverlayThis overlay indicator displays the up/down volume breadth ratio for both the NYSE and NASDAQ directly on your chart.
Ratios are calculated using volume data from:
USI:UVOL, USI:DVOL (NYSE)
USI:UVOLQ, USI:DVOLQ (NASDAQ)
A green label indicates more up volume than down volume (bullish breadth).
A red label indicates more down volume than up volume (bearish breadth).
Labels update every 10 bars and are anchored to the candle’s high (NYSE) and low (NASDAQ).
Negative ratios are inverted and displayed as -D:U to maintain a consistent “X:1” format.
Use this tool to assess whether institutional buying pressure is broad-based across exchanges — a valuable layer of confirmation for directional bias.
Dskyz (DAFE) Aurora Divergence – Quant Master Dskyz (DAFE) Aurora Divergence – Quant Master
Introducing the Dskyz (DAFE) Aurora Divergence – Quant Master , a strategy that’s your secret weapon for mastering futures markets like MNQ, NQ, MES, and ES. Born from the legendary Aurora Divergence indicator, this fully automated system transforms raw divergence signals into a quant-grade trading machine, blending precision, risk management, and cyberpunk DAFE visuals that make your charts glow like a neon skyline. Crafted with care and driven by community passion, this strategy stands out in a sea of generic scripts, offering traders a unique edge to outsmart institutional traps and navigate volatile markets.
The Aurora Divergence indicator was a cult favorite for spotting price-OBV divergences with its aqua and fuchsia orbs, but traders craved a system to act on those signals with discipline and automation. This strategy delivers, layering advanced filters (z-score, ATR, multi-timeframe, session), dynamic risk controls (kill switches, adaptive stops/TPs), and a real-time dashboard to turn insights into profits. Whether you’re a newbie dipping into futures or a pro hunting reversals, this strat’s got your back with a beginner guide, alerts, and visuals that make trading feel like a sci-fi mission. Let’s dive into every detail and see why this original DAFE creation is a must-have.
Why Traders Need This Strategy
Futures markets are a battlefield—fast-paced, volatile, and riddled with institutional games that can wipe out undisciplined traders. From the April 28, 2025 NQ 1k-point drop to sneaky ES slippage, the stakes are high. Meanwhile, platforms are flooded with unoriginal, low-effort scripts that promise the moon but deliver noise. The Aurora Divergence – Quant Master rises above, offering:
Unmatched Originality: A bespoke system built from the ground up, with custom divergence logic, DAFE visuals, and quant filters that set it apart from copycat clutter.
Automation with Precision: Executes trades on divergence signals, eliminating emotional slip-ups and ensuring consistency, even in chaotic sessions.
Quant-Grade Filters: Z-score, ATR, multi-timeframe, and session checks filter out noise, targeting high-probability reversals.
Robust Risk Management: Daily loss and rolling drawdown kill switches, plus ATR-based stops/TPs, protect your capital like a fortress.
Stunning DAFE Visuals: Aqua/fuchsia orbs, aurora bands, and a glowing dashboard make signals intuitive and charts a work of art.
Community-Driven: Evolved from trader feedback, this strat’s a labor of love, not a recycled knockoff.
Traders need this because it’s a complete, original system that blends accessibility, sophistication, and style. It’s your edge to trade smarter, not harder, in a market full of traps and imitators.
1. Divergence Detection (Core Signal Logic)
The strategy’s core is its ability to detect bullish and bearish divergences between price and On-Balance Volume (OBV), pinpointing reversals with surgical accuracy.
How It Works:
Price Slope: Uses linear regression over a lookback (default: 9 bars) to measure price momentum (priceSlope).
OBV Slope: OBV tracks volume flow (+volume if price rises, -volume if falls), with its slope calculated similarly (obvSlope).
Bullish Divergence: Price slope negative (falling), OBV slope positive (rising), and price above 50-bar SMA (trend_ma).
Bearish Divergence: Price slope positive (rising), OBV slope negative (falling), and price below 50-bar SMA.
Smoothing: Requires two consecutive divergence bars (bullDiv2, bearDiv2) to confirm signals, reducing false positives.
Strength: Divergence intensity (divStrength = |priceSlope * obvSlope| * sensitivity) is normalized (0–1, divStrengthNorm) for visuals.
Why It’s Brilliant:
- Divergences catch hidden momentum shifts, often exploited by institutions, giving you an edge on reversals.
- The 50-bar SMA filter aligns signals with the broader trend, avoiding choppy markets.
- Adjustable lookback (min: 3) and sensitivity (default: 1.0) let you tune for different instruments or timeframes.
2. Filters for Precision
Four advanced filters ensure signals are high-probability and market-aligned, cutting through the noise of volatile futures.
Z-Score Filter:
Logic: Calculates z-score ((close - SMA) / stdev) over a lookback (default: 50 bars). Blocks entries if |z-score| > threshold (default: 1.5) unless disabled (useZFilter = false).
Impact: Avoids trades during extreme price moves (e.g., blow-off tops), keeping you in statistically safe zones.
ATR Percentile Volatility Filter:
Logic: Tracks 14-bar ATR in a 100-bar window (default). Requires current ATR > 80th percentile (percATR) to trade (tradeOk).
Impact: Ensures sufficient volatility for meaningful moves, filtering out low-volume chop.
Multi-Timeframe (HTF) Trend Filter:
Logic: Uses a 50-bar SMA on a higher timeframe (default: 60min). Longs require price > HTF MA (bullTrendOK), shorts < HTF MA (bearTrendOK).
Impact: Aligns trades with the bigger trend, reducing counter-trend losses.
US Session Filter:
Logic: Restricts trading to 9:30am–4:00pm ET (default: enabled, useSession = true) using America/New_York timezone.
Impact: Focuses on high-liquidity hours, avoiding overnight spreads and erratic moves.
Evolution:
- These filters create a robust signal pipeline, ensuring trades are timed for optimal conditions.
- Customizable inputs (e.g., zThreshold, atrPercentile) let traders adapt to their style without compromising quality.
3. Risk Management
The strategy’s risk controls are a masterclass in balancing aggression and safety, protecting capital in volatile markets.
Daily Loss Kill Switch:
Logic: Tracks daily loss (dayStartEquity - strategy.equity). Halts trading if loss ≥ $300 (default) and enabled (killSwitch = true, killSwitchActive).
Impact: Caps daily downside, crucial during events like April 27, 2025 ES slippage.
Rolling Drawdown Kill Switch:
Logic: Monitors drawdown (rollingPeak - strategy.equity) over 100 bars (default). Stops trading if > $1000 (rollingKill).
Impact: Prevents prolonged losing streaks, preserving capital for better setups.
Dynamic Stop-Loss and Take-Profit:
Logic: Stops = entry ± ATR * multiplier (default: 1.0x, stopDist). TPs = entry ± ATR * 1.5x (profitDist). Longs: stop below, TP above; shorts: vice versa.
Impact: Adapts to volatility, keeping stops tight but realistic, with TPs targeting 1.5:1 reward/risk.
Max Bars in Trade:
Logic: Closes trades after 8 bars (default) if not already exited.
Impact: Frees capital from stagnant trades, maintaining efficiency.
Kill Switch Buffer Dashboard:
Logic: Shows smallest buffer ($300 - daily loss or $1000 - rolling DD). Displays 0 (red) if kill switch active, else buffer (green).
Impact: Real-time risk visibility, letting traders adjust dynamically.
Why It’s Brilliant:
- Kill switches and ATR-based exits create a safety net, rare in generic scripts.
- Customizable risk inputs (maxDailyLoss, dynamicStopMult) suit different account sizes.
- Buffer metric empowers disciplined trading, a DAFE signature.
4. Trade Entry and Exit Logic
The entry/exit rules are precise, filtered, and adaptive, ensuring trades are deliberate and profitable.
Entry Conditions:
Long Entry: bullDiv2, cooldown passed (canSignal), ATR filter passed (tradeOk), in US session (inSession), no kill switches (not killSwitchActive, not rollingKill), z-score OK (zOk), HTF trend bullish (bullTrendOK), no existing long (lastDirection != 1, position_size <= 0). Closes shorts first.
Short Entry: Same, but for bearDiv2, bearTrendOK, no long (lastDirection != -1, position_size >= 0). Closes longs first.
Adaptive Cooldown: Default 2 bars (cooldownBars). Doubles (up to 10) after a losing trade, resets after wins (dynamicCooldown).
Exit Conditions:
Stop-Loss/Take-Profit: Set per trade (ATR-based). Exits on stop/TP hits.
Other Exits: Closes if maxBarsInTrade reached, ATR filter fails, or kill switch activates.
Position Management: Ensures no conflicting positions, closing opposites before new entries.
Built To Be Reliable and Consistent:
- Multi-filtered entries minimize false signals, a stark contrast to basic scripts.
- Adaptive cooldown prevents overtrading, especially after losses.
- Clean position handling ensures smooth execution, even in fast markets.
5. DAFE Visuals
The visuals are a DAFE hallmark, blending function with clean flair to make signals intuitive and charts stunning.
Aurora Bands:
Display: Bands around price during divergences (bullish: below low, bearish: above high), sized by ATR * bandwidth (default: 0.5).
Colors: Aqua (bullish), fuchsia (bearish), with transparency tied to divStrengthNorm.
Purpose: Highlights divergence zones with a glowing, futuristic vibe.
Divergence Orbs:
Display: Large/small circles (aqua below for bullish, fuchsia above for bearish) when bullDiv2/bearDiv2 and canSignal. Labels show strength (0–1).
Purpose: Pinpoints entries with eye-catching clarity.
Gradient Background:
Display: Green (bullish), red (bearish), or gray (neutral), 90–95% transparent.
Purpose: Sets the market mood without clutter.
Strategy Plots:
- Stop/TP Lines: Red (stops), green (TPs) for active trades.
- HTF MA: Yellow line for trend context.
- Z-Score: Blue step-line (if enabled).
- Kill Switch Warning: Red background flash when active.
What Makes This Next-Level?:
- Visuals make complex signals (divergences, filters) instantly clear, even for beginners.
- DAFE’s unique aesthetic (orbs, bands) sets it apart from generic scripts, reinforcing originality.
- Functional plots (stops, TPs) enhance trade management.
6. Metrics Dashboard
The top-right dashboard (2x8 table) is your command center, delivering real-time insights.
Metrics:
Daily Loss ($): Current loss vs. day’s start, red if > $300.
Rolling DD ($): Drawdown vs. 100-bar peak, red if > $1000.
ATR Threshold: Current percATR, green if ATR exceeds, red if not.
Z-Score: Current value, green if within threshold, red if not.
Signal: “Bullish Div” (aqua), “Bearish Div” (fuchsia), or “None” (gray).
Action: “Consider Buying”/“Consider Selling” (signal color) or “Wait” (gray).
Kill Switch Buffer ($): Smallest buffer to kill switch, green if > 0, red if 0.
Why This Is Important?:
- Consolidates critical data, making decisions effortless.
- Color-coded metrics guide beginners (e.g., green action = go).
- Buffer metric adds transparency, rare in off-the-shelf scripts.
7. Beginner Guide
Beginner Guide: Middle-right table (shown once on chart load), explains aqua orbs (bullish, buy) and fuchsia orbs (bearish, sell).
Key Features:
Futures-Optimized: Tailored for MNQ, NQ, MES, ES with point-value adjustments.
Highly Customizable: Inputs for lookback, sensitivity, filters, and risk settings.
Real-Time Insights: Dashboard and visuals update every bar.
Backtest-Ready: Fixed qty and tick calc for accurate historical testing.
User-Friendly: Guide, visuals, and dashboard make it accessible yet powerful.
Original Design: DAFE’s unique logic and visuals stand out from generic scripts.
How to Use
Add to Chart: Load on a 5min MNQ/ES chart in TradingView.
Configure Inputs: Adjust instrument, filters, or risk (defaults optimized for MNQ).
Monitor Dashboard: Watch signals, actions, and risk metrics (top-right).
Backtest: Run in strategy tester to evaluate performance.
Live Trade: Connect to a broker (e.g., Tradovate) for automation. Watch for slippage (e.g., April 27, 2025 ES issues).
Replay Test: Use bar replay (e.g., April 28, 2025 NQ drop) to test volatility handling.
Disclaimer
Trading futures involves significant risk of loss and is not suitable for all investors. Past performance is not indicative of future results. Backtest results may not reflect live trading due to slippage, fees, or market conditions. Use this strategy at your own risk, and consult a financial advisor before trading. Dskyz (DAFE) Trading Systems is not responsible for any losses incurred.
Backtesting:
Frame: 2023-09-20 - 2025-04-29
Fee Typical Range (per side, per contract)
CME Exchange $1.14 – $1.20
Clearing $0.10 – $0.30
NFA Regulatory $0.02
Firm/Broker Commis. $0.25 – $0.80 (retail prop)
TOTAL $1.60 – $2.30 per side
Round Turn: (enter+exit) = $3.20 – $4.60 per contract
Final Notes
The Dskyz (DAFE) Aurora Divergence – Quant Master isn’t just a strategy—it’s a movement. Crafted with originality and driven by community passion, it rises above the flood of generic scripts to deliver a system that’s as powerful as it is beautiful. With its quant-grade logic, DAFE visuals, and robust risk controls, it empowers traders to tackle futures with confidence and style. Join the DAFE crew, light up your charts, and let’s outsmart the markets together!
(This publishing will most likely be taken down do to some miscellaneous rule about properly displaying charting symbols, or whatever. Once I've identified what part of the publishing they want to pick on, I'll adjust and repost.)
Use it with discipline. Use it with clarity. Trade smarter.
**I will continue to release incredible strategies and indicators until I turn this into a brand or until someone offers me a contract.
Created by Dskyz, powered by DAFE Trading Systems. Trade fast, trade bold.
SMA 8-18 Angle Measurement - Color, Size, and Alerts//@version=5
indicator("SMA 8-18 Angle Measurement - Color, Size, and Alerts", overlay=true)
// --- Calculate short-term (SMA 8) and mid-term (SMA 18) simple moving averages ---
// These two SMAs will be used to detect trend crossovers.
sma8 = ta.sma(close, 8)
sma18 = ta.sma(close, 18)
// --- Plot SMA 8 and SMA 18 on the chart for visual trend analysis ---
plot(sma8, title="SMA 8", color=color.blue)
plot(sma18, title="SMA 18", color=color.orange)
// --- Calculate the slope (momentum) of each SMA ---
// Measures how steeply each moving average is moving.
slope_sma8 = sma8 - sma8
slope_sma18 = sma18 - sma18
// --- Find the difference between the slopes of SMA 8 and SMA 18 ---
// This helps to measure the relative speed of trend changes between short and mid-term averages.
slope_difference = slope_sma8 - slope_sma18
// --- Convert slope difference into an angle in degrees ---
// Using arctangent to calculate the angle of divergence between the two SMAs.
angle_rad = math.atan(slope_difference)
angle_deg = angle_rad * (180 / math.pi)
// --- User settings for customization ---
// Allow users to enable color change and size change of labels based on angle behavior.
change_color = input.bool(true, title="Change Label Color Based on Angle Direction")
change_size = input.bool(true, title="Change Label Size Based on Angle Magnitude")
// --- Dynamic label color based on angle direction ---
// Positive angles = blue (bullish slope), Negative angles = red (bearish slope).
label_color = color.white
if change_color
label_color := angle_deg >= 0 ? color.blue : color.red
// --- Dynamic label size based on angle strength ---
// Small angles = smaller label, stronger angles = larger label.
label_size = size.normal
if change_size
if math.abs(angle_deg) < 10
label_size := size.small
else if math.abs(angle_deg) < 30
label_size := size.normal
else
label_size := size.large
// --- Detect crossover events between SMA 8 and SMA 18 ---
// Bullish crossover: SMA 8 crosses above SMA 18
// Bearish crossunder: SMA 8 crosses below SMA 18
bull_cross = ta.crossover(sma8, sma18)
bear_cross = ta.crossunder(sma8, sma18)
// --- Display only the latest crossover angle as a label on the chart ---
// Old labels are deleted to keep the chart clean and focused on the last event.
var label last_cross_label = na
if (bull_cross or bear_cross)
if not na(last_cross_label)
label.delete(last_cross_label)
last_cross_label := label.new(bar_index, high + 10, "Angle: " + str.tostring(angle_deg, format.mintick) + "°", color=color.new(color.purple, 0), style=label.style_label_down, textcolor=label_color, size=label_size)
// --- Define movement strength conditions for alerts ---
// Different alert triggers based on angle magnitude (weak, strong, very strong crossover).
strong_movement = (angle_deg > 30) or (angle_deg < -30)
weak_movement = (math.abs(angle_deg) < 5)
very_strong_movement = (math.abs(angle_deg) > 45)
// --- Set up alert conditions ---
// These alerts help traders react to strong or weak trend changes.
alertcondition(strong_movement, title="Strong Cross", message="SMA 8-18 Strong Angle Cross Detected!")
alertcondition(weak_movement, title="Weak Cross", message="SMA 8-18 Weak Angle Cross Detected!")
alertcondition(very_strong_movement, title="Very Strong Cross", message="SMA 8-18 Very Strong Angle Cross Detected!")
3-Day Breakout Strategy with Trend Change Exit//@version=5
strategy("3-Day Breakout Strategy with Trend Change Exit", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=100)
// === Calculate 3-day high/low (excluding current bar) ===
high3 = ta.highest(high , 3)
low3 = ta.lowest(low , 3)
// === Entry conditions ===
longEntry = close > high3
shortEntry = close < low3
// === Track position state ===
isLong = strategy.position_size > 0
isShort = strategy.position_size < 0
wasLong = nz(strategy.position_size > 0)
wasShort = nz(strategy.position_size < 0)
// === Exit conditions ===
// Exit on trend reversal (new signal)
longExit = shortEntry // Exit long position when a short signal occurs
shortExit = longEntry // Exit short position when a long signal occurs
// === Execute entries ===
buySignal = longEntry and not isLong and not isShort
sellSignal = shortEntry and not isLong and not isShort
if (buySignal)
strategy.entry("Long", strategy.long)
if (sellSignal)
strategy.entry("Short", strategy.short)
// === Execute exits on opposite signal (trend change) ===
if (isLong and longExit)
strategy.close("Long")
if (isShort and shortExit)
strategy.close("Short")
// === Exit markers (on actual exit bar only) ===
exitLongSignal = wasLong and not isLong
exitShortSignal = wasShort and not isShort
// === Plot entry signals only on the entry bar ===
plotshape(buySignal, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.labelup, text="BUY")
plotshape(sellSignal, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.labeldown, text="SELL")
// === Plot exit signals only on the exit bar ===
plotshape(exitLongSignal, title="Exit Long", location=location.abovebar, color=color.orange, style=shape.labeldown, text="EXIT")
plotshape(exitShortSignal, title="Exit Short", location=location.belowbar, color=color.orange, style=shape.labelup, text="EXIT")