TradingHelperLibLibrary "TradingHelperLib"
Trading Helper Library - Limit order, pip calculation and utility functions for trading bots
f_pipValue()
Calculates pip value based on symbol info
Returns: Pip value
f_pipsToPrice(pips)
Converts pip count to price difference
Parameters:
pips (float) : Number of pips
Returns: Price difference
calcExpireBarCount(minutesToExpire)
Converts minutes to bar count based on timeframe
Parameters:
minutesToExpire (float) : Duration in minutes
Returns: Bar count
calcLimitPrice(isLong, signalPrice, deviation, deviationType)
Calculates limit order price with deviation
Parameters:
isLong (bool) : True for long, false for short
signalPrice (float) : Signal price
deviation (float) : Deviation amount
deviationType (string) : Deviation type ("USDT" or "%")
Returns: Limit price
checkLimitFill(isLong, limitPrice)
Checks if limit order is filled
Parameters:
isLong (bool) : True for long, false for short
limitPrice (float) : Limit price to check
Returns: True if filled
f_multiplier(lvl, mode)
Calculates DCA multiplier based on level and mode
Parameters:
lvl (int) : DCA level
mode (string) : Multiplier mode ("Sabit", "Fibonacci", "Martingale", etc.)
Returns: Multiplier value
f_pctToPrice(pct, basePrice)
Converts percentage value to price difference
Parameters:
pct (float) : Percentage value (e.g. 2.0 = 2%)
basePrice (float) : Reference price
Returns: Price difference
f_priceChange_toPct(priceChange, basePrice)
Converts price change to percentage
Parameters:
priceChange (float) : Price difference
basePrice (float) : Reference price
Returns: Percentage value
calcMargin(notional, leverage)
Calculates margin from notional value
Parameters:
notional (float) : Trade size (e.g. $1000)
leverage (int) : Leverage value (e.g. 100)
Returns: Margin value
calcNotional(margin, leverage)
Calculates notional from margin
Parameters:
margin (float) : Collateral value
leverage (int) : Leverage value
Returns: Notional value
calcLiqPriceLongSimple(avgPrice, leverage)
Calculates simple liquidation price for Long position
Parameters:
avgPrice (float) : Average entry price
leverage (int) : Leverage value
Returns: Estimated liquidation price
calcLiqPriceShortSimple(avgPrice, leverage)
Calculates simple liquidation price for Short position
Parameters:
avgPrice (float) : Average entry price
leverage (int) : Leverage value
Returns: Estimated liquidation price
calcPnlLong(entryPrice, currentPrice, notional)
Calculates Long position PNL
Parameters:
entryPrice (float) : Entry price
currentPrice (float) : Current price
notional (float) : Position size
Returns: PNL value
calcPnlShort(entryPrice, currentPrice, notional)
Calculates Short position PNL
Parameters:
entryPrice (float) : Entry price
currentPrice (float) : Current price
notional (float) : Position size
Returns: PNL value
calcFee(notional, feeRate)
Calculates trading fee
Parameters:
notional (float) : Trade size
feeRate (float) : Fee rate in percentage (e.g. 0.1 = 0.1%)
Returns: Fee value
インジケーターとストラテジー
5EMA + Volume Spikes + Ultra Fast Scalp V3Description
This indicator combines 5 EMAs, volume spike detection, and an ultra-fast scalping system designed for short-term trading.
The scalping logic uses a fixed + ATR hybrid price deviation, filtered by RSI and CCI to capture extreme overbought/oversold conditions while avoiding overheated zones.
It also includes previous day levels (high, low, body high/low) extended into the current session for clear intraday reference.
Optimized for fast scalping and momentum fades on lower timeframes.
200 EMA mit versetztem LabelAll right—indexing Web 2.0 links is a very typical SEO use case. I'll show you realistically what works, what doesn't, and how you can build your own (semi-automatic) indexing tool without taking unnecessary risks.
chatgpt.com
quantyrsiThis indicator turns classic RSI into a premium, AI-styled spectro
neon ribbon with smooth color drift and a cinematic plasma glow. A
rainbow motion trail highlights momentum and makes shifts in strength
instantly readable without clutter. BIG and HUGE volume-spike events
are marked with sparse, high-contrast rings so standout activity is
impossible to miss. Clean glass-panel ambiance, subtle scanlines, and
a minimal scale deliver a professional HUD look that stays elegant on
any chart. Designed for traders who want both style and signal clarity
in one sleek oscillator.
ZION Momentum Flow [wjdtks255]🚀 ZION Momentum Flow
This is a trend-strength oscillator designed to visualize market momentum through a refined RSI logic. It helps traders identify the exact moment when market energy is accelerating or cooling down.
Key Features:
Visual Momentum: Uses a color-coded histogram to represent trend intensity (Green for Bullish, Red for Bearish).
Two-Tone Strength: Darker colors indicate standard movement, while bright neon colors signal high-energy breakouts beyond the threshold.
Built-in Alerts: Supports alerts for momentum spikes, allowing you to catch trend starts without staring at the screen.
ZION Trend Strike [wjdtks255]🚀 ZION Trend Strike
This is an advanced trend-following signal indicator designed to work in perfect harmony with the ZION Momentum Flow. It filters market noise and provides precise entry/exit points based on momentum synergy.
Key Features:
Trend Strike Signals: Provides clear BUY/SELL labels when price action aligns with momentum energy.
Dynamic Trend Guide: A color-switching EMA line that helps you visualize the current trend direction at a glance.
Synergy Optimization: Best used as a set with ZION Momentum Flow to avoid false breakouts.
Multilingual Input: Easy-to-use settings menu with both English and Korean labels.
SOPR Candles - Custom Mid-LineSOPR Candle with Customizable Mid-Line
On-chain SOPR (Spent Output Ratio) indicator as an oscillator. Customizable centerline and MAs makes signals easy to identify.
Features
SOPR displayed as a column-style oscillator
Customizable SOPR center (middle line)
Optional SMA or EMA smoothing
Clear green/red coloring
How to Use
Values above/below center Indicate profit/loss realization
Risk Disclaimer
This indicator is provided for educational and informational purposes only and does not constitute financial, investment, or trading advice. Cryptocurrency markets are highly volatile, and trading involves significant risk. Past performance is not indicative of future results. You are solely responsible for your trading decisions and risk management. Always conduct your own research and consider your financial situation before trading.
VX Term StructureThe VX Term Structure Monitor is an advanced visualization tool designed specifically for volatility traders who need to instantly recognize shifts in market structure. By comparing the current VIX Futures Term Structure against the previous trading day's close, this indicator provides a clear, real-time* view of the VIX Spot Index and the next available VX futures contracts. A key visual feature is the "Daily Drift" analysis, which automatically highlights the difference between today's curve (Cyan) and yesterday's curve (Gray/Dashed) with red or green fills, allowing you to immediately spot whether volatility is rising or falling across the term structure.
Unlike standard indicators that rely solely on the Spot price, this script utilizes professional-grade logic to classify market stress into three distinct stages. It identifies a normal Contango environment (Green) when the Front Month (M1) is trading below the Second Month (M2), indicating a calm market where long volatility positions typically suffer from negative roll yield. The system issues a Spot Warning (Orange) if the Spot index overheats and exceeds M1 while the futures curve remains in Contango, often an early signal of building stress. Finally, it detects critical Backwardation (Red) when the futures curve physically inverts (M1 > M2), signaling that market participants are paying a premium for immediate protection.
Usage Note: Due to technical limitations in detecting contract expirations automatically, users must manually select the current "Front Month" contract (e.g., "G (Feb)") in the indicator settings to ensure correct alignment. Users can also configure server-side alerts to trigger specifically when the market flips into Backwardation.
*Note: To view real-time data for VX futures, a paid data subscription to CBOE (CFE) is required on TradingView. Otherwise, the data may be delayed.
Disclaimer: This tool is for educational and informational purposes only and does not constitute financial advice.
3C Breakout PRO Investing involves risk. Study carefully before making an investment decision.
Access may be suspended or changed later.
Thank you GJ daytrad
Pivots + FVG + Liquidity Sweeps (Smart Entry)its a scrpt expermental to see if it works its a scrpt expermental to see if it worksits a scrpt expermental to see if it worksits a scrpt expermental to see if it works
Pivots + FVG + Liquidity Sweeps (Smart Entry)//@version=5
indicator("Pivots + FVG + Liquidity Sweeps (Smart Entry)", overlay=true, max_labels_count=500, max_boxes_count=500)
// ===== INPUTS =====
pivotLeft = input.int(5, "Pivot left bars", minval=1)
pivotRight = input.int(5, "Pivot right bars", minval=1)
sweepLookback = input.int(20, "Lookback for sweep detection (bars)")
sweepAtrMultiplier = input.float(1.0, "Sweep strength (ATR multiplier)")
fvg_max_age = input.int(200, "FVG box expiry (bars)")
show_pivots = input.bool(true, "Show pivot markers")
show_sweeps = input.bool(true, "Show liquidity sweeps")
show_fvgs = input.bool(true, "Show FVG boxes")
require_sweep_for_entry = input.bool(false, "Require recent sweep for smart entry")
confirmation_type = input.string("Bullish/Bearish Engulf", "Confirmation type", options= )
fvg_min_width = input.int(1, "Min FVG width (ticks)", minval=0)
// ===== ATR =====
atrLen = input.int(14, "ATR length")
atr = ta.atr(atrLen)
// ===== PIVOTS =====
ph = ta.pivothigh(high, pivotLeft, pivotRight)
pl = ta.pivotlow(low, pivotLeft, pivotRight)
if show_pivots
if not na(ph)
label.new(bar_index - pivotRight, ph, "PH", style=label.style_label_down, color=color.red, textcolor=color.white, size=size.small)
if not na(pl)
label.new(bar_index - pivotRight, pl, "PL", style=label.style_label_up, color=color.green, textcolor=color.white, size=size.small)
// ===== FVG STRUCT =====
type FVG
float top
float bottom
int born_bar
bool bullish
var FVG fvgs = array.new()
var box fvgBoxes = array.new()
// ===== FVG DETECTION =====
if barstate.isconfirmed
prevHigh = high
prevLow = low
if low > prevHigh and (low - prevHigh) >= syminfo.mintick * fvg_min_width
array.push(fvgs, FVG.new(low, prevHigh, bar_index, true))
if high < prevLow and (prevLow - high) >= syminfo.mintick * fvg_min_width
array.push(fvgs, FVG.new(prevLow, high, bar_index, false))
// cleanup old FVGs
for i = array.size(fvgs) - 1 to 0
f = array.get(fvgs, i)
if bar_index - f.born_bar > fvg_max_age
array.remove(fvgs, i)
// ===== DRAW FVG BOXES =====
if show_fvgs
for i = 0 to array.size(fvgBoxes) - 1
box.delete(array.get(fvgBoxes, i))
array.clear(fvgBoxes)
for i = 0 to array.size(fvgs) - 1
f = array.get(fvgs, i)
col = f.bullish ? color.new(color.green, 85) : color.new(color.red, 85)
bx = box.new(f.born_bar, f.top, bar_index, f.bottom, bgcolor=col, border_width=0)
array.push(fvgBoxes, bx)
// ===== LIQUIDITY SWEEPS =====
var int lastBullSweepBar = na
var int lastBearSweepBar = na
priorHigh = ta.highest(high , sweepLookback)
priorLow = ta.lowest(low , sweepLookback)
bullSweep = high > priorHigh + sweepAtrMultiplier * atr and close < priorHigh
bearSweep = low < priorLow - sweepAtrMultiplier * atr and close > priorLow
if barstate.isconfirmed
if bullSweep
lastBullSweepBar := bar_index
if show_sweeps
label.new(bar_index, high, "Bull Sweep", style=label.style_label_down, color=color.orange, textcolor=color.white, size=size.small)
if bearSweep
lastBearSweepBar := bar_index
if show_sweeps
label.new(bar_index, low, "Bear Sweep", style=label.style_label_up, color=color.orange, textcolor=color.white, size=size.small)
// ===== CONFIRMATION =====
isBullEngulf() => close > open and open < close and close > open
isBearEngulf() => close < open and open > close and close < open
isAnyBull() => close > open
isAnyBear() => close < open
// ===== SMART ENTRY =====
for i = array.size(fvgs) - 1 to 0
f = array.get(fvgs, i)
inFvg = close <= f.top and close >= f.bottom
if inFvg
okSweep = true
if require_sweep_for_entry
okSweep := f.bullish ? (not na(lastBullSweepBar) and bar_index - lastBullSweepBar <= sweepLookback) : (not na(lastBearSweepBar) and bar_index - lastBearSweepBar <= sweepLookback)
if okSweep
confirm = confirmation_type == "Bullish/Bearish Engulf" ? (f.bullish ? isBullEngulf() : isBearEngulf()) : confirmation_type == "Close Above/Below FVG" ? (f.bullish ? close > f.top : close < f.bottom) : (f.bullish ? isAnyBull() : isAnyBear())
if confirm
if f.bullish
label.new(bar_index, low, "Smart Long", style=label.style_label_up, color=color.lime, textcolor=color.black, size=size.normal)
else
label.new(bar_index, high, "Smart Short", style=label.style_label_down, color=color.fuchsia, textcolor=color.white, size=size.normal)
break
Ripster EMA Clouds with MTFCredits & Origins:
This script is a modification of the widely popular EMA Clouds system originally created by @Ripster47. Full credit goes to him for the strategy and original concept. This version simply adds a quality-of-life feature for traders who use multi-timeframe analysis.
What is this Indicator?
The Ripster EMA Clouds system uses overlapping Exponential Moving Averages (EMAs) to visualize trends, momentum, and dynamic support/resistance zones. The "clouds" differ in color to indicate bullish or bearish trends, acting as a visual guide for keeping you on the right side of the trade.
What is New in This Version? (MTF Capability)
The standard version of this indicator calculates EMAs based on your current chart timeframe. If you switch from a 10-minute chart to a 1-minute chart, the clouds change completely.
I have added a "Fixed Timeframe" variable/input that allows you to "lock" the clouds to a specific timeframe, regardless of what chart you are viewing.
Why is this useful? This allows for true Multi-Timeframe (MTF) scalping.
Example: You can set the clouds to look at the 10-minute trend (identifying major support levels) but execute your entries on a 1-minute chart.
The clouds will remain locked to the 10-minute data, giving you the "big picture" view while you trade the micro-movements.
How to Use
Open the indicator settings.
Go to the Inputs tab.
Find the "Fixed Timeframe" option at the top.
Leave Empty (Default): The indicator behaves exactly like the original (adjusts to your chart).
Select a Timeframe (e.g., 10 Minutes): The clouds will lock to the 10-minute EMAs, even if you switch your chart to 1-minute or 5-seconds.
Note on Visuals When viewing Higher Timeframe (HTF) clouds on a Lower Timeframe (LTF) chart, the clouds will appear to have a "stepped" or "ladder-like" appearance. This is normal and accurate. It represents the single EMA value holding constant for that entire higher-timeframe period. This helps you see the true support level rather than a smoothed, repainted line.
8 EMA. 21 EMA. VWAP This trio is popular for momentum, scalping, and trend-following on 1m–15m charts (stocks, futures, indices).
1. Trend & Bias Filter
• Overall bullish when: Price > VWAP and 8 EMA > 21 EMA
• Overall bearish when: Price < VWAP and 8 EMA < 21 EMA
VWAP adds volume context — many ignore EMA signals against the VWAP side.
2. Crossover Signals (Primary Entries)
• Bullish crossover: 8 EMA crosses above 21 EMA → potential long (especially if price is already above VWAP)
• Bearish crossover: 8 EMA crosses below 21 EMA → potential short (especially if price is below VWAP)
VWAP confirmation reduces whipsaws: only take longs above VWAP, shorts below it.
3. Pullback / Retest Entries (Higher Probability)
• In an uptrend (price > VWAP, 8 > 21): Wait for dips to the 8 EMA (or sometimes 21 EMA) → buy the bounce.
• In a downtrend: Wait for rallies to the 8 EMA → short the rejection.
VWAP often acts as a magnet or pivot — price gravitating toward it can signal mean-reversion trades.
Williams AlligatorSleeping: When the three lines are intertwined, the market is range-bound (the Alligator is sleeping). Avoid trading.
Eating: When the Green line (Lips) crosses out of the Red (Teeth) and Blue (Jaw) lines, the trend is beginning.
Open Mouth: If Green > Red > Blue, it is an Uptrend. If Blue > Red > Green, it is a Downtrend.
Weighted CCI Oscillator [SeerQuant]Weighted CCI Oscillator (WCCI)
The Weighted CCI Oscillator (WCCI) is an enhanced CCI-style deviation oscillator that builds on the classic Commodity Channel Index framework by introducing adaptive weighting and configurable smoothing. By dynamically scaling deviation based on a selected market “weight” (Volume, Momentum, Volatility, or Reversion Factor), WCCI helps trend strength and regime shifts stand out more clearly, while still retaining the familiar CCI-style structure and ±200 extreme zones.
⚙️ How It Works
WCCI starts by calculating a baseline (your chosen moving average type) of the selected CCI source (Typical Price / HLC3, or a custom input source). It then measures how far price deviates from that baseline, and applies an adaptive weight to that deviation based on your selected weighting method.
The weighting is normalized for stability so it remains usable across different assets and changing regimes, then clamped to prevent abnormal spikes from distorting the oscillator. The weighted deviation is normalized by a weighted mean absolute deviation term (using the standard CCI constant k), producing a CCI-like oscillator that responds differently depending on the “state” of the market.
Trend logic is defined using a neutral zone around the 0 midline: bullish when WCCI holds above (0 + Neutral Zone), bearish when it holds below (0 - Neutral Zone), and neutral while it remains inside that band. A smoothed WCCI line is also provided for cleaner confirmation.
✨ Customizable Settings
WCCI is designed to be tuned without overcomplication. You can choose the CCI source mode (Typical Price / HLC3 or Input Source), set the calculation length, and apply smoothing using your preferred moving average type (SMA, EMA, RMA, HMA, DEMA, TEMA, etc.).
The weighting method is the key differentiator:
Volume weighting emphasizes participation and activity.
Momentum weighting emphasizes impulse and directional pressure.
Volatility weighting emphasizes expansion/contraction phases.
Reversion Factor weighting responds inversely to variance, biasing toward mean-reversion conditions.
On the style side, you can select a preset colour scheme (Default/Modern/Cool/Monochrome) or enable custom bull/bear/neutral colours. Candle coloring is optional, and you can choose whether candles follow the raw WCCI or the smoothed WCCI.
🚀 Features and Benefits
WCCI provides a CCI-style oscillator that adapts to market conditions instead of treating every regime the same. The weighting engine helps meaningful moves stand out when conditions justify it, while the neutral-zone framework reduces noise and improves readability compared to relying purely on midline flips. With flexible smoothing, clean state transitions, optional candle coloring, and clear ±200 extreme markers, WCCI works well as a trend filter, confirmation layer, or regime signal alongside other systems.
📜 Disclaimer
This indicator is for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Always consult a licensed financial advisor before making trading decisions. Use at your own risk.
Indian Equities Theme Tracker [EWT] - Sector Rotation HeatmapIdentify where the "Smart Money" is flowing in the Indian Markets.
The Indian Equities Theme Tracker is a powerful visual dashboard designed for NSE traders and investors to monitor sector rotation and relative strength in real-time. By tracking the most liquid Exchange Traded Funds (ETFs), this tool provides a birds-eye view of the Indian economy—from core benchmarks like Nifty 50 and Nifty 500 to high-growth themes like Defence, EV, Tourism, and Energy.
In modern markets, capital doesn't move into all stocks at once; it rotates between sectors. This script helps you spot the leaders and laggards across five different timeframes, ensuring you are always positioned in the strongest themes.
🚀 Key Features :
23+ Essential Themes: Tracks Broad Market, Market Caps (Mid/Small), Sectors (IT, Bank, Auto, Metal), and Narratives (Defence, Tourism, EV, Energy).
Dynamic Performance Sorting: Automatically reorders the table based on your selected lookback (1 Day, 1 Week, 1 Month, 3 Months, or YTD).
Heatmap Logic: Intuitive color coding helps you instantly identify extreme bullishness or bearishness across the board.
Liquidity Focused: Uses the most liquid NSE ETFs (BeES and equivalent) to ensure the data is accurate and reflects tradeable prices.
Pro UI Design: A clean, professional dashboard that can be positioned anywhere on your chart without cluttering your price action analysis.
📊 Themes Included :
Benchmarks: Nifty 500, Nifty 50, Nifty Next 50.
Market Caps: Midcap 150, Smallcap 250.
Sectors: Private & PSU Banks, IT, Pharma, Healthcare, FMCG, Auto, Metals, Infra, Realty.
Thematic/Narratives: Defence, Tourism, Energy, EV & New Age Automotive, Consumption.
Safe Havens: Gold & Silver.
🛠️ How to use :
Timeframe: Switch to the Daily (D) timeframe for the best results.
Settings: Use the inputs to change the table position (Top/Middle/Bottom) and the sorting criteria.
Strategy: Look for themes that are consistently at the top of the "1 Month" and "3 Month" lists—these are your structural leaders. Use "1 Day" to spot quick tactical bounces.
Disclaimer: This indicator is for educational and informational purposes only and does not constitute financial advice. Always perform your own due diligence.
MAG7 and VIXMAG7 and VIX is a institutional-grade market breadth and sentiment dashboard designed specifically for Nasdaq (NQ) traders. Instead of relying on a single price chart, this indicator provides a "look under the hood" of the market by tracking the volatility of the entire index and the individual performance of the seven stocks that drive over 40% of the Nasdaq 100's movement.
Core Components
1. The Fear Gauges (Volatility Monitoring)
This section tracks the VIX (S&P 500 Volatility) and VXN (Nasdaq Volatility).
The Logic: Volatility and price usually have an inverse relationship.
Risk-On: When these numbers are Green (negative %), volatility is dropping, which usually provides a "tailwind" for stocks to rise.
Risk-Off: When these numbers turn Red (positive %), fear is entering the market, often preceding a sharp sell-off or indicating that a rally is built on "shaky ground."
2. Tech Leaders (Market Breadth)
This monitors the Mag7 (NVDA, AAPL, MSFT, AMZN, GOOG, META, TSLA). The dashboard calculates a Weighted Average of these leaders to show the true strength of the "engines" behind the NQ.
Weights: NVDA, AAPL, and MSFT are given 1.5x weight because their market caps have the highest impact on the index.
Individual Heatmap: Each stock has its own cell that changes color based on its performance relative to the daily open.
Using the Dashboard for Divergence Trading
The primary value of this indicator is spotting Divergence, which occurs when the NQ price is lying to you but the internal data shows the truth.
Bearish Breadth Divergence: The NQ hits a new high, but the Tech Leaders Average is negative, and most individual cells (like NVDA or MSFT) are red. This indicates the move is "thin" and likely a bull trap.
Bullish Breadth Divergence: The NQ is flushing to new lows, but the Tech Leaders are starting to turn green or the Fear Gauges are rapidly dropping. This often signals that a bottom is being put in.
Dashboard Placement & Aesthetics
Top Center Positioning: Placed by default at the top-center of your chart to keep your eyes on the price action while maintaining peripheral awareness of the macro data.
Large UI: Designed for high-resolution screens so you can read the percentage shifts without squinting during fast-moving "Turbo" sessions.
Real-Time Updates: The data is fetched dynamically using request.security, ensuring the "Heatmap" reflects current intraday strength rather than just yesterday's close.
Macro 6-PackMacro 6-Pack dashboard: SPX momentum, VIX, HY credit spread, 10Y yield shifts, DXY trend, and 2s10s curve.
Quant Labs Edge Filter (Community Edition)A market-structure filter designed to identify when no real edge exists.
Edge Filter evaluates price location relative to structure to define market posture — long bias, short bias, or stand aside. It does not generate trade signals and is intentionally designed to reduce overtrading.
Clear Posture States
Near Highs — Short Bias
Near Lows — Long Bias
No Edge — Stand Aside
When edge is absent, patience is the strategy.
Why It Stands Out
Most indicators encourage action.
Edge Filter encourages restraint.
Its purpose is to protect capital, attention, and decision quality by filtering out low-quality environments.
Community Edition
This version publishes the core logic openly for transparency and education.
Private access versions may exist for traders seeking continuity and stewardship.
Bottom Line
Trade less.
Trade better.
Wait for edge.
— QuantLabs
Reversal Detection v3.1 - Real-Time Pro (Non-Repainting)Reversal Detection Pro v3.1 - Universal Non-Repainting
ACKNOWLEDGMENTS
Special thanks to @ksiva100 for extensive testing and detailed feedback on v3.0 that led to the major improvements in v3.1. Their real-world testing on GC, ES, NQ, NG, and CL futures across 3-5 minute timeframes identified critical issues with sensitivity scaling and helped shape the universal ATR-adaptive system that makes this version work seamlessly across all instruments and timeframes.
Community feedback like this is invaluable in creating better tools for all traders.
FULL DESCRIPTION:
OVERVIEW
Reversal Detection Pro v3.1 is a non-repainting reversal identification system designed for futures trading across all timeframes. The indicator uses ATR-adaptive thresholds combined with a zigzag-based pivot detection algorithm to identify confirmed price reversals. A triple EMA trend filter provides directional context, while optional supply/demand zones highlight key reversal areas.
The indicator automatically scales to any instrument's price level and volatility through its ATR-adaptive mechanism, eliminating the need for manual threshold adjustments when switching between instruments or timeframes.
KEY FEATURES
Non-Repainting Confirmation System
All confirmed reversal signals are final and do not disappear or move to different bars. The indicator includes an optional preview mode that shows potential reversals before confirmation, clearly labeled to distinguish them from confirmed signals. Users can add extra confirmation bars for additional validation before signals appear.
ATR-Adaptive Sensitivity
The indicator uses Average True Range (ATR) as its primary sensitivity mechanism. Five preset sensitivity levels (Very High, High, Medium, Low, Very Low) multiply the ATR by factors ranging from 0.8x to 3.5x. This approach automatically adapts to:
Different price levels (works equally on $25 micro futures and $25,000 instruments)
Varying volatility conditions (calm vs. volatile markets)
Multiple timeframes (1-minute through daily charts)
Different trading sessions (regular hours vs. after-hours)
Triple EMA Trend Detection
Three exponential moving averages (9, 14, and 21 periods) create a trend identification system. The info table displays current trend status as BULLISH, BEARISH, or NEUTRAL. Strong signals occur when a reversal aligns with the prevailing trend direction.
Supply and Demand Zones
Optional rectangular zones display at confirmed pivot points. These zones are color-coded (green for demand/support, red for supply/resistance) and can be configured for thickness, extension length, and maximum number displayed. Zones can be toggled on or off independently of reversal signals.
Information Display Table
A customizable table shows real-time indicator settings including:
Current signal mode (Confirmed Only, Preview, or Both)
Active sensitivity preset
ATR multiplier value
Percentage threshold
Current ATR reading
Calculated reversal threshold
Current trend status
Comprehensive Alert System
Eight different alert conditions cover all signal types:
Bullish reversal confirmed
Bearish reversal confirmed
Any reversal (combined)
EMA buy signal (trend change to bullish)
EMA sell signal (trend change to bearish)
Trend changed to bullish
Trend changed to bearish
Strong bullish (reversal + bullish trend aligned)
Strong bearish (reversal + bearish trend aligned)
HOW IT WORKS
Reversal Detection Algorithm
The indicator tracks price using a zigzag methodology that requires a minimum reversal amount before confirming a pivot. This reversal threshold is calculated using three components:
ATR Component (Primary): ATR × Sensitivity Multiplier
Percentage Component (Safety Floor): Close Price × Percentage Threshold
Absolute Component (Minimum Floor): Fixed dollar/point amount
The reversal threshold equals whichever of these three values is largest. This ensures appropriate sensitivity across all instruments and timeframes.
Pivot Confirmation Process
Price must move in one direction to establish a high or low pivot point. When price reverses by the minimum threshold amount, that pivot is confirmed. A reversal signal triggers when price subsequently breaks through the previous confirmed pivot in the opposite direction.
Signal Generation
Green labels and lines: Bullish reversal confirmed (buy signal)
Red labels and lines: Bearish reversal confirmed (sell signal)
Preview labels (if enabled): Potential reversals not yet confirmed (semi-transparent)
Trend Filter Operation
The 9/14/21 EMA system identifies trend direction:
BULLISH: 9 EMA > 14 EMA > 21 EMA, with price above 9 EMA
BEARISH: 9 EMA < 14 EMA < 21 EMA, with price below 9 EMA
NEUTRAL: EMAs not in sequential order
Strong signals occur when reversals align with trend direction.
HOW TO USE
Initial Setup
Add Indicator to Chart
Search "Reversal Detection Pro v3.1" in TradingView indicators
Click to add to any futures chart
Default settings work immediately on any instrument/timeframe
Choose Signal Mode (Signal Controls section)
Confirmed Only: Shows only final, non-repainting signals (recommended for trading)
Confirmed + Preview: Shows both confirmed and potential signals
Preview Only: Shows only potential signals (educational/learning mode)
Set "Extra Confirmation Bars" to 0 for immediate signals, or 1-5 for additional validation
Select Sensitivity (Main Controls section)
Very High: Maximum signals, catches small swings (0.8× ATR)
High: Active trading with more opportunities (1.2× ATR)
Medium: Balanced quality and quantity - recommended starting point (2.0× ATR)
Low: Conservative, higher quality signals (2.8× ATR)
Very Low: Major reversals only, highest quality (3.5× ATR)
Recommended Settings by Timeframe
1-2 Minute Charts (Ultra-Short Scalping)
Sensitivity: High or Very High
Confirmation Bars: 0
Expected: 10-20+ signals per session
Best for: Quick scalps, high-frequency trading
3-5 Minute Charts (Active Day Trading)
Sensitivity: Medium or High
Confirmation Bars: 0-1
Expected: 5-15 signals per session
Best for: Standard scalping, intraday swings
15-30 Minute Charts (Swing Trading)
Sensitivity: Medium or Low
Confirmation Bars: 0-1
Expected: 2-8 signals per session
Best for: Larger intraday swings, part-time trading
1-4 Hour Charts (Position Trading)
Sensitivity: Low or Very Low
Confirmation Bars: 1-2
Expected: 1-5 signals per week
Best for: Multi-day position trades
Daily Charts (Long-Term Swing Trading)
Sensitivity: Very Low
Confirmation Bars: 1-3
Expected: 1-4 signals per month
Best for: Weekly to monthly swing trades
Customizing Display
Supply/Demand Zones (Zones section)
Enable "Show Supply/Demand Zones" to display rectangular areas at pivots
Adjust "Number of Zones" to control how many recent zones appear (0-20)
Set "Zone Box Extension" for forward projection length (5-100 bars)
Modify "Zone Thickness" as percentage of price (0.01%-0.2%)
Visual Elements (Labels section)
"Stop Line Extension": Length of horizontal lines at reversal points (1-50 bars)
"Maximum Lines to Display": Limits historical lines visible (3-50)
"Label Size": Small, Normal, or Large text
Information Table (Info Table section)
Toggle "Show Info Table" on/off
Choose "Table Position": Six position options
Select "Table Size": Tiny through Huge
Setting Up Alerts
Click the "Alert" button (clock icon) on TradingView
Select "Reversal Detection Pro v3.1" from Condition dropdown
Choose specific alert type or "Any REVERSAL" for all signals
Set "Options" to "Once Per Bar Close" (recommended)
Configure notifications (popup, email, SMS, webhook)
Name your alert and click "Create"
For highest-probability trades, use "STRONG Bullish Signal" and "STRONG Bearish Signal" alerts which combine reversals with trend confirmation.
Advanced Settings (Custom Mode)
For experienced users, selecting "Custom" sensitivity unlocks manual control:
Calculation Method: "average" for smoother signals, "high_low" for more responsive
Percentage Reversal: Manual percentage threshold (0.01%-1.0%)
Absolute Reversal: Fixed dollar/point minimum ($0.01-$50)
ATR Multiplier: Manual ATR multiplication factor (0.1-10.0)
ATR Length: Period for ATR calculation (1-50, standard is 14)
Average Length: Smoothing period for high/low when using "average" method (1-50)
Trading Workflow Example
Identify Market Context
Check info table for trend status (BULLISH, BEARISH, NEUTRAL)
Note current ATR and reversal threshold values
Observe recent reversal signal quality
Wait for Signal
Green label = potential long entry (bullish reversal)
Red label = potential short entry (bearish reversal)
Horizontal line shows reversal pivot level
Evaluate Signal Quality
Strongest signals align with trend (STRONG alerts)
Check if reversal occurs at supply/demand zone
Verify adequate volume on reversal bar
Execute Trade
Enter on signal confirmation
Place stop loss below/above reversal pivot line
Target next supply/demand zone or opposing reversal signal
Manage Position
Trail stop loss with price movement
Take partial profits at zones
Exit on opposing reversal signal or stop hit
Multi-Timeframe Analysis
For optimal results, use multiple timeframes:
Higher timeframe (3-5× larger): Determine overall trend direction
Trading timeframe: Execute trades on reversal signals
Lower timeframe (3-5× smaller): Fine-tune entries and exits
Example: Trade ES futures
1 Hour chart: Identify BULLISH trend
5 Minute chart: Take only green (long) reversal signals
1 Minute chart: Time precise entry after signal appears
IMPORTANT USAGE NOTES
Understanding Signal Timing
This is a reversal identification indicator, not a prediction tool. Signals appear AFTER price begins reversing from a pivot, not at the exact top or bottom. This is intentional design - the confirmation process ensures reliability at the cost of capturing the absolute extremes.
Timeframe and Signal Frequency
Higher timeframes naturally produce fewer signals. This is correct behavior:
Daily charts: 1-4 signals per month is normal
1-hour charts: 1-5 signals per week is normal
5-minute charts: 5-15 signals per day is normal
1-minute charts: 10+ signals per hour is normal
If you want more signals, either use a lower timeframe or higher sensitivity setting.
Optimal Market Conditions
Best performance occurs during:
Regular trading hours (RTH) with normal volume
Trending or ranging markets
Liquid instruments with tight spreads
Normal volatility environments
Reduced performance may occur during:
Major economic announcements (FOMC, NFP, CPI)
Opening gaps or halted trading
Extremely thin markets (after-hours, holidays)
Flash crash or extreme volatility events
Risk Management Requirements
Always use stop losses (place beyond reversal pivot)
Position size appropriately (1-2% account risk per trade)
Account for commissions and slippage in planning
Never trade with funds you cannot afford to lose
Paper trade new settings before using real capital
Not a Complete Trading System
This indicator identifies potential reversal points but should be used as part of a complete trading plan including:
Overall market analysis and context
Risk/reward assessment
Position sizing methodology
Trade management rules
Psychological discipline
TECHNICAL SPECIFICATIONS
Calculation Method
Base Algorithm: Modified zigzag with adaptive thresholds
Primary Sensitivity: ATR-based multiplier system
Trend Filter: Triple EMA (9/14/21 exponential moving averages)
Price Calculation: Configurable (high/low or EMA-smoothed high/low)
Confirmation: Configurable delayed confirmation (0-5 bars)
Resource Usage
Maximum Boxes: 50 (for supply/demand zones)
Maximum Lines: 200 (user-configurable display limit)
Maximum Labels: 100 (for reversal markers)
Calculation Speed: Fast (minimal computational overhead)
Compatibility
TradingView Pine Script: Version 6
Chart Types: All (candlestick, bar, line, etc.)
Instruments: All futures contracts (optimized for liquid markets)
Timeframes: All (1 second through 1 month)
Features: Alerts, Strategy Tester compatible
SUITABLE INSTRUMENTS
Micro E-mini Futures
MES (Micro E-mini S&P 500), MNQ (Micro E-mini Nasdaq-100), MYM (Micro E-mini Dow), M2K (Micro E-mini Russell 2000), MGC (Micro Gold), MCL (Micro Crude Oil)
E-mini Futures
ES (E-mini S&P 500), NQ (E-mini Nasdaq-100), YM (E-mini Dow), RTY (E-mini Russell 2000)
Commodities
GC (Gold), SI (Silver), CL (Crude Oil), NG (Natural Gas), HG (Copper), ZW (Wheat), ZC (Corn), ZS (Soybeans)
Indices
SPX (S&P 500 Index), NDX (Nasdaq-100 Index), DJI (Dow Jones Industrial Average)
Currencies
6E (Euro FX), 6B (British Pound), 6J (Japanese Yen), 6A (Australian Dollar)
Interest Rates
ZB (30-Year T-Bond), ZN (10-Year T-Note), ZF (5-Year T-Note)
Crypto Futures
BTC (Bitcoin Futures), ETH (Ethereum Futures)
The ATR-adaptive system works on any liquid futures contract. Results may vary on extremely thin markets or instruments with unusual price structures.
LIMITATIONS AND CONSIDERATIONS
What This Indicator Does
Identifies confirmed price reversals after they begin
Adapts threshold requirements to market volatility
Provides trend context through EMA analysis
Marks potential support/resistance zones
Generates alerts for reversal conditions
What This Indicator Does NOT Do
Predict future price movements
Guarantee profitable trades
Work equally in all market conditions
Eliminate the need for trader judgment
Replace a complete trading strategy
Known Limitations
Signals lag actual reversal by design (confirmation required)
May generate false signals during choppy, directionless markets
Not optimized for gapping markets or illiquid instruments
Requires normal volatility (extreme VIX can affect performance)
EMAs are lagging indicators (trend status reflects recent past)
User Responsibility
Users are responsible for:
Backtesting settings on their chosen instruments
Understanding how the indicator works before trading
Implementing proper risk management
Complying with their broker's margin requirements
Following applicable regulations in their jurisdiction
DISCLAIMERS
Educational Purpose
This indicator is provided for educational and informational purposes only. It is a technical analysis tool designed to assist traders in identifying potential reversal points. It does not constitute financial advice, investment recommendations, or trading signals.
No Performance Guarantees
Past performance of this indicator does not guarantee future results. Markets are inherently uncertain and no technical indicator can predict future price movements with certainty. Losses are a normal part of trading and users should expect both winning and losing trades.
Risk Warning
Trading futures involves substantial risk of loss and is not suitable for all investors. Users should carefully consider whether trading is appropriate for them in light of their experience, objectives, financial resources, and other relevant circumstances. Users should only trade with capital they can afford to lose entirely.
No Liability
The indicator creator and publisher are not responsible for any losses incurred through use of this indicator. Users assume full responsibility for their trading decisions and outcomes. The indicator is provided "as-is" without warranties of any kind.
Testing Requirement
Users should thoroughly test this indicator using paper trading or small position sizes before committing significant capital. Different instruments, timeframes, and market conditions will produce different results. What works well in one context may not work in another.
Not Investment Advice
Nothing in this description or in the indicator itself constitutes investment advice or a recommendation to buy or sell any security. Users should consult with a licensed financial advisor before making investment decisions.
SUPPORT AND UPDATES
Version Information
Current Version: 3.1
Release Date: 21 January 2025
Pine Script Version: 6
Updates and Improvements
This indicator may receive updates to improve functionality, fix bugs, or add features. Users will automatically receive updates through TradingView's indicator system. Major version changes may include breaking changes to settings or behavior.
User Feedback
Community feedback helps improve the indicator. Users are encouraged to share their experiences, report issues, and suggest enhancements through comments. Please include specific details about instruments, timeframes, and settings when reporting issues.
Following for Updates
Click "Follow" on the @NPR21 profile to receive notifications about new indicators, updates, and educational content.
McGinley Dynamic + MA FilterMcGinley Dynamic + MA Filter Long/Short Gauge
Author: Simon20cent
Purpose:
Provides a fast, adaptive trend indicator using the McGinley Dynamic, with an optional moving average filter for stronger confirmation of LONG or SHORT bias. Designed to give clear visual signals without cluttering the chart.
How it Works:
McGinley Dynamic: tracks price direction adaptively.
Price above MD → bullish
Price below MD → bearish
Optional MA Filter: confirms trend using a chosen SMA or EMA.
LONG only if MD > MA
SHORT only if MD < MA
Visual Signals:
Line: McGinley Dynamic (colored by bias)
Optional MA line: blue reference
Background color: green = LONG, red = SHORT
Labels: optional “LONG” / “SHORT” above/below bars
Customization Options:
MD period
MA type (SMA/EMA) and period
Show/hide lines and labels
Enable/disable MA filter
Use Cases:
Quick trend bias detection
Entry filter for trades (aligns MD and MA)
Works on any timeframe for scalping, intraday, or swing setups
Key Advantage:
Adaptive, low-lag trend detection with optional confirmation, giving a clean and clear long/short gauge.






















