Fractal Market Geometry [JOAT]
Fractal Market Geometry
Overview
Fractal Market Geometry is an open-source overlay indicator that combines fractal analysis with harmonic pattern detection, Fibonacci retracements and extensions, Elliott Wave concepts, and Wyckoff phase identification. It provides traders with a geometric framework for understanding market structure and identifying potential reversal patterns with multi-factor signal confirmation.
What This Indicator Does
The indicator calculates and displays:
Fractal Detection - Identifies fractal highs and lows using Williams-style pivot analysis with configurable period
Fractal Dimension - Calculates market complexity using range-based dimension estimation
Harmonic Patterns - Detects Gartley, Butterfly, Bat, Crab, Shark, Cypher, and ABCD patterns using Fibonacci ratios
Fibonacci Retracements - Key levels at 38.2%, 50%, and 61.8%
Fibonacci Extensions - Projection level at 161.8%
Elliott Wave Count - Simplified wave counting based on pivot detection (1-5)
Wyckoff Phase - Volume-based phase identification (Accumulation, Markup, Distribution, Neutral)
Golden Spiral Levels - ATR-based support and resistance levels using phi (1.618) ratio
Trend Detection - EMA crossover trend identification (20/50 EMA)
How It Works
Fractal detection uses a configurable period to identify swing points:
detectFractalHigh(simple int period) =>
bool result = true
float centerVal = high
for i = 0 to period - 1
if high >= centerVal or high >= centerVal
result := false
break
Harmonic pattern detection uses Fibonacci ratio analysis between swing points. Each pattern has specific ratio requirements:
Gartley: AB 0.382-0.618, BC 0.382-0.886, CD 1.27-1.618
Butterfly: AB 0.382-0.5, BC 0.382-0.886, CD 1.618-2.24
Bat: AB 0.5-0.618, BC 1.13-1.618, CD 1.618-2.24
Crab: AB 0.382-0.618, BC 0.382-0.886, CD 2.24-3.618
Shark: AB 0.382-0.618, BC 1.13-1.618, CD 1.618-2.24
Cypher: AB 0.382-0.618, BC 1.13-1.414, CD 0.786-0.886
Wyckoff phase detection analyzes volume relative to price movement:
wyckoffPhase(simple int period) =>
float avgVol = ta.sma(volume, period)
float priceChg = ta.change(close, period)
string phase = "NEUTRAL"
if volume > avgVol * 1.5 and math.abs(priceChg) < close * 0.02
phase := "ACCUMULATION"
else if volume > avgVol * 1.5 and math.abs(priceChg) > close * 0.05
phase := "MARKUP"
else if volume < avgVol * 0.7
phase := "DISTRIBUTION"
phase
Signal Generation
Signals use multi-factor confirmation for accuracy:
BUY Signal: Fractal low + Uptrend (EMA20 > EMA50) + RSI 30-55 + Bullish candle + Volume confirmation
SELL Signal: Fractal high + Downtrend (EMA20 < EMA50) + RSI 45-70 + Bearish candle + Volume confirmation
Pattern Detection: Label appears when harmonic pattern completes at current bar
Dashboard Panel (Top-Right)
Dimension - Fractal dimension value (market complexity measure)
Last High - Most recent fractal high price
Last Low - Most recent fractal low price
Pattern - Current harmonic pattern name or NONE
Elliott Wave - Current wave count (Wave 1-5) or OFF
Wyckoff - Current market phase or OFF
Trend - BULLISH, BEARISH, or NEUTRAL based on EMA crossover
Signal - BUY, SELL, or WAIT status
Visual Elements
Fractal Markers - Small triangles at fractal highs (down arrow) and lows (up arrow)
Geometry Lines - Dashed lines connecting the most recent fractal high and low
Fibonacci Levels - Clean horizontal lines at 38.2%, 50%, and 61.8% retracement levels
Fibonacci Extension - Horizontal line at 161.8% extension level
Golden Spiral Levels - Support and resistance lines based on ATR x 1.618
3D Fractal Field - Optional depth layers around swing levels (OFF by default)
Harmonic Pattern Markers - Small diamond shapes when Crab, Shark, or Cypher patterns detected
Pattern Labels - Text label showing pattern name when detected
Signal Labels - BUY/SELL labels on confirmed multi-factor signals
Input Parameters
Fractal Period (default: 5) - Bars on each side for fractal detection
Geometry Depth (default: 3) - Complexity of geometric calculations
Pattern Sensitivity (default: 0.8) - Tolerance for pattern ratio matching
Show Fibonacci Levels (default: true) - Display retracement levels
Show Fibonacci Extensions (default: true) - Display extension level
Elliott Wave Detection (default: true) - Enable wave counting
Wyckoff Analysis (default: true) - Enable phase detection
Golden Spiral Levels (default: true) - Display spiral support/resistance
Show Fractal Points (default: true) - Display fractal markers
Show Geometry Lines (default: true) - Display connecting lines
Show Pattern Labels (default: true) - Display pattern name labels
Show 3D Fractal Field (default: false) - Display depth layers
Show Harmonic Patterns (default: true) - Display pattern markers
Show Buy/Sell Signals (default: true) - Display signal labels
Suggested Use Cases
Identify potential reversal zones using harmonic pattern completion
Use Fibonacci levels for entry, stop-loss, and target planning
Monitor Wyckoff phases for accumulation/distribution awareness
Track Elliott Wave counts for trend structure analysis
Use fractal dimension to gauge market complexity
Wait for multi-factor signal confirmation before entering trades
Timeframe Recommendations
Best on 1H to Daily charts. Lower timeframes produce more fractals but with less significance. Higher timeframes provide stronger levels and more reliable signals.
Limitations
Harmonic pattern detection uses simplified ratio ranges and may not match all textbook definitions
Elliott Wave counting is basic and does not include all wave rules
Wyckoff phase detection is volume-based approximation
Fractal dimension calculation is simplified
Signals require fractal confirmation which has inherent lag equal to the fractal period
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
Moving Averages
Golden Vector Trend Orchestrator (GVTO)Golden Vector Trend Orchestrator (GVTO) is a composite trend-following strategy specifically engineered for XAUUSD (Gold) and volatile assets on H4 (4-Hour) and Daily timeframes.
This script aims to solve a common problem in trend trading: "Whipsaws in Sideways Markets." Instead of relying on a single indicator, GVTO employs a Multi-Factor Confluence System that filters out low-probability trades by requiring alignment across Trend Structure, Momentum, and Volatility.
🛠 Methodology & Logic
The strategy executes trades only when four distinct technical conditions overlap (Confluence). If any single condition is not met, the trade is filtered out to preserve capital.
1. Market Structure Filter (200 EMA)
Indicator: Exponential Moving Average (Length 200).
Logic: The 200 EMA acts as the baseline for the long-term trend regime.
Bullish Regime: Price must close above the 200 EMA.
Bearish Regime: Price must close below the 200 EMA.
Purpose: Prevents counter-trend trading against the macro direction.
2. Signal Trigger & Trailing Stop (Supertrend)
Indicator: Supertrend (ATR Length 14, Factor 3.5).
Logic: Uses Average True Range (ATR) to detect trend reversals while accounting for volatility.
Purpose: Provides the specific entry signal and acts as a dynamic trailing stop-loss to let profits run while cutting losses when the trend invalidates.
3. Volatility Gatekeeper (ADX Filter)
Indicator: Average Directional Index (Length 14).
Threshold: > 25.
Logic: A high ADX value indicates a strong trend presence, regardless of direction.
Purpose: This is the most critical filter. It prevents the strategy from entering trades during "choppy" or ranging markets (consolidation zones) where trend-following systems typically fail.
4. Momentum Confirmation (DMI)
Indicator: Directional Movement Index (DI+ and DI-).
Logic: Checks if the buying pressure (DI+) is physically stronger than selling pressure (DI-), or vice versa.
Purpose: Ensures that the price movement is backed by genuine momentum, not just a momentary price spike.
📋 How to Use This Strategy
🟢 LONG (BUY) Setup
A Buy signal is generated only when ALL of the following occur simultaneously:
Price Action: Price closes ABOVE the 200 EMA (Orange Line).
Trigger: Supertrend flips to GREEN (Bullish).
Strength: ADX is greater than 25 (Strong Trend).
Momentum: DI+ (Plus Directional Indicator) is greater than DI- (Minus).
🔴 SHORT (SELL) Setup
A Sell signal is generated only when ALL of the following occur simultaneously:
Price Action: Price closes BELOW the 200 EMA (Orange Line).
Trigger: Supertrend flips to RED (Bearish).
Strength: ADX is greater than 25 (Strong Trend).
Momentum: DI- (Minus Directional Indicator) is greater than DI+ (Plus).
🛡 Exit Strategy
Stop Loss / Take Profit: The strategy utilizes the Supertrend Line as a dynamic Trailing Stop.
Exit Long: When Supertrend turns Red.
Exit Short: When Supertrend turns Green.
Note: Traders can also use the real-time P/L Dashboard included in the script to manually secure profits based on their personal Risk:Reward ratio.
📊 Included Features
Real-Time P/L Dashboard: A table in the top-right corner displays the current trend status, ADX strength, and the Unrealized Profit/Loss % of the current active position.
Smart Labeling: Buy/Sell labels are coded to appear only on the initial entry trigger. They do not repaint and do not spam the chart if the trend continues (no pyramiding visualization).
Visual Aids: Background color changes (Green/Red) to visually represent the active trend based on the Supertrend status.
⚠️ Risk Warning & Best Practices
Asset Class: Optimized for XAUUSD (Gold) due to its high volatility nature. It also works well on Crypto (BTC, ETH) and Major Forex Pairs.
Timeframe: Highly recommended for H4 (4 Hours) or D1 (Daily). Using this on lower timeframes (M5, M15) may result in false signals due to market noise.
News Events: Automated strategies cannot predict economic news (CPI, NFP). Exercise caution or pause trading during high-impact economic releases.
EMA and Dow Theory Strategies V2 DOGE Current Optimum Value
📘 Overview
These are the current optimal values for DOGE.
They are intended for use on the 2‑hour timeframe.
This script requires complex configuration, but there is an optimal set of values somewhere.
Here, I’m sharing the settings that I personally use at the moment.
Turning Take Profit off can lead to higher profits, but it also increases risks such as a lower win rate.
With Take Profit on, you can adjust the settings by increasing the values.
I have been trading using Dow Theory for many years.
Trading with Dow Theory and EMA has been my main strategy.
Although it has been profitable, I have long struggled with its low win rate.
The issue lies in the immaturity of the exit strategy, and I’m currently experimenting to see if I can solve that.
In V2, I added three take‑profit lines, securing 30% of the profit at each level to ensure a minimum level of gain.
Additionally, when the trend weakens, half of the position is closed.
In all scenarios, the remaining position is held until the trend reverses.
The system provides precise entries, adaptive exits, and highly visual guidance that helps traders understand trend structure at a glance.
🧠 Key Features
🔹 1. Dual‑EMA Trend Logic (Symbol + External Index)
Both the chart symbol and an external index (OTHERS.D) are evaluated using fast/slow EMAs to determine correlation‑based trend bias.
🔹 2. Dow Theory Swing Detection (Real‑time)
The script identifies swing highs/lows and updates trend direction when price breaks them. This creates a structural trend model that reacts faster than EMAs alone.
🔹 3. Gradient Trend Zones (Visual Trend Strength)
When trend is up or down, the area between price and the latest swing level is filled with a multi‑step gradient. This makes trend strength and distance-to-structure visually intuitive.
🔹 4. Higher‑Timeframe Swing Trend (htfTrend)
Swing highs/lows from a higher timeframe (e.g., 4H) are plotted to show macro structure. Used only for visual context, not for filtering entries.
🔹 5. RSI‑Based Entry Protection
RSI prevents entries during extreme overbought/oversold conditions.
🔹 6. Dynamic Exit System
Includes:
Custom stop‑loss (%)
Partial take‑profit (TP1/TP2/TP3)
Automatic scale‑out when trend color weakens
“Color‑change lockout” to prevent immediate re‑entry
Real‑time PnL tracking and labels
🔹 7. Alerts for All Key Events
Entry, stop‑loss, partial exits, and trend‑change exits all generate structured JSON alerts.
🔹 8. Visual PnL Labels & Equity Tracking
PnL for the latest trade is displayed directly on the chart, including scale‑out adjustments.
⚙️ Input Parameters
Parameter Description
Fast EMA / Slow EMA EMAs used for symbol trend detection
Index Fast / Slow EMA EMAs applied to external index
StopLoss (%) Custom stop‑loss threshold
Scale‑Out % Portion to exit when trend color weakens
RSI Period / Levels Overbought/oversold filters
Swing Detection Length Bars used to detect swing highs/lows
Stats Display Position of statistics table
🧭 About htfTrend (Higher Timeframe Trend)
The higher‑timeframe swing trend is displayed visually but not used for entry logic.
Why? Strict HTF filtering reduces trade frequency and often removes profitable setups. By keeping it visual‑only, traders retain flexibility while still benefiting from macro structure awareness.
Use it as a contextual guide, not a constraint.
📘 概要
DOGEの現在の最適値です。
2時間足での使用を想定しています。
このスクリプトは複雑な設定が必要ですが、どこかに最適値が存在します。
今回は現在私が個人的に使っている設定値の公開です。
Take ProfitをOFFにするとさらなる利益が望めますが、勝率が下がるなどのリスクが上がります。
ONにした状態で数値を上げることによって調整することが可能です。
私はダウ理論を使ったトレードを長年続けてきました。
ダウ理論とEMAを使ったトレードが私の主力です。
しかし利益は出るものの、長年その勝率の低さに悩んでいました。
問題は出口戦略が未熟なためで、現在はそれらの解決ができないかと試行錯誤を続けています。
V2では3本の利益確定ラインを引き、それぞれ30%ずつ利益を確定し、最低限の利益がでるようにしました。
それ以外にはトレンドが弱まったタイミングで半分の利益確定をし、どのパターンでも残ったポジションはトレンド転換まで持ち続けます。
🧠 主な機能
🔹 1. 銘柄+外部インデックスの EMA クロス判定
対象銘柄と OTHERS.D の EMA を比較し、相関を考慮したトレンド方向を判定します。
🔹 2. ダウ理論に基づくスイング高値・安値の自動検出
スイング更新によりトレンド方向を切り替える、構造ベースのトレンド判定を採用。
🔹 3. グラデーション背景によるトレンド強度の可視化
スイングラインから現在価格までを段階的に塗り分け、 「どれだけトレンドが伸びているか」を直感的に把握できます。
🔹 4. 上位足スイングトレンド(htfTrend)の表示
4H などの上位足でのスイング高値・安値を表示し、 大局的なトレンド構造を視覚的に把握できます(ロジックには未使用)。
🔹 5. RSI による過熱・売られすぎフィルター
極端な RSI 状態でのエントリーを防止。
🔹 6. 動的イグジットシステム
カスタム損切り(%)
TP1/TP2/TP3 の段階的利確
トレンド色の弱まりによる自動スケールアウト
色変化後の再エントリー制限(waitForColorChange)
リアルタイム PnL の追跡とラベル表示
🔹 7. アラート完備(JSON 形式)
エントリー、損切り、部分利確、トレンド反転などすべてに対応。
🔹 8. 損益ラベル・統計表示
直近トレードの損益をチャート上に表示し、視覚的に把握できます。
⚙️ 設定項目
設定項目名 説明
Fast / Slow EMA 銘柄の EMA 設定
Index Fast / Slow EMA 外部インデックスの EMA 設定
損切り(%) カスタム損切りライン
部分利確割合 トレンド弱化時のスケールアウト割合
RSI 期間・水準 過熱/売られすぎフィルター
スイング検出期間 スイング高値・安値の検出に使用
統計表示位置 テーブルの表示位置
🧭 上位足トレンド(htfTrend)について
上位足スイングの更新に基づくトレンド判定を表示しますが、 エントリー条件には使用していません。
理由: 上位足を厳密にロジックへ組み込むと、トレード機会が大幅に減るためです。
本ストラテジーでは、 「大局の把握は視覚で、エントリーは柔軟に」 という設計思想を採用しています。
→ 裁量で利確判断や逆張り回避に活用できます。
SMAcross-mvrOverview
SMAcross-mvrNew is a flexible, non-repainting moving-average strategy designed for clarity, configurability, and reliable backtesting.
It supports multiple entry styles, optional layered exits, and full-capital position sizing, while remaining stable during chart zooming and dragging.
🚀 What’s New in v2
✅ Multiple Entry Modes
You can now choose how trades are entered:
Entry Mode A: Short SMA crosses Long SMA
Entry Mode B: Price crosses Long SMA
This allows both classic MA-crossover trading and trend-continuation pullback entries using the same strategy.
✅ Modular Exit System (Checkbox-Based)
Exit logic is now fully modular using independent checkboxes:
☑ Exit on opposite signal
☑ Exit when price closes beyond Short SMA
You may enable one, both, or neither.
If both are enabled, the strategy exits on whichever condition occurs first.
✅ Terminology Clarity
All labels, inputs, and alerts now use semantic naming:
Short SMA (formerly 13 SMA)
Long SMA (formerly 30 SMA)
This makes the strategy easier to understand and future-proof if SMA lengths are changed.
✅ Full-Capital Position Sizing
Each trade uses 100% of available equity, allowing performance to naturally compound over time during backtests.
✅ Optional Visual Enhancements
Optional cross price labels (can be toggled on/off)
Color-filled zone between Short and Long SMAs for quick trend recognition
Optional 200 SMA (off by default) for higher-timeframe context
✅ Alert-Ready (TV-Safe)
All alerts use static messages compatible with TradingView’s alert system, making the strategy suitable for:
Manual trade notifications
Webhook-based automation
Broker integrations
🔒 Design Principles
No repainting
No line continuations (TradingView-safe formatting)
Stable behavior when zooming or scrolling
Clear separation of entry logic, exit logic, and visuals
⚠️ Notes
This script is intended for educational and research purposes.
Always forward-test and apply proper risk management before live trading.
Advanced algo [For Indian market]🙏 Gratitude to the TradingView Community
Before anything else, I would like to sincerely thank the TradingView community. I have learned immensely from the shared ideas, scripts, and discussions here over time. This indicator is my small way of giving back to the community that has helped me grow as a trader and developer.
📌 Indicator Overview
Advanced Algo is a non-repainting, rule-based trading indicator designed primarily for Indian indices and stocks, while remaining equally effective on other liquid instruments.
The script focuses on clean trend identification, disciplined entries, and well-defined risk management, making it suitable for intraday as well as positional analysis depending on the timeframe used.
✅ Key Highlights
100% Non-Repainting Logic
All signals are generated only after bar confirmation using a delay mechanism, ensuring reliability and backtesting accuracy.
Clear BUY / SELL Signals
Signals are plotted only on trend reversals, avoiding noise and repeated entries.
Automatic TP & SL Levels
Entry, Take-Profit, and Stop-Loss levels are calculated at the time of trade entry and remain fixed throughout the trade.
Intrabar TP / SL Detection
Profit targets and stop-losses are detected as soon as price touches them, providing realistic trade behavior.
Visual Risk-Reward Zones
Entry, TP, and SL lines with color-filled zones make trade structure easy to read at a glance.
Built-in Statistics Table
Displays Buy TP, Sell TP, Buy SL, and Sell SL counts for quick performance tracking.
⚙️ Logic (Brief & High-Level)
A smoothed range-based trend filter is used to identify directional bias.
Consecutive directional strength confirms trend continuation.
BUY or SELL signals are generated only when the trend state flips, reducing false signals.
A delay offset is applied to ensure non-repainting behavior.
Once a trade is triggered:
Entry is fixed
TP and SL are calculated using user-defined percentages
No new trade is allowed until the current trade exits or reverses
🟢 BUY / 🔴 SELL Logic (Brief)
BUY Signal
Triggered when price confirms a bullish trend shift after a bearish phase.
SELL Signal
Triggered when price confirms a bearish trend shift after a bullish phase.
Only one trade is active at a time to maintain clarity and discipline.
🎯 Take-Profit & 🛑 Stop-Loss
TP & SL are percentage-based and configurable via inputs.
Levels are calculated at entry and do not trail or repaint.
TP and SL exits are marked clearly on the chart with labels.
Trades are force-reset before allowing a new entry.
🔔 Alerts Included
Built-in alerts are available for:
Long Entry
Short Entry
Long Exit (TP / SL)
Short Exit (TP / SL)
These alerts can be easily connected to automation or webhook-based execution systems.
⚠️ Disclaimer
This indicator is provided for educational and informational purposes only.
It is not financial advice. Trading in stocks, indices, and derivatives involves risk, and past performance does not guarantee future results.
Always:
Use proper risk management
Confirm signals with additional analysis
Test thoroughly before using in live markets
The author is not responsible for any financial losses incurred while using this script.
⭐ If you find this indicator useful, your feedback and support are always appreciated.
Happy trading and all the best!
Opening Path Selector (EMA200 Context Tool)📝 Description
Opening Path Selector is a context-based indicator designed to help traders quickly identify which asset may offer the cleanest directional path at the market open.
This tool does not generate entry or exit signals.
Its purpose is to reduce decision fatigue during the first minutes of the session by ranking a small set of high-liquidity assets based on higher-timeframe EMA200 structure.
🔍 What this indicator evaluates
The dashboard compares a predefined group of major symbols and ranks them according to:
• Proximity to the nearest EMA200
• Relative position versus higher-timeframe EMA200 levels
• Directional context inferred from EMA structure
The result is a priority-based list that highlights which asset may present:
• Less immediate EMA resistance
• Clearer directional context
• Lower probability of early-session chop
📊 How to read the dashboard
• Priority – Ranking based on opening context
• Symbol – Evaluated instrument
• Nearest EMA200 – Distance and side relative to price
• Possible Path – Direction with less immediate EMA resistance
• Bias – Strength of the higher-timeframe context
Colored markers are used to provide fast visual identification of the highest-priority assets.
⚠️ Important notes
• This is a context and selection tool, NOT a trading system
• No buy/sell signals, alerts, TP, or SL logic are included
• Designed to be used alongside your own execution methodology
🔧 Compatibility
Due to Pine Script multi-symbol and multi-timeframe constraints, this public version is intentionally limited to a small set of symbols.
TradingView Pro / Premium or higher is recommended for consistent performance.
🔗 Complementary tools
This indicator can be complemented with Multi-Tool VWAP + EMAs (Multi-Timeframe) + Key Levels , which provides detailed visibility of multiple EMA levels, VWAP structure, and higher-timeframe reference zones directly on the chart.
While Opening Path Selector helps decide which asset to focus on at the open, the complementary tool can assist with in-chart context and confirmation once an asset has been selected.
Both tools are designed to serve different stages of the decision process and can be used independently.
Options Liquidity Meter (OLM)❓ The question behind this indicator
When trading options, it is common to experience situations where price moves in the expected direction, yet the option contract does not increase in value as anticipated.
This typically happens when one or more of the following conditions is missing:
Insufficient liquidity participation
Lack of volatility expansion
Weak or passive order flow
Options Liquidity Meter (OLM) was created to address this specific question:
“If price moves from here, are there conditions for option premiums to actually expand?”
🎯 What this indicator does
Options Liquidity Meter is a context tool, not a trading system.
It evaluates whether the current market environment is favorable for option premium expansion , based on three core engines:
Liquidity (Relative Volume)
Measures whether price movement is supported by meaningful participation.
Volatility State
Identifies compression, release, and expansion phases, where options tend to respond differently.
Order Flow Activity (OBV-based)
Acts as a proxy for active vs. passive participation, helping filter hollow moves.
These components are combined into a single, easy-to-read options context.
🟢🟡🔴 Options Context Output
The indicator displays one consolidated state:
RED — NO EXPANSION
Price may move, but option premiums often do not respond.
YELLOW — BUILDING
Liquidity or volatility is developing. Conditions are improving but not fully aligned.
GREEN — EXPANSION LIKELY
Liquidity, volatility expansion, and active flow are aligned.
This is a favorable environment for option premium expansion.
The same logic is reflected visually through the background color and summarized in the dashboard.
📊 How to read the dashboard
The dashboard shows:
Liquidity: LOW / OK / HIGH
Volatility: COMPRESSED / RELEASED / EXPANDING
Order Flow: FLAT / ACTIVE
Options Context: NO EXPANSION / BUILDING / EXPANSION LIKELY
Below, a Background Color Meaning section explains what each color represents, making the indicator intuitive and educational.
📍 Where to apply this indicator
Options Liquidity Meter must be applied to the underlying asset chart, such as:
Indices (SPY, SPX, QQQ, etc.)
Stocks
Futures
ETFs
It is not designed to be applied to option contracts themselves.
The indicator evaluates the market conditions of the underlying, which are the drivers that influence option premium behavior.
Contract selection (strike, delta, gamma, expiration) remains the trader’s responsibility.
🧠 How to use it
Use your own methodology to define:
Direction
Structure
Entries and exits
Use Options Liquidity Meter to evaluate:
Whether the current environment supports option premium expansion
If the context is RED, be cautious — price may move without rewarding options.
If the context is GREEN, the environment is statistically more favorable for options responsiveness.
🔗 Complementary tools
Options Liquidity Meter is designed to complement, not replace, other tools.
It works well alongside:
Opening Path Selector (EMA200 Context Tool)
For deciding which asset offers the cleanest directional context.
Multi-Tool VWAP + EMAs (Multi-Timeframe) + Key Levels
For in-chart structure, bias, and reference levels.
Each tool addresses a different stage of the decision process and can be used independently.
⚠️ Important notes
This indicator provides context only
It does not generate trading signals
No indicator guarantees results
Use at your own risk.
Velocity Divergence Radar [JOAT]
Velocity Divergence Radar - Momentum Physics Edition
Overview
Velocity Divergence Radar is an open-source oscillator indicator that applies physics concepts to market analysis. It calculates price velocity (rate of change), acceleration (rate of velocity change), and jerk (rate of acceleration change) to provide a multi-dimensional view of momentum. The indicator also includes divergence detection and force vector analysis.
What This Indicator Does
The indicator calculates and displays:
Velocity - Rate of price change over a configurable period, smoothed with EMA
Acceleration - Rate of velocity change, showing momentum shifts
Jerk (3rd Derivative) - Rate of acceleration change, indicating momentum stability
Force Vectors - Volume-weighted acceleration representing market force
Kinetic Energy - Calculated as 0.5 * mass (volume ratio) * velocity squared
Momentum Conservation - Tracks momentum relative to historical average
Divergence Detection - Identifies when price and velocity diverge at pivots
How It Works
Velocity is calculated as smoothed rate of change:
calculateVelocity(series float price, simple int period) =>
float roc = ta.roc(price, period)
float velocity = ta.ema(roc, period / 2)
velocity
Acceleration is the change in velocity:
calculateAcceleration(series float velocity, simple int period) =>
float accel = ta.change(velocity, period)
float smoothAccel = ta.ema(accel, period / 2)
smoothAccel
Jerk is the change in acceleration:
calculateJerk(series float acceleration, simple int period) =>
float jerk = ta.change(acceleration, period)
float smoothJerk = ta.ema(jerk, period / 2)
smoothJerk
Force is calculated using F = m * a (mass approximated by volume ratio):
calculateForceVector(series float mass, series float acceleration) =>
float force = mass * acceleration
float forceDirection = math.sign(force)
float forceMagnitude = math.abs(force)
Signal Generation
Signals are generated based on velocity behavior:
Bullish Divergence: Price makes lower low while velocity makes higher low
Bearish Divergence: Price makes higher high while velocity makes lower high
Velocity Cross: Velocity crosses above/below zero line
Extreme Velocity: Velocity exceeds 1.5x the upper/lower zone threshold
Jerk Extreme: Jerk exceeds 2x standard deviation
Force Extreme: Force magnitude exceeds 2x average
Dashboard Panel (Top-Right)
Velocity - Current velocity value
Acceleration - Current acceleration value
Momentum Strength - Combined velocity and acceleration strength
Radar Score - Composite score based on velocity and acceleration
Direction - STRONG UP/SLOWING UP/STRONG DOWN/SLOWING DOWN/FLAT
Jerk - Current jerk value
Force Vector - Current force magnitude
Kinetic Energy - Current kinetic energy value
Physics Score - Overall physics-based momentum score
Signal - Current actionable status
Visual Elements
Velocity Line - Main oscillator line with color based on direction
Velocity EMA - Smoothed velocity for trend reference
Acceleration Histogram - Bar chart showing acceleration direction
Jerk Area - Filled area showing jerk magnitude
Vector Magnitude - Line showing combined vector strength
Radar Scan - Oscillating pattern for visual effect
Zone Lines - Upper and lower threshold lines
Divergence Labels - BULL DIV / BEAR DIV markers
Extreme Markers - Triangles at velocity extremes
Input Parameters
Velocity Period (default: 14) - Period for velocity calculation
Acceleration Period (default: 7) - Period for acceleration calculation
Divergence Lookback (default: 10) - Bars to scan for divergence
Radar Sensitivity (default: 1.0) - Zone threshold multiplier
Jerk Analysis (default: true) - Enable 3rd derivative calculation
Force Vectors (default: true) - Enable force analysis
Kinetic Energy (default: true) - Enable energy calculation
Momentum Conservation (default: true) - Enable momentum tracking
Suggested Use Cases
Identify momentum direction using velocity sign and magnitude
Watch for divergences as potential reversal warnings
Use acceleration to detect momentum shifts before price confirms
Monitor jerk for momentum stability assessment
Combine force and kinetic energy for conviction analysis
Timeframe Recommendations
Works on all timeframes. Higher timeframes provide smoother readings; lower timeframes show more granular momentum changes.
Limitations
Physics analogies are conceptual and not literal market physics
Divergence detection uses pivot-based lookback and may lag
Force calculation uses volume ratio as mass proxy
Kinetic energy is a derived metric, not actual energy
Open-Source and Disclaimer
This script is published as open-source under the Mozilla Public License 2.0 for educational purposes. It does not constitute financial advice. Past performance does not guarantee future results. Always use proper risk management.
- Made with passion by officialjackofalltrades
Zero Lag/Exponential MA Cloud (EMA or ZLEMA+Kalman) w/Buy/SellZero Lag/Exponential MA Cloud (EMA or ZLEMA+Kalman) is a three–moving average trend and structure tool that combines a dual-layer cloud with optional Buy/Sell tags. It plots a Fast, Medium, and Long moving average and shades the space between them to make trend direction and momentum easy to read at a glance. The default source is OHLC4 (the average of open, high, low, and close), which often produces smoother, more stable signals than using close alone.
Each moving average can be calculated two different ways: standard EMA or a “ZLEMA + Kalman” mode. EMA is the classic exponential moving average. ZLEMA (Zero-Lag EMA) is a real technique designed to reduce lag by de-lagging the input before running the EMA, using the form EMA(2×src − src , length) where lag is approximately (length−1)/2. In this script, the ZLEMA input is first passed through an adaptive Kalman-style filter (based on Ehlers optimal tracking filter concepts). That filter adjusts its smoothing in real time using a ratio of “signal” (smoothed price change) to “noise” (true range), producing an adaptive alpha: it reacts faster in cleaner trends and smooths more in choppy conditions. The result is a fast-moving average that stays readable instead of becoming jagged.
The cloud is split into two zones: one between the Fast and Medium MAs, and another between the Medium and Long MAs. Cloud color is driven by the overall regime defined by Fast vs Long. When Fast is above Long, the Fast→Medium zone is lime and the Medium→Long zone is green. When Fast is below Long, the Fast→Medium zone is red and the Medium→Long zone is maroon. Cloud transparency is adjustable, and the MA lines can be shown or hidden (Fast line is lime, Medium is orange, Long is blue).
Signals are optional and configurable. You can choose where Buy tags appear and where Sell tags appear independently using two dropdowns: Buy appears on and Sell appears on . A tag prints only when the candle close flips sides relative to the selected MA (below→above prints Buy, above→below prints Sell), which prevents repeated labels from printing on every bar. “Confirm Bars” keeps the same behavior you’re used to: set it to 1 for immediate printing on the flip candle, or set it to 2+ to require N consecutive closes on the new side before a tag prints, reducing whipsaw at the cost of later signals.
Key settings (minimal):
* MA Type per line: EMA or ZLEMA + Kalman
* Cloud Transparency (0–100) and Show/Hide lines
* Buy appears on / Sell appears on (Fast/Med/Long/None)
* Confirm Bars (1 = immediate, 2+ = filtered)
This indicator is best used as a visual trend framework (cloud regime + structure) with signals acting as optional “side flip” alerts on whichever MA level you consider your trigger line (fast for responsiveness, medium for balance, long for confirmation).
Moving Average Structure ZigZag [Stable & Filtered]
(日本語説明)
このインジケーターは、移動平均線(MA)の転換に基づき、相場の「真の構造」を可視化するために開発されました。 通常のZigZagのように価格の単純な反転に依存せず、「MAのトレンド転換 + 指定した値幅の到達」という2つの条件を用いることで、レンジ相場の細かなノイズ(ダマシ)を排除し、ダウ理論に基づいた重要な高値・安値だけを結びます。
💡 主な機能
MAタイプの切り替え: SMA, EMA, HMA, VW-HMAなど、目的に合わせたトレンド感度を選択可能。
値幅フィルター(Min Deviation): 添付画像のように、小さな値動きをカットし、大きな市場構造だけを抽出します。
価格アクションへの追従: ラインはMAの数値ではなく、期間内の実最高値・最安値を正確に結び、高値更新時には自動で延伸されます。
🛠 活用シーン
環境認識: 上位足での大きな波形を確認し、現在のフェーズを定義。
ノイズ除去: 市場の主要な節目(レジサポ候補)の特定。
ダウ理論の視覚化: 高値・安値の切り上がり・切り下がりを明確化。
(English Description)
This indicator was developed to visualize the "True Market Structure" based on Moving Average (MA) reversals. Unlike standard ZigZag which relies solely on price reversals, this tool combines MA Trend Reversals and a Minimum Deviation filter to eliminate market noise and highlight significant swing highs and lows based on Dow Theory.
💡 Key Features
Multiple MA Types: Select from SMA, EMA, HMA, VW-HMA, etc., to match your preferred trend sensitivity.
Min Deviation Filter: As shown in the attached image, it filters out minor price fluctuations to extract only the major market waves.
Price Action Tracking: The lines connect the actual High/Low prices within the period, not the MA values themselves. Lines automatically extend when a trend continues to new highs/lows.
🛠 Use Cases
Market Context: Identify major wave patterns on higher timeframes to define the current phase.
Noise Reduction: Pinpoint key market levels and potential support/resistance.
Dow Theory Visualization: Clearly visualize higher highs/lows and trend shifts.
Settings
MA Type: Choose the type of Moving Average.
Moving Average Length: The lookback period for structure.
Min Deviation (Pips): The threshold to filter noise. Adjust according to the volatility of the pair.
EMA 9 vs VWMA 30 Portillo Valentin “It uses a 9‑period moving average and a volume‑weighted moving average. It gives a crossover signal, and the parameters can be adjusted.”
SessionVWAP + ORBThis TradingView Pine Script indicator combines two powerful intraday tools:
Multiple Rolling VWAPs: It plots up to four independent rolling (continuous) Volume Weighted Average Prices (VWAPs) with user-defined periods (e.g., 1-hour, 2-hour, 4-hour, daily). These are "anchored" to a customizable session start time and roll forward accurately without daily resets, providing dynamic fair-value benchmarks that react at different speeds (fastest/shortest on top).
Opening Range Breakout (ORB) Zones: It displays the high/low range (with optional background shading and lines) for major global trading sessions — Sydney, Tokyo, London, New York, and US RTH (Regular Trading Hours, starting at 9:30 ET) — over the first configurable minutes (default 30) after each session open, with history for several prior days.
The latest version adds full timezone flexibility (e.g., Chicago, New York, UTC, London, Tokyo, Sydney), automatically adjusting anchor times and session opens.
Use Case
This script is ideal for intraday and day traders (especially in stocks, futures, forex, or indices) seeking confluence between volume-based value areas and session momentum.
VWAP Component: Use the layered rolling VWAPs as dynamic support/resistance. Price above the fastest VWAPs suggests bullish bias; pullbacks to slower VWAPs offer mean-reversion entries. The multi-timeframe view helps gauge short-term vs. longer-term "fair value."
ORB Component: Trade breakouts from major session opening ranges — e.g., buy above the New York ORB high (red line) for momentum longs, or fade failures for reversals. Combine with VWAP (e.g., only take NY ORB longs if price is above session VWAP) for higher-probability filters.
Overall: Overlay on lower timeframes (1-15 min) to spot setups like ORB breakouts aligning with VWAP crosses, or use for risk management (stops beyond ORB extremes). The timezone support makes it versatile for global markets without manual adjustments.
ATR Bands (MA Distance)ATR Bands (MA Distance) plots volatility-based bands at a multiple of ATR away from a selected moving average.
Unlike percentage envelopes or standard deviation bands, this indicator measures distance from the moving average using ATR, representing the market’s normal “breathing range” rather than statistical probability.
Key Features
The center line is a selectable moving average (EMA, SMA, RMA/Wilder, or WMA).
Upper and lower bands are calculated as:
Moving Average ± ATR × Multiplier
Band width automatically adapts to changing market volatility.
Designed for consistent use across different markets and timeframes without parameter re-optimization.
Non-repainting: all values are calculated only from confirmed historical bars.
Intended Use
ATR Bands (MA Distance) is best used as a context and preparation tool , not as a direct entry or exit signal.
Typical use cases include:
Identifying areas where price is extended relative to its recent volatility.
Visualizing normal vs. stretched price distance from the moving average.
Supporting range-based analysis or trade preparation when combined with other indicators (e.g., oscillators).
Important Notes / How NOT to Use
This indicator does NOT generate buy or sell signals by itself .
Touching or crossing a band does not imply an automatic reversal.
In strong trending markets, price may stay outside the bands for extended periods.
ATR Bands should not be interpreted as overbought/oversold levels on their own.
This indicator does NOT repaint. Once a bar is closed, its values will not change.
For best results:
Use ATR Bands as a preparation zone, then wait for confirmation from your own entry logic.
Disable or ignore band-based mean-reversion ideas during strong trend conditions.
Concept Summary (Short)
ATR Bands (MA Distance) visualize how far price has moved from its moving average in terms of volatility, without repainting and without relying on percentage deviation or statistical assumptions.
Optional Short Description (Preview)
Volatility-based, non-repainting ATR bands plotted at a distance from a moving average.
Designed for market context and trade preparation — not standalone signals.
THE ELVINATORTHE ELVINATOR is my trend-following momentum indicator built on the 20 EMA, 50 EMA, and 200 EMA, designed for trading **XAUUSD during the New York session (9:30–17:00 NY time), Monday through Friday**.
**How to trade it:**
* **Trend filter:** Only take **longs above the 200 EMA** and **shorts below the 200 EMA**. This keeps trades aligned with Gold’s dominant direction.
* **Long setups:** A **20 EMA cross above the 50 EMA** signals bullish momentum. Best entries come after a pullback into the 20–50 EMA zone followed by strong continuation candles.
* **Short setups:** A **20 EMA cross below the 50 EMA** signals bearish momentum. Look for pullbacks into the EMA zone and rejection before continuation lower.
* **Timing:** Focus on NY open and high-volume moves. Avoid choppy conditions and late-session exhaustion.
* **Risk & exits:** Place stops beyond recent swings or EMA structure. Targets can be prior highs/lows or scaled with trend continuation.
THE ELVINATOR is built for **structure, patience, and disciplined execution**, allowing traders to capitalize on Gold’s volatility without chasing noise.
Commodity Channel Index CCI + EMA strategy
================================================================================
COMMODITY CHANNEL INDEX CCI + EMA STRATEGY - STRATEGY GUIDE 📊
================================================================================
💡 COLLABORATION & SUPPORT
---------------------------
If you want to collaborate, have an idea for a strategy, or need help writing
or customizing code, send an email to burdytrader@gmail.com or send me a
message. Suggestions, ideas, and comments are always welcome! 🤝
I also develop automated trading codes for other trading platforms including:
- CTrader (C#)
- MetaTrader 4 (MQL4)
- MetaTrader 5 (MQL5)
If you need a strategy converted or developed for any of these platforms, feel
free to contact me!
================================================================================
⚠️ IMPORTANT: INSTRUMENT SELECTION 📈
-------------------------------------
This strategy performs BEST with currency pairs (forex). The CCI indicator
works particularly well in the forex market due to the nature of currency
movements and the effectiveness of the CCI in identifying overbought and
oversold conditions in trending markets.
Why Currency Pairs? 🎯
- CCI is highly effective in identifying reversals in forex markets
- Currency pairs show clear overbought/oversold patterns
- EMA filter (50/200) aligns well with major forex trends
- High liquidity ensures reliable signal execution
Performance Highlights:
In specific currency pairs, when properly configured, this strategy can achieve:
- Profit Factor: Over 2.0
- Win Rate: Up to 70%
- Particularly effective pairs: USDCAD, EURUSD, GBPJPY
While the strategy can work with other instruments (stocks, indices, commodities),
currency pairs provide the most consistent and reliable results. For optimal
performance, focus on major forex pairs with good liquidity and clear trending
characteristics.
================================================================================
WHAT DOES THIS STRATEGY DO? 🎯
---------------------------
This strategy combines the Commodity Channel Index (CCI) with Exponential
Moving Averages (EMA) to identify high-probability trading opportunities.
The strategy uses CCI crossovers with a smoothing moving average and filters
signals using EMA trend confirmation. The strategy automatically enters trades
when CCI crosses the smoothing MA in specific zones, indicating potential trend
reversals or continuations.
HOW IT WORKS? ⚙️
---------------
1. CCI CALCULATION 📈
The strategy calculates the Commodity Channel Index using:
- CCI = (Price - SMA(Price, length)) / (0.015 × Deviation(Price, length))
- Default length: 20 periods
- Source: HLC3 (typical price)
The CCI shows:
- Values above +100 = Overbought conditions
- Values below -100 = Oversold conditions
- Values around 0 = Neutral conditions
2. SMOOTHING MOVING AVERAGE 📊
A moving average is applied to the CCI to smooth out fluctuations:
- Types available: SMA, EMA, SMMA (RMA), WMA, VWMA
- Default: SMA with length 14
- Can be disabled (set to "None")
This smoothed line acts as a reference for crossover signals.
3. EMA TREND FILTER 🎯
Two EMAs are calculated on the CCI:
- EMA 50 (fast EMA)
- EMA 200 (slow EMA)
When the EMA filter is enabled:
- LONG signals only occur when EMA50 > EMA200 (uptrend confirmation)
- SHORT signals only occur when EMA50 < EMA200 (downtrend confirmation)
This filter can be enabled/disabled via the "Use EMA Filter" option.
4. ENTRY CONDITIONS 🎲
LONG ENTRY (Buy Signal):
- CCI crosses ABOVE the Smoothing MA (crossover)
- CCI is between Lower Level (-100) and Middle Level (0)
- EMA Filter: EMA50 > EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
SHORT ENTRY (Sell Signal):
- CCI crosses BELOW the Smoothing MA (crossunder)
- CCI is between Middle Level (0) and Upper Level (+100)
- EMA Filter: EMA50 < EMA200 (if filter enabled)
- No existing positions (or close opposite positions first)
5. POSITION MANAGEMENT 💰
The strategy uses a simple position management approach:
- Only ONE position at a time (no pyramiding)
- If a signal occurs in the opposite direction, closes existing position first
- Then opens new position in the new direction
- This prevents overexposure and simplifies risk management
6. TAKE PROFIT & STOP LOSS SETTINGS 🎯
The strategy uses percentage-based TP/SL:
- Take Profit: 1.0% (default, configurable)
- Stop Loss: 0.5% (default, configurable)
- Risk/Reward Ratio: 2:1 (TP is double the SL)
TP/SL are calculated once when the position opens and remain fixed.
AVAILABLE PARAMETERS ⚙️
-----------------------
CCI SETTINGS:
1. CCI Length (Default: 20)
- Period for CCI calculation
- Lower values = More sensitive to recent price action
- Higher values = More smoothed, less sensitive
2. CCI Source (Default: HLC3)
- Price source for CCI calculation
- Options: close, open, high, low, hlc3, hlcc4, ohlc4
3. CCI Lower Level (Default: -100)
- Lower boundary for LONG entry zone
- Typically -100 for oversold conditions
4. CCI Middle Level (Default: 0)
- Neutral level separating LONG and SHORT zones
5. CCI Upper Level (Default: +100)
- Upper boundary for SHORT entry zone
- Typically +100 for overbought conditions
SMOOTHING MA:
6. Type (Default: SMA)
- Moving average type: None, SMA, EMA, SMMA (RMA), WMA, VWMA
- Set to "None" to disable smoothing
7. Length (Default: 14)
- Period for smoothing MA
- Range: 7-28, step 7
EMA FILTER:
8. EMA 1 Length (Default: 50)
- Fast EMA period applied to CCI
9. EMA 2 Length (Default: 200)
- Slow EMA period applied to CCI
10. Use EMA Filter (Default: true)
- Enable/disable EMA trend filter
- When enabled: LONG only if EMA50 > EMA200, SHORT only if EMA50 < EMA200
RISK MANAGEMENT:
11. Take Profit (%) (Default: 1.0%)
- Profit target as percentage of entry price
- For LONG: Entry × (1 + TP%)
- For SHORT: Entry × (1 - TP%)
12. Stop Loss (%) (Default: 0.5%)
- Stop loss as percentage of entry price
- For LONG: Entry × (1 - SL%)
- For SHORT: Entry × (1 + SL%)
VISUALIZATION 📊
---------------
The strategy displays in a separate panel below the price chart:
1. CCI LINE
- Blue line showing the CCI value
- Oscillates around zero
2. SMOOTHING MA LINE
- Yellow line showing the smoothed CCI
- Reference line for crossover signals
3. CCI LEVEL LINES
- Red dashed line: Upper Level (+100)
- Green dashed line: Lower Level (-100)
- Yellow dashed line: Middle Level (0)
4. ENTRY SIGNALS
- Green cross: LONG entry signal (when CCI crosses above MA)
- Red cross: SHORT entry signal (when CCI crosses below MA)
RECOMMENDED SETTINGS 🎯
-----------------------
To get started, you can use these settings:
CCI SETTINGS:
- CCI Length: 20 (default)
- CCI Source: HLC3 (default)
- CCI Lower Level: -100 (default)
- CCI Middle Level: 0 (default)
- CCI Upper Level: +100 (default)
SMOOTHING MA:
- Type: SMA (default) or EMA for faster response
- Length: 14 (default)
EMA FILTER:
- EMA 1 Length: 50 (default)
- EMA 2 Length: 200 (default)
- Use EMA Filter: true (recommended for better signal quality)
RISK MANAGEMENT:
- Take Profit (%): 1.0% (adjust based on your risk/reward preference)
- Stop Loss (%): 0.5% (adjust based on your risk tolerance)
For more aggressive trading:
- Reduce CCI Length to 14-16
- Reduce Smoothing MA Length to 7
- Disable EMA Filter
For more conservative trading:
- Increase CCI Length to 24-30
- Increase Smoothing MA Length to 21-28
- Keep EMA Filter enabled
RECOMMENDED CURRENCY PAIRS 💱
------------------------------
This strategy is optimized for currency pairs and performs exceptionally well
on the following pairs when properly configured:
TOP PERFORMING PAIRS:
- USDCAD: Can achieve Profit Factor > 2.0 and Win Rate up to 70%
- EURUSD: Excellent performance with consistent signals
- GBPJPY: Strong results with proper EMA filter configuration
These pairs have shown the best historical performance due to:
- Clear trending characteristics
- Good response to CCI overbought/oversold levels
- Strong alignment with EMA 50/200 trend filter
- High liquidity ensuring reliable execution
When trading these pairs, use the default settings or slightly adjusted
parameters based on the pair's volatility. Always backtest on historical
data before using real money to find the optimal configuration for each
specific pair.
PRACTICAL EXAMPLE 📝
--------------------
Scenario: LONG Entry on EUR/USD
1. Market conditions:
- Price: 1.1000
- CCI: -80 (in oversold zone)
- Smoothing MA: -90
- CCI crosses above Smoothing MA (crossover occurs)
- EMA50: -50, EMA200: -70 (EMA50 > EMA200, uptrend confirmed)
2. Strategy checks conditions:
✓ Smoothing MA enabled: Yes
✓ Crossover: Yes (CCI crosses above MA)
✓ CCI in range: Yes (-100 <= -80 <= 0)
✓ EMA Filter: Yes (EMA50 > EMA200)
✓ No existing position: Yes
3. Strategy opens position:
- Direction: LONG (Buy)
- Entry: 1.1000 (current close)
- Take Profit: 1.1110 (1.0% above entry)
- Stop Loss: 1.0945 (0.5% below entry)
- Risk/Reward: 2:1
4. Outcome scenarios:
- If price rises to 1.1110 → Take Profit hit (profit)
- If price falls to 1.0945 → Stop Loss hit (loss limited)
IMPORTANT NOTE ⚠️
-----------------
This strategy is a technical analysis tool based on CCI and EMA indicators.
Like all trading strategies, it does NOT guarantee profits. Trading involves
significant risks and you can lose money, including your entire investment.
Past performance does not guarantee future results.
Always:
- Use appropriate risk management
- Never risk more than you can afford to lose
- Test the strategy on historical data (backtesting) before using real money
- Start with small position sizes or paper trading
- Understand that no strategy works 100% of the time
- Consider market conditions, news events, and other factors
- Keep a trading journal to learn and improve
The author and contributors are NOT responsible for any losses incurred from
using this strategy. Trading decisions are your own responsibility. Profits
are NOT guaranteed, and losses are possible.
LICENSE 📄
----------
This code is open source and available for modification. You are free to use,
modify, and distribute this strategy. If you republish or share a modified
version, please kindly mention the original author.
================================================================================
Ultimate Lines Statistical Backtest @MaxMaseratiUltimate lines (MAs/MACD/VWAP,DWA etc..) Statistical Backtest
This is a comprehensive statistical backtesting tool that allows traders to objectively measure the performance of 27+ different trading lines across multiple timeframes and sessions. Instead of guessing which moving averages, VWAPs, or volume levels actually work for your trading style, this indicator provides hard data showing exactly how price behaves around each line at specific times of day.
The indicator solves a critical problem: most lines create whipsaws in choppy markets, but knowing which lines have the highest continuation rates vs reversal rates at specific session times helps you avoid false signals and focus on setups with proven statistical edges.
🎯 LINES YOU CAN TEST
MMM Core Lines:
Mid MA: Trend velocity tracker using simple moving average
MMPD Line: Premium/Discount change-of-direction indicator
Fair Value Golden Ratio: 0.618 equilibrium level between premium and discount zones
Volume-Based Lines:
VWAP Daily/Weekly: Volume-weighted average price (daily and weekly sessions)
Volume POC Multi-TF: Multi-timeframe Point of Control (highest volume price level)
Volume POC Weekly: Weekly momentum pivot based on volume distribution
Range Midpoints:
Range Midpoint 50: 50-period high/low midpoint
Range Midpoint 14 TF1/TF2: Configurable timeframe range midpoints with smoothing options
Moving Averages (10 MA Types):
MACD Fast (12) / Signal (26): Standard MACD moving averages
Fast MA 20 / Mid MA 50 / Slow MA 200: Classic trend-following averages
Available MA Types: SMA, EMA, WMA, HMA, DEMA, TEMA, LSMA, KAMA, ALMA, VWMA
Volatility Indicators:
MVM Upper/Lower Bands: Momentum-based volatility bands with adaptive option
HVC Bullish/Bearish: High Volume Candle support/resistance levels
Ultimate Suite Advanced Lines:
DWAP (Delta Weighted Average Price): Directional volume-weighted price with upper/lower bands
HVN (High Volume Node): High-frequency trading node detection
Hybrid Line: Volume-weighted momentum composite
Trend Filter: Two-pole smoothing filter for trend clarity
STL Lines:
iBuSTL / iBeSTL: Internal Bullish/Bearish Structural Trend Liquidity levels
⚙️ HOW TO TEST
Select Lines: Check the boxes for lines you want to analyze (Mid MA, VWAP Daily, Volume POC, etc.)
Choose Times: Enable tracking for specific session times (default: 8:30 AM, 9:30 AM, 10:00 AM, Daily Close - EST)
Set Lookback: Choose how many days of historical data to analyze (default: 60 days)
Enable Pattern Analysis: Turn on "Enable Pattern Analysis" in settings
Wait for Data: The indicator needs 20 bars after each signal time to complete analysis
Review Statistics: Check the statistics table for detailed breakdowns
📈 STATISTICS EXPLAINED
For Each Tracked Time, You'll See:
🟢 Above Selected Lines (X samples):
Continued↑: Price stayed above the lines = bullish continuation
Reversed↓: Price broke below the lines = reversal/rejection
→Kept Going↓: After reversing down, price continued lower (bars 11-20)
→Stalled: After reversing down, price came back up (consolidation)
Neutral: Price didn't make a clear move either way
🔴 Below Selected Lines (X samples):
Continued↓: Price stayed below the lines = bearish continuation
Reversed↑: Price broke above the lines = reversal/support bounce
→Kept Going↑: After reversing up, price continued higher (bars 11-20)
→Stalled: After reversing up, price came back down (consolidation)
Neutral: No clear directional move
⭐ Star Ratings: Show which outcome happens most frequently (best probability)
🔬 HYBRID DETECTION SYSTEM (ADVANCED)
When enabled, the indicator uses a multi-signal composite scoring system that goes beyond simple percentage movements:
Signal A - % Movement Direction (40% weight):
Measures the strength and direction of price movement. Strong directional moves (>0.8%) score higher, while opposite-direction moves score negatively.
Signal B - Inside Candles (30% weight):
Detects true consolidation by counting how many candles close within a defined range. High inside-candle counts indicate choppy, stalled price action rather than clean continuation.
Signal C - Successive Closes (30% weight):
Tracks momentum persistence by counting consecutive closes in the expected direction. Long streaks (6+ bars) indicate strong follow-through, while breaks in the sequence suggest weakness.
Composite Score Classification:
⭐⭐⭐ Strong (75-100 points): All three signals align - high-confidence pattern
⭐⭐ Moderate (50-75 points): Two signals agree - reliable pattern
⭐ Weak (25-50 points): Mixed signals - lower confidence
⚠️ Strong Stalled (0-25 points): Signals show consolidation/reversal
This provides nuanced pattern detection that identifies not just IF a pattern succeeded, but HOW STRONGLY it performed.
💡 INTERPRETING RESULTS
Good Lines Show:
High continuation % when price is above/below (>60% is strong)
Clean "Kept Going" patterns after reversals (>50% indicates reliable rejection)
Low stalled % (less whipsaw/consolidation)
Consistent patterns across multiple times (validates the line's reliability)
Poor Lines Show:
50/50 continuation vs reversal (coin flip = no edge)
High stalled % (lots of whipsaw/false signals)
Inconsistent patterns across different times (unreliable)
Example Interpretation:
9:30 AM - VWAP Daily (120 samples)
🟢 Above:
Continued↑ 75 (62.5%) ⭐ BEST
Reversed↓ 30 (25.0%)
Meaning: When price is above VWAP Daily at 9:30 AM, it continues higher 62.5% of the time - this is a statistically strong bullish signal for that session time.
🎯 PRACTICAL VALUE
Solves the Whipsaw Problem:
Most moving averages and lines work beautifully in trending markets but create endless false signals in choppy, range-bound conditions. By analyzing specific session times and continuation vs reversal patterns, you can:
Identify high-probability setups: Focus on lines that show >60% continuation at your preferred trading times
Avoid weak signals: Skip lines with high stall rates or 50/50 outcomes
Time your entries better: Know which session times produce the cleanest patterns
Combine complementary lines: Stack multiple high-scoring lines for confluence
Adapt to market conditions: Switch to different lines when market structure changes
Real-World Application:
Instead of blindly trading VWAP crosses or MA bounces, you'll have objective data showing: "At 9:30 AM on ES, when price is above Mid MA + VWAP Daily + Volume POC, it continues higher 68% of the time with strong momentum (⭐⭐⭐)." This transforms discretionary guesswork into data-driven decision making.
⚙️ LINE DEFINITIONS
Moving Averages: Smooth price data over X periods to identify trend direction and dynamic support/resistance.
VWAP: Anchored average price weighted by volume - institutional traders' benchmark for "fair value."
Volume POC (Point of Control): Price level with the most traded volume - represents maximum market acceptance.
Fair Value Golden Ratio: Fibonacci 0.618 level between recent premium (high) and discount (low) - equilibrium zone.
DWAP (Delta Weighted): Price average weighted by buying vs selling volume delta - shows directional money flow.
Range Midpoints: Geometric center of recent high/low range - mean reversion pivot.
Volatility Bands: Envelope around momentum lines showing normal price deviation ranges.
HVN (High Volume Node): Automated detection of high-volume price clusters - institutional accumulation/distribution zones.
Note: This indicator is purely for statistical analysis and backtesting. It does not generate trade signals or provide entry/exit recommendations. Use the statistics to inform your own trading decisions and strategy development.
Quality-Controlled Trend Strategy v2 (Expectancy Focused)This script focuses on quality control rather than curve-fitting.
No repainting, no intrabar tricks, no fake equity curves.
It uses confirmed-bar entries, ATR-based risk, and clean trend logic so backtests reflect what could actually be traded live.
If you publish scripts, this is the minimum structure worth sharing.
Why this script exists
TradingView’s public scripts are flooded with:
repainting indicators
no stop-loss logic
curve-fit entries that collapse live
strategies that look good only in hindsight
This script is intentionally boring but honest.
No repainting.
No intrabar tricks.
No fake equity curves
The goal is quality control, not hype.
What this strategy enforces
✔ Confirmed bars only
✔ Single source of truth for indicators
✔ Fixed risk structure
✔ No signal repainting
✔ Clean exits with unique IDs
✔ Works on any liquid market
Trading Logic (simple & auditable)
Trend filter
EMA 50 vs EMA 200
Entry
Pullback to EMA 50
RSI confirms momentum (not oversold/overbought)
Risk
ATR-based stop
Fixed R:R
One position at a time
This is the minimum bar for a strategy to be considered publish-worthy.
Why this helps TradingView quality
Most low-value scripts fail because they:
hide repainting logic
skip exits entirely
use inconsistent calculations
rely on hindsight candles
This strategy forces discipline:
every signal is confirmed
every trade has defined risk
behavior is repeatable across symbols & timeframes
If more scripts followed this baseline, TradingView’s public library would be far more usable.
MAs + Bollinger Bands by @ETERNYWORLDMAs + Bollinger Bands by @ETERNYWORLD is the core trend and volatility layer inside the Trend Mastery Pro ecosystem, engineered by EternityWorld to deliver a clean, structured, and highly customizable market bias reading directly on the chart.
What’s Inside the Indicator
5 independent Moving Averages (EMA or SMA) with individual enable/disable toggles, lengths, colors, and widths.
Bollinger Bands with professional basis options: SMA, EMA, RMA/SMMA, WMA, VWMA, plus adjustable deviation multiplier and visual band fill.
Chart overlay compatibility, making trend and volatility easy to interpret for fast decisions.
Fully configurable alerts, enabling traders to stay proactive without missing high-probability expansion triggers.
Enhanced by Trend Mastery Pro Workflow
This indicator complements the 3-step methodology of Trend Mastery Pro:
Bias → defines the dominant trend direction.
Trigger → identifies breakout or momentum expansion zones using confluence with volatility.
Management → supports consistent risk execution when combined with external strategy rules and trade plans.
Key Strengths
✔ Unified trend + volatility envelope on chart
✔ Individual component control (no clutter, no guesswork)
✔ Noise reduction in consolidation environments
✔ Adaptable to crypto, forex, indices, commodities, and equities
✔ Reliable for intraday impulse plays and structured directional setups
How to Use It
Context: Align your analysis with the broader bias before execution.
Signal: Watch for volatility expansion and trend alignment for breakout scenarios.
Execution: Apply your risk plan (position size, partials, BE/trailing) based on your trading model.
Best Practices
🛡️ Tune sensitivity according to asset volatility and timeframe horizon
🛡️ Avoid trading against dominant bias during compression phases
🛡️ Always validate through backtesting and forward testing before scaling
🛡️ Log performance and refine parameters iteratively
Who It's For
Traders who want:
A repeatable and disciplined process
A professional visual structure
Less noise, more clarity, better bias alignment
A premium indicator suite that supports real decision-making
Compatibility
Seamlessly works with any asset and timeframe on TradingView supporting chart overlay indicators. Alerts are designed to help monitoring without being glued to the screen.
Disclaimer ⚠️
This product is not financial advice and does not guarantee results. Performance varies depending on market conditions, asset behavior, user configuration, and applied risk management. Always trade responsibly and follow your own risk plan.
%-to-Tick Trailing Stop & VisualizerPercent-to-Tick Trailing Stop (strategy.exit Framework + Visualizer)
Overview
This script focuses on exit management and visualization, not entry performance. The included MA crossover entry is intentionally simple and replaceable.
Core idea (Percent → Tick conversion)
strategy.exit() trailing parameters are tick-based (trail_points, trail_offset, and loss).
This script lets you input distances in percent (%) and converts them into integer ticks using syminfo.mintick, making the same exit logic portable across most tick-based symbols/exchanges with different tick sizes.
//==What it provides==//
1. % → tick conversion for:
- Fixed stop loss (loss)
- Trailing activation distance (trail_points)
- Trailing offset distance (trail_offset)
2. On-chart visualization:
- Entry average price
- Trailing activation threshold
- Fixed stop-loss line
- Trailing stop line (with an exit-bar alignment attempt to reduce gaps)
//==How to use==//
1. Keep the included MA crossover entries, or replace them with your own entries.
2. Configure:
- Fixed Stop Loss % (loss_pct)
- Trailing Activation % (t_points_pct)
- Trailing Offset % (t_offset_pct)
3. Adjust commission/slippage defaults to match your market.
//==Important limitations (must read)==//
- calc_on_every_tick=true recalculates on realtime bars only; historical bars are evaluated differently. Backtests can differ from realtime behavior and may change after reload.
- Tick rounding: percent distances are rounded to integer ticks, so small differences can occur depending on tick size and price level.
- For more realistic intrabar backtesting, consider enabling Bar Magnifier in Strategy Properties (if available).
# Average Entry Price (Basis):
"Calculations are based on the position's average entry price (strategy.position_avg_price)."
# Pine Script v6:
"Written in the latest Pine Script v6."
요약
이 스크립트의 핵심은 “진입 전략”이 아니라 **strategy.exit()의 tick 기반 트레일링 파라미터를 % 입력으로 일반화(%→ticks 변환)**하여, 다양한 심볼/거래소의 서로 다른 tick size 환경에서도 동일한 exit 로직을 재사용할 수 있게 만든 “청산 프레임워크”입니다. 또한 calc_on_every_tick=true 환경에서 트리거/손절/트레일 라인을 실시간에 가깝게 시각화하는 데 중점을 두었습니다.
단, calc_on_every_tick은 실시간 바에서만 틱 단위 재계산이 적용되며, 히스토리 바/백테스트는 평가 방식이 달라 결과가 다를 수 있습니다.
Simple ema and sma cross
A simple EMA and SMA cross is an indicator that uses alpha from two moving averages: SMA (simple moving average) and EMA (exponential moving average).
The point where the EMA and SMA cross is usually a good place to enter a position.
The indicator includes smoothing settings to help you find the right calibration for your trading needs.
It also marks signals with triangles for easier use and includes alerts so you never miss a cross.
Currency VolumeShows the volumes in the currency of the chart including a custom moving average for noise attenuation.
Nested SMA WaveThe "Nested SMA Wave" is a custom Pine Script (v5) indicator for TradingView that overlays a series of 8 Simple Moving Averages (SMAs) on the price chart. These SMAs use exponentially increasing lengths based on powers of 2, starting from a user-defined base length (default: 25). This creates lengths like 25, 50, 100, 200, 400, 800, 1600, and 3200.
Each SMA is plotted in a distinct color, forming a "wave" of nested lines that fan out from short-term (faster, more responsive) to long-term (slower, smoother). Semi-transparent colored fills (shaded zones) are added between consecutive SMAs, with customizable toggles and transparency levels, creating layered visual bands that highlight the spaces between different trend timescales.
Use Cases
Multi-Timeframe Trend Visualization: The power-of-2 nesting approximates higher timeframe trends on lower timeframes without switching charts. Shorter SMAs react quickly to price changes, while longer ones show major trends, helping identify overall market structure at a glance.
Support/Resistance Identification: Price interacting with the SMA lines or shaded zones can act as dynamic support/resistance. Crossovers between nested SMAs signal potential momentum shifts.
Trend Strength and Alignment: When SMAs are widely spaced and aligned (e.g., all sloping up), it indicates strong trends. Converging or crossing SMAs suggest consolidation or reversals. The shaded zones add depth, making expansions/contractions in volatility or trend power visually obvious.
Ribbon-Style Trading: Similar to moving average ribbons, traders can look for price pulling back to inner zones for entries in the direction of the broader "wave," or use zone breaks for signals.
Customization for Different Assets/Timeframes: Adjust the base length (e.g., smaller for crypto volatility, larger for stocks) and toggle shades to reduce clutter.
This creates a visually rich, rainbow-like overlay that's particularly useful for trend-following strategies on any chart.






















