MTF OB & FVG detector w/ Alerts v2# MTF OB & FVG Detector with Alerts(マルチタイムフレーム オーダーブロック&フェアバリューギャップ検出器)
## 概要
このインジケーターは、複数の時間足で**オーダーブロック(OB)**と**フェアバリューギャップ(FVG)**を検出し、これらのゾーンからの反発をリアルタイムでアラート通知します。高度なボリューム分析とマルチタイムフレーム分析を組み合わせ、高確率のサポート・レジスタンスゾーンを特定します。
## 主な機能
### 1. マルチタイムフレーム オーダーブロック検出
- **対応時間足**: 1分、3分、5分、15分、60分
- 各時間足を個別に有効/無効化可能
- 正確な価格レベルでOBゾーンを自動表示
- ブル/ベア比率の内訳を含むボリューム情報表示
- タイプ別色分け: ブリッシュ(青)/ ベアリッシュ(赤)- 反転可能
### 2. フェアバリューギャップ(FVG)検出
- 現在のチャート時間足でブリッシュ・ベアリッシュFVGパターンを検出
- ギャップ内のボリューム分布を表示
- 色分け: ブリッシュ(アクア)/ ベアリッシュ(オレンジ)- 反転可能
- ミティゲート/ブレイクされたFVGを自動削除
- **注意**: 1分足チャートではデフォルトでFVGは無効化されていますが、設定で有効化できます。
### 3. インテリジェントなブレイク検出
- **オーダーブロック**: 価格がゾーンを突破すると自動削除
- ブリッシュOB: 価格が下に抜けると削除
- ベアリッシュOB: 価格が上に抜けると削除
- **フェアバリューギャップ**: 価格がギャップを完全にミティゲートすると削除
- ブレイク方法の設定: ヒゲベースまたは実体ベース
### 4. 高度なアラートシステム
- **反発アラート**: 価格がOBまたはFVGゾーンから反発した際にトリガー
- ブリッシュとベアリッシュで個別アラート
- アラートメッセージに時間足情報を含む
- 有効化されたすべての時間足を同時監視
- **新規OB形成アラート**: 新しいオーダーブロックが形成されたときに通知
- **統合ゾーンアラート**: 複数のOBが統合されたときに通知
- **設定可能な閾値**: 最小OB統合数を設定(デフォルト: 3、範囲: 2-10)
- 複数時間足にわたる強力なコンフルエンスゾーンを示す
- 高確率のサポート/レジスタンスエリアを警告
- より多くのOBが統合 = より強力なゾーン = より高いアラート優先度
- すべてのアラートを個別に有効/無効化可能
### 5. ビジュアルカスタマイズ
- **テキスト表示**: 現在時刻の3バー右から左寄せで表示
- **ゾーン延長**: 40バー先まで延長(設定可能)
- **色の反転**:
- OB: 青/赤 または 赤/青 の切り替え
- FVG: アクア/オレンジ または オレンジ/アクア の切り替え
- **下位時間足表示**: 1分足と3分足ゾーンのオプション表示
### 6. ボリューム分析
- 各OBにブル/ベア比率を含む総ボリュームを表示
- パーセンテージ内訳で優勢なボリューム側を表示
- FVGはギャップ全体のボリューム分布を表示
#### テキスト表示の見方
**オーダーブロックのテキスト形式:** ` 5m OB 12.5M (85%)`
- ** **: 複数の時間足が統合された場合に表示(オプション表示)
- **5m OB**: 時間足の識別子(5分足オーダーブロック)
- **12.5M**: OBゾーンで取引された総ボリューム(常に百万単位で小数点第1位まで表示)
- 例: 12.5M、0.8M、156.3M
- **(85%)**: 優勢(強い側)のボリュームの割合
- ブリッシュOBの場合: ブリッシュボリュームの割合(強い側)
- ベアリッシュOBの場合: ベアリッシュボリュームの割合(強い側)
- パーセンテージが高い = より強力なOB(一方的なボリューム)
**フェアバリューギャップのテキスト形式:** `15m FVG 8.3M (85%)`
- **15m FVG**: 時間足の識別子(15分足フェアバリューギャップ)
- **8.3M**: FVGの総ボリューム(常に百万単位で小数点第1位まで表示)
- 例: 8.3M、1.2M、45.7M
- **(85%)**: 優勢(強い側)のボリュームの割合
- ブリッシュFVGの場合: ブリッシュボリュームの割合(強い側)
- ベアリッシュFVGの場合: ベアリッシュボリュームの割合(強い側)
- パーセンテージが高い = より強力なFVG(一方的なボリューム)
## 使用方法
### 基本セットアップ
1. **チャートに追加**: TradingViewのインジケーターで「MTF OB & FVG detector」を検索
2. **時間足を選択**: 希望の時間足を有効化(デフォルト: 5分、15分、60分)
3. **アラート設定**: 反発と新規OB形成のアラートを有効化
### 設定ガイド
#### マルチタイムフレーム設定
- **Show Lower Timeframes**: 1分足と3分足ゾーンを表示(デフォルト: ON)
- **各時間足**: 各時間足(1m, 3m, 5m, 15m, 60m)の個別切り替え
- 推奨: チャートの混雑を避けるため2-3個の時間足を使用
#### 一般設定
- **Zone Count**: 時間足あたりのOB数(Low/Medium/High)
- Medium(5ゾーン): 複数時間足使用時に推奨
- High(10ゾーン): 少数時間足での詳細分析用
- **Swing Length**: OB検出の感度(デフォルト: 3)
- 低い値 = より小さく、より頻繁なOB
- 高い値 = より大きく、より少数のOB
- **Break Detection Method**: OB無効化にWickまたはBodyを選択
#### フェアバリューギャップ設定
- **Show Fair Value Gaps**: FVG表示の切り替え
- デフォルト: ON(すべての時間足)
- **Show FVG on 1-Minute Charts**: 1分足チャートでのFVG表示を有効化
- デフォルト: OFF(視覚的な混雑を減らしパフォーマンスを向上させるため無効)
- 1分足でもFVGを表示したい場合は有効化してください
- **Mitigation Source**: FVG無効化に終値またはhigh/lowを選択
- **Individual Gap Types**: ブリッシュまたはベアリッシュFVGを個別に有効/無効化
#### アラート設定
- **Enable Alerts**: すべてのアラートのマスタースイッチ
- **Alert on Bullish/Bearish Bounce**: 各方向の個別切り替え
- **Alert on New OB Formation**: 新しいOBが作成されたときに通知
- **Alert on Combined OBs**: 複数のOrder Blockが1つの強力なゾーンに統合されたときに通知
- **Min OBs for Strong Zone Alert**: アラートをトリガーするために必要な最小OB統合数を設定
- デフォルト: 3(3つ以上のOB)
- 範囲: 2-10
- 値が高い = より厳選的、最も強力なコンフルエンスゾーンのみをアラート
#### スタイル設定
- **Invert Colors**:
- OB: デフォルトはブリッシュ=赤、ベアリッシュ=青
- FVG: デフォルトはブリッシュ=オレンジ、ベアリッシュ=アクア
- **Extend Zones**: ゾーンを前方に延長するバー数(デフォルト: 40)
### トレーディング戦略
#### 1. 統合ゾーンでの反転取引
- 「Combine Overlapping Order Blocks」機能を有効化
- 統合ゾーン(例:「5m & 15m & 1H」)は強力なサポート/レジスタンスを示す
- これらのゾーンは重要な転換点を示すことが多い
- 価格が高ボリュームで統合ゾーンにタッチするのを待つ
- 反転確認(ローソク足パターン、モメンタムダイバージェンス)でエントリー
- ストップロスは直近安値、直近高値を指定する等の高度な判断が必要(ゾーン端をストップロスにすると値幅が大きくなってしまうため)
#### 2. FVGフィリング
- FVGは価格の磁石として機能
- 未充填のギャップに向けてトレード
- 価格がギャップを完全に埋めたら決済
#### 3. OB/FVGを使ったトレンドフォロー
- 現在のトレンド方向を特定
- トレンド方向のOB/FVGからの反発のみを取引
- 上昇トレンド: ブリッシュ反発のみを取引
- 下降トレンド: ベアリッシュ反発のみを取引
- 上位時間足のOB(15分、60分)をトレンド確認に使用
- 下位時間足のOB(1分、3分)を精密なエントリーに使用
- 移動平均線やトレンドインジケーターと組み合わせると最良の結果
## 技術詳細
### オーダーブロックのロジック
- 設定可能なスイング長を使用してスイング高値/安値を検出
- 価格移動前のボリューム蓄積ゾーンを特定
- ブレイカーキャンドルでブレイクアウト確認を追跡
- 無効化されたゾーンを自動削除
### フェアバリューギャップのロジック
- キャンドル1と3の間にギャップがある3キャンドルパターンを識別
- 有効性のための最小ギャップサイズが必要
- 価格がギャップを通過する際のミティゲーションを追跡
- ギャップの強度のためのボリューム加重分析
### メモリ最適化
- 最大100個のボックス/ラベル/ラインを同時表示
- ブレイクされたゾーンの自動クリーンアップ
- 複数時間足でのパフォーマンスに最適化
- 効率的な配列管理
## ベストプラクティス
1. **シンプルに始める**: 最初は2-3個の時間足から始める
2. **ゾーン数を調整**: 多くの時間足を有効化する場合は「Medium」または「Low」を使用
3. **反発を確認**: アラートだけでトレードせず、価格確認を待つ
4. **ストップロスを使用**: 必ずゾーン境界を超えてストップを設定
5. **バックテスト**: ライブトレード前に過去データでテスト
6. **他のツールと組み合わせ**: トレンドインジケーター、ボリュームプロファイルなどと併用
## 制限事項
- 同時に最大100個のボックスを表示可能
- FVG検出は現在のチャート時間足に限定
- 有効化する時間足が多いほど、時間足あたりに表示できるゾーンが少なくなる
- ボックス上限に達すると、過去のゾーンが消える場合がある
## サポートとアップデート
質問、バグレポート、または機能リクエストについては、インジケーターページにコメントするか、作成者に連絡してください。
## クレジット
このインジケーターは、以下の優れたTradingViewインジケーターの機能を統合・強化しています:
- ** ()** by @fluxchart
- ボリューム情報を含むオーダーブロック検出ロジック
- マルチタイムフレームレンダリング機能
- ゾーン無効化メソッド
- ** ()** by @BigBeluga
- フェアバリューギャップ検出アルゴリズム
- ボリューム分解分析
- ミティゲーション追跡システム
その他、以下のコンセプトに基づいています:
- スマートマネーコンセプト(SMC)
- 機関投資家のオーダーフロー
- ボリュームプロファイル分析
オープンソースでトレーディングコミュニティに貢献してくださった原作者の方々に感謝いたします。
## 免責事項
このインジケーターは教育目的のみです。過去のパフォーマンスは将来の結果を示すものではありません。常に適切なリスク管理を実践し、失う余裕のない金額以上をリスクにさらさないでください。
---
**バージョン**: 1.0
**Pine Scriptバージョン**: 6
**チャートタイプ**: すべて
**時間足**: すべて(マルチタイムフレーム分析)
---
# MTF OB & FVG Detector with Alerts
## Overview
This indicator detects **Order Blocks (OB)** and **Fair Value Gaps (FVG)** across multiple timeframes and provides real-time alerts for bounces from these zones. It combines advanced volume analysis with multi-timeframe analysis to identify high-probability support and resistance zones.
## Key Features
### 1. Multi-Timeframe Order Block Detection
- **Supported Timeframes**: 1min, 3min, 5min, 15min, 60min
- Each timeframe can be independently enabled/disabled
- Automatically displays OB zones with precise price levels
- Volume information displayed with bull/bear percentage breakdown
- Color-coded by type: Bullish (Blue) / Bearish (Red) - invertible
### 2. Fair Value Gap (FVG) Detection
- Detects bullish and bearish FVG patterns on current chart timeframe
- Displays volume distribution within gaps
- Color-coded: Bullish (Aqua) / Bearish (Orange) - invertible
- Automatically removes mitigated/broken FVGs
- **Note**: FVG is disabled by default on 1-minute charts to reduce visual clutter, but can be enabled via settings.
### 3. Intelligent Break Detection
- **Order Blocks**: Automatically removed when price breaks through the zone
- Bullish OB: Removed when price breaks below
- Bearish OB: Removed when price breaks above
- **Fair Value Gaps**: Removed when price fully mitigates the gap
- Configurable break method: Wick-based or Body-based
### 4. Advanced Alert System
- **Bounce Alerts**: Triggered when price bounces from OB or FVG zones
- Separate alerts for bullish and bearish bounces
- Includes timeframe information in alert message
- Monitors all enabled timeframes simultaneously
- **New OB Formation Alerts**: Notified when a new Order Block is formed
- **Combined Zone Alerts**: Notified when multiple OBs are combined
- **Configurable threshold**: Set minimum number of OBs (default: 3, range: 2-10)
- Indicates strong confluence zones across multiple timeframes
- Signals high-probability support/resistance areas
- More OBs combined = stronger zone = higher alert priority
- All alerts can be individually enabled/disabled
### 5. Visual Customization
- **Text Display**: Left-aligned text starting 3 bars from current time
- **Zone Extension**: 40 bars forward (configurable)
- **Color Inversion**:
- OB: Toggle between Blue/Red or Red/Blue
- FVG: Toggle between Aqua/Orange or Orange/Aqua
- **Lower Timeframe Display**: Optional display of 1min and 3min zones
### 6. Volume Analysis
- Each OB displays total volume with bull/bear ratio
- Percentage breakdown shows dominant volume side
- FVG shows volume distribution across the gap
#### Understanding the Text Display
**Order Block Text Format:** ` 5m OB 12.5M (85%)`
- ** **: Appears when multiple timeframes are merged (optional display)
- **5m OB**: Timeframe identifier (5-minute Order Block)
- **12.5M**: Total volume traded in the OB zone (always in millions with 1 decimal place)
- Examples: 12.5M, 0.8M, 156.3M
- **(85%)**: Percentage of dominant (stronger) volume side
- If bullish: Shows proportion of bullish volume (stronger side)
- If bearish: Shows proportion of bearish volume (stronger side)
- Higher percentage = stronger OB (more one-sided volume)
**Fair Value Gap Text Format:** `15m FVG 8.3M (85%)`
- **15m FVG**: Timeframe identifier (15-minute Fair Value Gap)
- **8.3M**: Total volume in the FVG (always in millions with 1 decimal place)
- Examples: 8.3M, 1.2M, 45.7M
- **(85%)**: Percentage of dominant (stronger) volume side
- If bullish: Shows proportion of bullish volume (stronger side)
- If bearish: Shows proportion of bearish volume (stronger side)
- Higher percentage = stronger FVG (more one-sided volume)
## How to Use
### Basic Setup
1. **Add to Chart**: Search for "MTF OB & FVG detector" in TradingView indicators
2. **Select Timeframes**: Enable desired timeframes (default: 5min, 15min, 60min)
3. **Configure Alerts**: Enable alerts for bounces and new OB formations
### Settings Guide
#### Multi-Timeframe Settings
- **Show Lower Timeframes**: Enable to show 1min and 3min zones (default: ON)
- **Individual Timeframes**: Toggle each timeframe (1m, 3m, 5m, 15m, 60m)
- Recommended: Use 2-3 timeframes to avoid chart clutter
#### General Configuration
- **Zone Count**: Number of OBs per timeframe (Low/Medium/High)
- Medium (5 zones) recommended for multiple timeframes
- High (10 zones) for detailed analysis on fewer timeframes
- **Swing Length**: Sensitivity for OB detection (default: 3)
- Lower values = smaller, more frequent OBs
- Higher values = larger, fewer OBs
- **Break Detection Method**: Choose Wick or Body for OB invalidation
#### Fair Value Gap Settings
- **Show Fair Value Gaps**: Toggle FVG display
- Default: ON (for all timeframes)
- **Show FVG on 1-Minute Charts**: Enable FVG display on 1-minute charts
- Default: OFF (disabled to reduce visual clutter and improve performance)
- Enable if you want to see FVG on 1-minute charts
- **Mitigation Source**: Choose close price or high/low for FVG invalidation
- **Individual Gap Types**: Enable/disable bullish or bearish FVGs separately
#### Alert Settings
- **Enable Alerts**: Master switch for all alerts
- **Alert on Bullish/Bearish Bounce**: Separate toggles for each direction
- **Alert on New OB Formation**: Get notified when new OBs are created
- **Alert on Combined OBs**: Get notified when multiple Order Blocks are combined into one powerful zone
- **Min OBs for Strong Zone Alert**: Set the minimum number of OBs that must be combined to trigger the alert
- Default: 3 (three or more OBs)
- Range: 2-10
- Higher values = more selective, only alerting on the strongest confluence zones
#### Style Settings
- **Invert Colors**:
- OB: Default is Bullish=Red, Bearish=Blue
- FVG: Default is Bullish=Orange, Bearish=Aqua
- **Extend Zones**: Number of bars to extend zones forward (default: 40)
### Trading Strategies
#### 1. Reversal Trading at Combined Zones
- Enable "Combine Overlapping Order Blocks" feature
- Combined zones (e.g., "5m & 15m & 1H") indicate strong support/resistance
- These zones often mark significant turning points
- Wait for price to touch the combined zone with high volume
- Enter on reversal confirmation (candlestick patterns, momentum divergence)
- Stop-loss requires advanced judgment such as using recent lows/highs (placing stops at zone edges results in wide ranges)
#### 2. FVG Filling
- FVGs act as magnets for price
- Trade towards unfilled gaps as targets
- Exit when price fully fills the gap
#### 3. Trend Following with OB/FVG
- Identify the current trend direction
- Only take bounces from OBs/FVGs in trend direction
- In uptrend: Trade only bullish bounces
- In downtrend: Trade only bearish bounces
- Use higher timeframe OBs (15min, 60min) for trend confirmation
- Use lower timeframe OBs (1min, 3min) for precise entries
- Combine with moving averages or trend indicators for best results
## Technical Details
### Order Block Logic
- Detects swing highs/lows using configurable swing length
- Identifies volume accumulation zones before price moves
- Tracks breakout confirmation with breaker candles
- Automatically removes invalidated zones
### Fair Value Gap Logic
- Identifies 3-candle patterns with gap between candles 1 and 3
- Minimum gap size required for validity
- Tracks mitigation as price moves through the gap
- Volume-weighted analysis for gap strength
### Memory Optimization
- Maximum 100 boxes/labels/lines simultaneously
- Automatic cleanup of broken zones
- Optimized for performance with multiple timeframes
- Efficient array management
## Best Practices
1. **Start Simple**: Begin with 2-3 timeframes before adding more
2. **Adjust Zone Count**: Use "Medium" or "Low" when enabling many timeframes
3. **Confirm Bounces**: Don't trade on alerts alone - wait for price confirmation
4. **Use Stop Losses**: Always set stops beyond the zone boundaries
5. **Backtest**: Test the indicator on historical data before live trading
6. **Combine with Other Tools**: Use with trend indicators, volume profile, etc.
## Limitations
- Maximum of 100 boxes can be displayed simultaneously
- FVG detection is limited to current chart timeframe
- More timeframes enabled = fewer zones per timeframe can be shown
- Historical zones may disappear if box limit is reached
## Support and Updates
For questions, bug reports, or feature requests, please comment on the indicator page or contact the author.
## Credits
This indicator integrates and enhances features from the following excellent TradingView indicators:
- ** ()** by @fluxchart
- Order Block detection logic with volumetric information
- Multi-timeframe rendering capabilities
- Zone invalidation methods
- ** ()** by @BigBeluga
- Fair Value Gap detection algorithm
- Volume decomposition analysis
- Mitigation tracking system
Additional concepts based on:
- Smart Money Concepts (SMC)
- Institutional Order Flow
- Volume Profile Analysis
Special thanks to the original authors for their open-source contributions to the trading community.
## Disclaimer
This indicator is for educational purposes only. Past performance is not indicative of future results. Always practice proper risk management and never risk more than you can afford to lose.
---
**Version**: 1.0
**Pine Script Version**: 6
**Chart Type**: Any
**Timeframe**: Any (multi-timeframe analysis)
Analyse de la tendance
SMA RibbonSMA RIBBON for simple yet powerful indicator. 2-3 SMAs are plotted in one indicator so that the limit for indicator usage is brought down.
EPS Trendline (Fundamentals Insight by Mazhar Karimi)Overview
This indicator visualizes a company’s Earnings Per Share (EPS) data directly on the chart—pulled from TradingView’s fundamental database—and applies a dynamic linear regression trendline to highlight the long-term direction of earnings growth or decline.
It’s designed to help investors and quantitative traders quickly see how the company’s profitability (EPS) has evolved over time and whether it’s trending upward (growth), flat (stagnant), or downward (decline).
How it Works
Uses request.financial() to fetch EPS data (Diluted or Basic).
You can select whether to use TTM (Trailing Twelve Months), FQ (Fiscal Quarter), or FY (Fiscal Year) data.
The script fits a regression line (using ta.linreg) over a configurable window to visualize the underlying EPS trend.
Updates automatically when new financial data is released.
Inputs
EPS Period: Choose between FQ / FY / TTM
Use Diluted EPS: Toggle to compare Diluted vs. Basic EPS
Regression Window: Adjust how many bars are used to fit the trendline
Interpretation Tips
A rising trendline indicates earnings momentum and potential investor confidence.
A flat or declining trendline may warn of profitability slowdowns.
Combine with price action or valuation ratios (like P/E) for deeper analysis.
Works best on stocks or ETFs with fundamental data (not available for crypto or FX).
Suggestions / Use Cases
Pair with Price/Earnings ratio indicators to evaluate valuation vs. fundamentals.
Use in conjunction with earnings release events for context.
Ideal for long-term investors, swing traders, or fundamental quants tracking financial health trends.
Future Enhancements (Planned Ideas)
🔹 Option to display multiple regression lines (short-term and long-term)
🔹 Support for comparing multiple tickers’ EPS in the same pane
🔹 Integration with Net Income, Revenue, or Free Cash Flow trends
🔹 Add a “Rate of Change” signal for momentum-based EPS analysis
Multi-Timeframe EMA Cloud StatusCompares the current bar on three configurable timeframes with the location of the "cloud" defined by the 20 and 50 period EMAs and, in table format, indicates if the bar is above, within or below the cloud.
fibonacci2Library "fibonacci2"
Useful methods to calculate and display fibonacci retracement
modelParamsNew(point_0, point_1)
Parameters:
point_0 (chart.point)
point_1 (chart.point)
modelParamsNew(this, point_0, point_1)
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method toModelParams(this, point_0, point_1)
Namespace types: viewParams
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method createModel(params)
Namespace types: modelParams
Parameters:
params (modelParams)
method createView(this, params)
Namespace types: model
Parameters:
this (model)
params (viewParams)
method delete(view)
Namespace types: view
Parameters:
view (view)
levelModelParams
Fields:
level (series float)
levelViewParams
Fields:
level (series float)
color (series color)
line_width (series int)
line_style (series lineStyleEnum enum from Hamster-Coder/drawing/1)
levelModel
Represents a Fibonacci retracement level
Fields:
level (series float) : The Fibonacci level ratio (e.g., 0.382, 0.5, 0.618)
value (series float) : The Y-coordinate on the chart corresponding to this level
modelParams
Represents the full parameter set for the Fibonacci retracement model
Fields:
point_1 (chart.point) : Coordinates of the anchor Point (1) of the model
point_0 (chart.point) : Coordinates of the anchor Point (0) of the model
levels (array) : List of levels to display for this model
model
Fields:
point_1 (chart.point)
point_0 (chart.point)
levels (array)
viewParams
Fields:
levels (array)
x1 (series int)
x2 (series int)
xloc (series string)
show_level_value (series bool)
value_format (series string)
force_overlay (series bool)
view
Fields:
model (model)
lines (array)
labels (array)
ES on MNQES on MNQ — ES percent-move overlay on the MNQ price scale.
Overview
This indicator projects the ES’s intraday percent change since session open onto the MNQ price scale. At the session start (18:00 chart time), it stores the ES open and the MNQ open, tracks ES’s percentage move from that anchor, and applies the same percent move to the MNQ open. The result is a single line that behaves like ES but is plotted in MNQ points—useful for spotting convergence/divergence, failed breaks, and mean-reversion setups between ES and MNQ.
How it works
1. Detects session open (18:00 on your chart).
2. Saves ES_open and MNQ_open.
3. Computes pct = (ES_close - ES_open) / ES_open.
4. Plots MNQ_open * (1 + pct) as the ES-on-MNQ line.
A label on the last bar shows the current ES value for quick reference.
Inputs
• ES Symbol: default ES1! (change if you use a different continuous).
• Line Color: color of the overlaid ES-on-MNQ line.
Works best on intraday timeframes and when your chart’s session aligns with ES.
Why it’s useful
• Highlights divergences (MNQ decoupling from ES baseline).
• Aids confirmation on pullbacks/breakouts when MNQ’s move disagrees with the ES-based projection.
• Helps risk control by flagging stretches likely to revert toward the ES-anchored path.
Notes & limitations
• This is a percent-rebasing overlay, not a hedge ratio, fair value, or spread model.
• Session/timezone settings matter; if your feed doesn’t print exactly at 18:00 on a higher timeframe, use a smaller TF or adjust session settings.
• Minor differences between ES (full) and MNQ (micro) and data latency can create small offsets.
Disclaimer
For educational use only. Not financial advice. Use proper risk management.
VIX on MNQVIX on MNQ — VIX percent-move overlay on the MNQ price scale (daily-open anchor, optional inversion)
Overview
This indicator projects the VIX’s intraday percent change from the daily open onto the MNQ price scale. It takes today’s open for both VIX and MNQ, measures the VIX’s percentage move since that open, optionally inverts it (given the typical inverse relationship), and applies a scale factor to fit that move onto MNQ’s price axis. The result is a single line that reflects VIX dynamics but is plotted in MNQ points—great for reading risk-on/risk-off tone, spotting divergences, and timing mean-reversion around volatility spikes.
How it works
• Fetches VIX close on your chart timeframe and today’s open for VIX and MNQ.
• Computes pct = (VIX_close − VIX_open) / VIX_open.
• Optionally multiplies by −1 (invert) and then by a Scale Factor to compress amplitude.
• Plots MNQ_open * (1 + pct * (invert? −1 : 1) * scaleFactor) as the VIX-on-MNQ line.
• Adds a last-bar label with the current VIX value and a small info panel (VIX, % change, scaled level).
Inputs
• VIX Symbol: VIX, CBOE:VIX, or TVC:VIX (pick the one that matches your data feed).
• VIX Line Color: color of the overlay line.
• Invert VIX: flip the sign to reflect inverse correlation with MNQ.
• Scale Factor (default 0.05): tune how much of the VIX move is mapped onto MNQ points.
Why it’s useful
• Surfaces volatility-led divergences: when MNQ’s path disagrees with VIX’s risk signal.
• Helps confirm/fade breakouts and pullbacks during volatility expansions/compressions.
• Provides a quick, visual “volatility baseline” directly on the MNQ chart without juggling two panes.
Notes & limitations
• This is a percent-rebased overlay, not a hedge ratio, fair value, or spread model.
• It anchors to the current day’s open; session/timezone settings and your VIX symbol choice (CBOE:VIX vs TVC:VIX) can affect exact prints.
• The scale factor is intentionally manual—adjust until the overlay’s swings are visually informative for your setup.
Disclaimer
For educational use only. Not financial advice. Always manage risk.
Supertrend + EMA50 — Signal (no labels) chpolSupertrend + EMA50, best for 15 minutes, Forex, Crypto, XAUUSD.
3D Cube Projection - √3 Diagonal3D Cube Projection - √3 Diagonal
OVERVIEW
This indicator implements Bradley F. Cowan's cube projection methodology from his "Four Dimensional Stock Market Structures & Cycles" work. It visualizes a 3D cube projected onto the 2D price-time chart, using the √3 (square root of 3) body diagonal as the primary analytical tool for identifying market structure and potential cycle termination points.
METHODOLOGY
The cube is constructed by selecting two pivot points (A and E) which form the body diagonal - the longest diagonal running through the cube's interior from one corner to the diagonally opposite corner. According to Cowan's geometric approach:
- Point A = Starting pivot (low or high)
- Point E = Ending pivot (opposite extreme)
- Body Diagonal (A→E) = √3 × cube side length
- Face Diagonal (A→C) = √2 × cube side length
The script calculates the cube dimensions by:
1. Measuring the total price range from A to E
2. Dividing by √3 to determine the cube side length in price
3. Distributing the time component across three equal segments
4. Projecting the 3D structure onto the 2D chart plane
FEATURES
✓ Interactive date selection for points A and E
✓ Automatic UPLEG/DOWNLEG detection
✓ All 8 cube vertices labeled (A-H)
✓ All 6 cube faces with independent color/opacity controls
✓ √3 body diagonal (red line by default)
✓ √2 face diagonal (orange line by default)
✓ Customizable cube lines, fills, and labels
✓ Information table showing key measurements
VISUAL CUSTOMIZATION
- Front & Back faces: Box fills for the two square faces
- Side faces: Left and right vertical faces
- Top & Bottom faces: Horizontal connecting faces
- Each group has independent color and opacity settings
- Label size and transparency fully adjustable
- Cube line styles (solid, dashed, dotted) for depth perception
IMPORTANT LIMITATIONS & DISCLOSURES
This indicator works within the inherent constraints of projecting 3D geometry onto a 2D price-time chart:
⚠️ VISUAL APPROXIMATION: This is a visual projection tool, not a mathematically perfect 3D cube. True 3D geometry cannot be accurately represented on a 2D plane without distortion.
⚠️ TIME DISTRIBUTION: The script divides the time axis into three equal segments (total bars ÷ 3) for practical visualization. This is an approximation that prioritizes visual coherence over strict geometric accuracy.
⚠️ UNIT SCALING: Price and time use different units (dollars vs. bars), making true isometric projection impossible. The cube appears proportional on screen but the dimensions are not directly comparable.
⚠️ 2D CONSTRAINT: We only have X (time) and Y (price) axes available. The Z-axis (depth) is simulated through visual projection techniques (line styles, shading).
INTENDED USE
This tool is designed for traders and analysts who study Bradley Cowan's geometric market analysis methods. It helps visualize:
- Market structure in geometric terms
- Potential support/resistance zones at cube edges
- Cycle timing relationships using √2 and √3 ratios
- Harmonic price-time relationships
The cube projection should be used as one component of a comprehensive analysis approach, combined with other technical tools and fundamental analysis.
MATHEMATICAL FOUNDATION
While the visual representation involves approximations, the core √3 relationship is mathematically sound:
- For any cube, the body diagonal = √3 × side length
- The face diagonal = √2 × side length
- These ratios are preserved in the price dimension calculations
HOW TO USE
1. Select your starting date (Point A) - typically a significant low or high
2. Select your ending date (Point E) - the opposite extreme pivot
3. The indicator automatically constructs the cube geometry
4. Analyze the cube edges, diagonals, and faces for market structure insights
5. Adjust colors and opacity to suit your chart aesthetic
TECHNICAL NOTES
- Works on all timeframes and instruments
- Best viewed on charts with sufficient historical data
- Cube updates in real-time as new bars form
- Range selection is marked with vertical lines and shading
- Calculator table shows Point A, Point E, side length, and bar measurements
ACKNOWLEDGMENT
This indicator is based on the geometric market analysis principles developed by Bradley F. Cowan. Users are encouraged to study Cowan's original works for deeper understanding of the theoretical framework.
DISCLAIMER
This indicator is for educational and analytical purposes only. It does not constitute financial advice. Past performance does not guarantee future results. Always conduct your own research and risk management before making trading decisions.
GC Scalping Plan - No Stop LossLevels for Gold...........................................................................................................................................................
Pulse RSI | Lyro RSPulse RSI | Lyro RS
The Pulse RSI is a momentum oscillator that enhances the traditional RSI by incorporating volume-weighted price and linear regression. It generates multiple trading signals, including trend shifts, overbought/oversold conditions, and custom threshold levels.
By integrating both price and volume into its calculation, Pulse RSI is more robust and responsive than the standard RSI. This helps you identify trends faster, spot potential reversals sooner, and set up custom alerts based on your own strategy.
Key Features
Four Signal Types:
Type 1 (Trend): Triggers when the indicator's current value crosses its previous value, highlighting short-term momentum shifts.
Type 2 (Midline Trend): The classic midline cross. A bullish bias is indicated above 50, while a bearish bias is indicated below 50.
Type 3 (Overbought/Oversold): Flags potential reversal zones, suggesting where buying or selling opportunities may emerge.
Type 4 (Custom Thresholds): This type lets you define your own threshold levels. Instead of following a trend, use it to mark your specific conditions for a reversal. For example, set a long reversal at a low level (e.g., 5) for an early buy signal, or a short reversal at a high level (e.g., 80) for an early sell signal.
Calculation Method:
The indicator uses a volume-weighted price (Close * High * Low) and applies linear regression to smooth the data. This creates a unique and more stable oscillator, avoiding the chaotic movement seen in others.
Color System:
Choose from multiple color themes like Classic, Mystic, Accented, and Royal, or create your own custom colors for bullish and bearish signals.
Visual Plotting:
Features a clear plot with a glow effect, a midline, adjustable threshold lines, and shapes/labels to mark long/short and overbought/oversold signals.
Alerts:
Instant alerts are available for every signal type, which you can quickly enable based on your trading conditions.
How It Works:
Core Calculation
The indicator calculates a volume-weighted price using (Close * High * Low) multiplied by the absolute volume. This value is then smoothed with linear regression and converted into an oscillator, normalized to a 0-100 scale.
Trading Logic:
Bullish Signals: Trigger when the main plot line crosses above a key level—be it the previous value, the 50 midline, or a custom threshold.
Bearish Signals: Trigger when the main plot line crosses below a key level.
Visual Logic:
The system displays a main plot line, colors candles, and plots signal shapes, all customizable through a variety of color schemes.
Practical Use
Trend Confirmation (Types 1 & 2): Use Type 1 for early momentum shifts and Type 2 to confirm the overall trend direction.
Reversals (Type 3): Consider long entries when oversold signals fire, suggesting an asset is undervalued. Look for exits at overbought signals, which suggest a potential downward reversal.
Custom Thresholds (Type 4): Set tight thresholds to catch early trends and reversals. Be aware that more sensitive settings may also increase false positives.
Customization:
Adjust the Length: A higher setting makes the indicator more suited for long-term trends, while a lower setting makes it more sensitive for short-term moves.
Enable/Disable Signals: Turn the four signal types on or off to match your trading style.
Set Your Levels: Fully adjustable thresholds for Type 4 long/short conditions.
Choose Your Colors: Select from a variety of color schemes for all bullish and bearish elements.
⚠️ Disclaimer
This indicator is a tool for technical analysis and does not guarantee results. It should be used alongside other analysis methods and solid risk management practices. The creators are not responsible for any financial decisions made based on its signals.
Range Trading StrategyOVERVIEW
The Range Trading Strategy is a systematic trading approach that identifies price ranges
from higher timeframe candles or trading sessions, tracks pivot points, and generates
trading signals when range extremes are mitigated and confirmed by pivot levels.
CORE CONCEPT
The strategy is based on the principle that when a candle (or session) closes within the
range of the previous candle (or session), that previous candle becomes a "range" with
identifiable high and low extremes. When price breaks through these extremes, it creates
trading opportunities that are confirmed by pivot levels.
RANGE DETECTION MODES
1. HTF (Higher Timeframe) Mode:
Automatically selects a higher timeframe based on the current chart timeframe
Uses request.security() to fetch HTF candle data
Range is created when an HTF candle closes within the previous HTF candle's range
The previous HTF candle's high and low become the range extremes
2. Sessions Mode:
- Divides the trading day into 4 sessions (UTC):
* Session 1: 00:00 - 06:00 (6 hours)
* Session 2: 06:00 - 12:00 (6 hours)
* Session 3: 12:00 - 20:00 (8 hours)
* Session 4: 20:00 - 00:00 (4 hours, spans midnight)
- Tracks high, low, and close for each session
- Range is created when a session closes within the previous session's range
- The previous session's high and low become the range extremes
PIVOT DETECTION
Pivots are detected based on candle color changes (bullish/bearish transitions):
1. Pivot Low:
Created when a bullish candle appears after a bearish candle
Pivot low = minimum of the current candle's low and previous candle's low
The pivot bar is the actual bar where the low was formed (current or previous bar)
2. Pivot High:
Created when a bearish candle appears after a bullish candle
Pivot high = maximum of the current candle's high and previous candle's high
The pivot bar is the actual bar where the high was formed (current or previous bar)
IMPORTANT: There is always only ONE active pivot high and ONE active pivot low at any
given time. When a new pivot is created, it replaces the previous one.
RANGE CREATION
A range is created when:
(HTF Mode) An HTF candle closes within the previous HTF candle's range AND a new HTF
candle has just started
(Sessions Mode) A session closes within the previous session's range AND a new session
has just started
Or Range Can Be Created when the Extreme of Another Range Gets Mitigated and We Have a Pivot low Just Above the Range Low or Pivot High just Below the Range High
Range Properties:
rangeHigh: The high extreme of the range
rangeLow: The low extreme of the range
highStartTime: The timestamp when the range high was actually formed (found by looping
backwards through bars)
lowStartTime: The timestamp when the range low was actually formed (found by looping
backwards through bars)
highMitigated / lowMitigated: Flags tracking whether each extreme has been broken
isSpecial: Flag indicating if this is a "special range" (see Special Ranges section)
RANGE MITIGATION
A range extreme is considered "mitigated" when price interacts with it:
High is mitigated when: high >= rangeHigh (any interaction at or above the level)
Low is mitigated when: low <= rangeLow (any interaction at or below the level)
Mitigation can happen:
At the moment of range creation (if price is already beyond the extreme)
At any point after range creation when price touches the extreme
SIGNAL GENERATION
1. Pending Signals:
When a range extreme is mitigated, a pending signal is created:
a) BEARISH Pending Signal:
- Triggered when: rangeHigh is mitigated
- Confirmation Level: Current pivotLow
- Signal is confirmed when: close < pivotLow
- Stop Loss: Current pivotHigh (at time of confirmation)
- Entry: Short position
Signal Confirmation
b) BULLISH Pending Signal:
- Triggered when: rangeLow is mitigated
- Confirmation Level: Current pivotHigh
- Signal is confirmed when: close > pivotHigh
- Stop Loss: Current pivotLow (at time of confirmation)
- Entry: Long position
IMPORTANT: There is only ever ONE pending bearish signal and ONE pending bullish signal
at any given time. When a new pending signal is created, it replaces the previous one
of the same type.
2. Signal Confirmation:
- Bearish: Confirmed when price closes below the pivot low (confirmation level)
- Bullish: Confirmed when price closes above the pivot high (confirmation level)
- Upon confirmation, a trade is entered immediately
- The confirmation line is drawn from the pivot bar to the confirmation bar
TRADE EXECUTION
When a signal is confirmed:
1. Position Management:
- Any existing position in the opposite direction is closed first
- Then the new position is entered
2. Stop Loss:
- Bearish (Short): Stop at pivotHigh
- Bullish (Long): Stop at pivotLow
3. Take Profit:
- Calculated using Risk:Reward Ratio (default 2:1)
- Risk = Distance from entry to stop loss
- Target = Entry ± (Risk × R:R Ratio)
- Can be disabled with "Stop Loss Only" toggle
4. Trade Comments:
- "Range Bear" for short trades
- "Range Bull" for long trades
SPECIAL RANGES
Special ranges are created when:
- A range high is mitigated AND the current pivotHigh is below the range high
- A range low is mitigated AND the current pivotLow is above the range low
In these cases:
- The pivot value is stored in an array (storedPivotHighs or storedPivotLows)
- A "special range" is created with only ONE extreme:
* If pivotHigh < rangeHigh: Creates a range with rangeHigh = pivotLow, rangeLow = na
* If pivotLow > rangeLow: Creates a range with rangeLow = pivotHigh, rangeHigh = na
- Special ranges can generate signals just like normal ranges
- If a special range is mitigated on the creation bar or the next bar, it is removed
entirely without generating signals (prevents false signals)
Special Ranges
REVERSE ON STOP LOSS
When enabled, if a stop loss is hit, the strategy automatically opens a trade in the
opposite direction:
1. Long Stop Loss Hit:
- Detects when: position_size > 0 AND position_size <= 0 AND low <= longStopLoss
- Action: Opens a SHORT position
- Stop Loss: Current pivotHigh
- Trade Comment: "Reverse on Stop"
2. Short Stop Loss Hit:
- Detects when: position_size < 0 AND position_size >= 0 AND high >= shortStopLoss
- Action: Opens a LONG position
- Stop Loss: Current pivotLow
- Trade Comment: "Reverse on Stop"
The reverse trade uses the same R:R ratio and respects the "Stop Loss Only" setting.
VISUAL ELEMENTS
1. Range Lines:
- Drawn from the time when the extreme was formed to the mitigation point (or current
time if not mitigated)
- High lines: Blue (or mitigated color if mitigated)
- Low lines: Red (or mitigated color if mitigated)
- Style: SOLID
- Width: 1
2. Confirmation Lines:
- Drawn when a signal is confirmed
- Extends from the pivot bar to the confirmation bar
- Bearish: Red, solid line
- Bullish: Green, solid line
- Width: 1
- Can be toggled on/off
STRATEGY SETTINGS
1. Range Detection Mode:
- HTF: Uses higher timeframe candles
- Sessions: Uses trading session boundaries
2. Auto HTF:
- Automatically selects HTF based on current chart timeframe
- Can be disabled to use manual HTF selection
3. Risk:Reward Ratio:
- Default: 2.0 (2:1)
- Minimum: 0.5
- Step: 0.5
4. Stop Loss Only:
- When enabled: Trades only have stop loss (no take profit)
- Trades close on stop loss or when opposite signal confirms
5. Reverse on Stop Loss:
- When enabled: Hitting a stop loss opens opposite trade with stop at opposing pivot
6. Max Ranges to Display:
- Limits the number of ranges kept in memory
- Oldest ranges are purged when limit is exceeded
KEY FEATURES
1. Dynamic Pivot Tracking:
- Pivots update on every candle color change
- Always maintains one high and one low pivot
2. Range Lifecycle:
- Ranges are created when price closes within previous range
- Ranges are tracked until mitigated
- Mitigation creates pending signals
- Signals are confirmed by pivot levels
3. Signal Priority:
- Only one pending signal of each type at a time
- New signals replace old ones
- Confirmation happens on close of bar
4. Position Management:
- Closes opposite positions before entering new trades
- Tracks stop loss levels for reverse functionality
- Respects pyramiding = 1 (only one position per direction)
5. Time-Based Drawing:
- Uses time coordinates instead of bar indices for line drawing
- Prevents "too far from current bar" errors
- Lines can extend to any historical point
USAGE NOTES
- Best suited for trending and ranging markets
- Works on any timeframe, but HTF mode adapts automatically
- Sessions mode is ideal for intraday trading
- Pivot detection requires clear candle color changes
- Range detection requires price to close within previous range
- Signals are generated on bar close, not intra-bar
The strategy combines range identification, pivot tracking, and signal confirmation to
create a systematic approach to trading breakouts and reversals based on price structure, past performance does not in any way predict future performance
Dance With Wolves VN PublicDance With Wolves VN
Indicator kết hợp EMA 9/21 để vào lệnh nhanh, thêm EMA 20/50/200 để xem trend lớn.
Tự tạo Entry, SL, TP1, TP2, TP3 theo ATR.
Vẽ luôn 3 mức kháng cự (R1–R3) và 3 mức hỗ trợ (S1–S3) từ pivot gần nhất.
Dùng tốt cho khung 1m–15m với crypto, stock, futures.
Dance With Wolves VN — Smart EMA Strategy
This indicator combines EMA 20/50/200 trend tracking, automatic Buy/Sell signals, Take Profit & Stop Loss levels, and Support/Resistance zones.
It helps traders identify clean entries, manage risk with visual TP/SL targets, and follow market trends with clarity.
Created by Dance With Wolves VN — a community project for traders who value discipline, teamwork, and precision.
Enhanced Auto Levels & TrendlinesOverview
The Enhanced Auto Levels & Trendlines (EAL&T) is a powerful, all-in-one indicator designed to automate the detection and visualization of key market structures. It combines auto-drawn trendlines, support/resistance levels with volume-based shadows and labels, and auto-flipping Fibonacci retracements/extensions. This tool helps traders identify potential reversals, breakouts, and targets without manual drawing.
Built on Pine Script v5, it uses pivot-based calculations for accuracy and includes customizable options for repainting, extensions, and sources. It's ideal for swing traders, scalpers, and analysts who want clean, dynamic charts.
Key Features
Auto Trendlines: Detects bullish/bearish trends based on pivots, with breakout detection and optional extensions/targets.
Auto Levels: Draws horizontal S/R levels from recent pivots, with "wick shadows" (boxes) highlighting volume strength and % buy/sell labels for sentiment.
Fibonacci Levels: Auto-flips between latest pivot high/low, showing retracements (0.236–0.786) and extensions (1.272–3.0) with customizable styles.
Customization: Override price sources, adjust lengths, colors, styles, and more. Supports repainting for real-time accuracy.
Performance: Limited to 500 bars back and 500 lines for efficiency; no heavy computations.
Visual Aids: Transparent shadows, extendable lines, and small labels for uncluttered charts.
How to Use
Step-by-Step Guide
Add to Chart: Load the indicator. Start with defaults.
Interpret Visuals:
Trendlines: Green (bullish/up), Red (bearish/down). Watch for breakouts – line "breaks" and extends if enabled.
Levels: Horizontal lines with shadows (boxes) showing wick strength. Green above price (resistance), Red below (support). Labels show % buy/sell sentiment.
Fibs: From latest swing low (0.0) to high (1.0). Use 0.5/0.618 for retracements; 1.272+ for targets. Flips automatically on trend change.
Customize for Your Strategy:
Volatile Markets (e.g., Crypto): Increase tl_length to 20+ for fewer false trends. Enable repainting for real-time.
Ranging Markets (e.g., Forex): Set override_source=true, custom_source=close for wick-ignoring pivots.
Fib Focus: Increase fib_extension_bars for longer projections. Hide trendlines if cluttered.
Levels Tuning: Shorten pivot lengths (e.g., 20) for intraday; lengthen (100+) for swings. Set shadow transparency to 100 to hide boxes.
Trading Ideas:
Breakout Trade: Buy on bull trendline break + Fib 0.618 confirmation.
Reversal: Sell at resistance level with high sell% label.
Targets: Use Fib extensions or trend targets for TP; levels for SL.
Combine: Overlay with MA crossover or volume for signals.
Tips & Troubleshooting:
Clutter? Toggle sections off or increase lengths.
No Lines? Ensure show_* is true; check chart history (needs 2x pivot length bars).
Repainting: Normal for real-time; disable for backtesting.
Custom Source: Test on demo – e.g., hl2 for median prices.
Updates: If lines don't extend, verify extend_bars > 0.
Credit : Auto Trendline Lib by HoanGhetti/SimpleTrendlines
kapanış yüzdeleri Closing percentage indicator was created to trade with closing percentage, you can increase the historical data by changing the input
TOBYGBADE1: Dynamic Big Candle Pip RangeDisplays candle ranges in pips as a histogram in a separate pane, highlights big candles exceeding a dynamic threshold, and colors bars and labels green/red based on bullish or bearish direction.”
TOBYGBADE1: Dynamic Big Candle Pip RangeDisplays candle ranges in pips as a histogram in a separate pane, highlights big candles exceeding a dynamic threshold, and colors bars and labels green/red based on bullish or bearish direction.”
Target Trend + Filter Toggles Strategy [ChadAnt]The strategy aims to enter a trade when the price crosses over/under a dynamic trend band and when a combination of user-selected filters confirms the move.
1. Trend Bands (Entry)
The core trend is defined by two smoothed moving averages (SMA based on length input) offset by a smoothed Average True Range (ATR) value.
Upper Band (sma_high): ta.sma(high, length) + atr_value
Lower Band (sma_low): ta.sma(low, length) - atr_value
atr_value is ta.sma(ta.atr(atrLength), smaLength) * atrMultiplier.
Trend Determination:
Long Trend (trend = true): Price crossovers the sma_high band.
Short Trend (trend = false): Price crossesunder the sma_low band.
Raw Signal: A trade signal (signal_up_raw / signal_down_raw) is triggered only when the trend state changes.
2. Stop Loss and Take Profit
Stop Loss (SL):
For a Long entry, the original stop price is the Lower Band (sma_low) at the time of the cross.
For a Short entry, the original stop price is the Upper Band (sma_high) at the time of the cross.
The Stop Loss Price is calculated using the distance from the entry price to the original stop, adjusted by the slAdjustment multiplier.
Take Profit (TP):
Calculated based on a Risk/Reward (R:R) ratio, which is rr_increment * tp_target_number.
TP Distance = Adjusted Stop Distance * R:R Ratio.
The strategy enters and exits in a single order pair using strategy.entry and strategy.exit, using the calculated stop_loss_price and take_profit_price.
3. Filters and Confirmation
The strategy includes toggles (use_..._filter) for many popular indicators: MACD, Volume, StochRSI, Awesome Oscillator (AO), and Moving Average/VWAP (Trend/Counter-Trend).
Filter Logic: Each filter checks for its specific confirmation condition (e.g., MACD zero-cross, AO color change, StochRSI out of extreme, Volume > SMA, Price above MA).
Lookback Period: The script uses a for loop (i = 0 to filter_lookback) to check if the required confirmation happened within the last filter_lookback bars.
Final Signal: The actual entry signal (signal_up / signal_down) is triggered only if the Raw Trend Change Signal occurs AND all currently active (toggled on) filters had their required confirmation event within the lookback period AND the trade is within the Time Window.
The draw_targets method is responsible for the powerful visual display on the chart:
When a new filtered signal occurs, it clears any old lines/labels and draws the new:
Entry line
Stop Loss line
Multiple Take Profit lines (up to num_targets), with the strategy's active TP level highlighted (🎯).
It also features logic to dynamically change the label/line of a TP level to a "✔" or the SL level to a "✖" if the price touches that level on subsequent bars.
The strategy is a highly flexible, multi-factor system built on the concept of trend reversal confirmation.
ATR Daniel# ATR Daniel - Indicator Description
## 🇬🇧 ENGLISH VERSION
### ATR Daniel - Smart Trailing Stop Manager
**ATR Daniel** is an intelligent trailing stop indicator that automatically adapts to your trading style and the asset you're trading.
#### Key Features:
**🎯 3 Trading Modes:**
- **Swing Trading** - For position trading with wider stops
- **Intraday** - For day trading with balanced parameters
- **Scalping** - For quick trades with tight stops
**📊 Automatic Asset Detection:**
The indicator automatically recognizes 3 major assets and applies optimized parameters:
- **XAUUSD (Gold)** - Lower volatility settings
- **BTCUSDT (Bitcoin)** - Medium volatility settings
- **NAS100USD (Nasdaq 100)** - Higher volatility settings
**🔧 Flexible Configuration:**
- **Auto Mode**: Applies optimal parameters based on detected asset and selected trading mode
- **Manual Mode**: Customize ATR length and multiplier to your preferences
- **Customizable Colors**: Choose your own line color
- **ON/OFF Display**: Toggle line visibility as needed
**📈 Visual Display:**
- Dynamic trailing stop line that follows price action
- Color changes based on trend direction (bullish/bearish)
- Real-time info table showing:
- Current asset
- Trading mode
- ATR value
- Stop loss distance
- Recommended SL price
- Current trend direction
- Signal arrows at trend reversals (optional)
**💡 How It Works:**
The indicator uses ATR (Average True Range) to calculate dynamic stop loss levels that adapt to market volatility. The trailing stop follows the price in trending markets while protecting your position.
**Perfect for:**
- Traders who want automated stop loss management
- Multi-asset traders (Gold, Bitcoin, Nasdaq)
- All trading styles (Swing, Intraday, Scalping)
---
Target Trend + Filter Toggles [ChadAnt] V3Minor Update that allows the user to adjust the size of the stop loss.
Indicator Overview and Core Logic CREDIT TO BIGBELUGA FOR THE MAIN INDICATOR
The indicator, named "Target Trend + Filter Toggles", is an overlay that draws directly on the price chart.
1. Core Trend Detection (Modified SMA Channel)
The indicator uses a primary trend-following mechanism based on a custom channel built with Simple Moving Averages (SMAs) and Average True Range (ATR):
SMA High: ta.sma(high, length) + atr_value
SMA Low: ta.sma(low, length) - atr_value
The length is set by the user (default 20).
The atr_value is a smoothed ATR (SMA of ATR(200), multiplied by 0.8), acting as an offset to create a channel around the price action.
Trend Logic:
Uptrend (trend=true): When the close price crosses over the sma_high line.
Downtrend (trend=false): When the close price crosses under the sma_low line.
Visual Trend: The candles are colored based on this determined trend, and the SMA High/Low lines are plotted.
2. Signal Generation (Raw vs. Filtered)
Raw Signal: A raw signal (signal_up_raw or signal_down_raw) is triggered simply when the core trend logic changes (e.g., trend changes from down to up).
Filtered Signal: The final buy/sell signal (signal_up or signal_down) is triggered only when the raw signal is true AND all currently active filter toggles are confirmed within a specified filter_lookback period (default 3 bars).
⚙️ Filter Toggles and Calculations
The script includes an extensive system of boolean (on/off) toggles for various popular technical indicators, allowing the user to customize which filters must be confirmed for a signal to be valid.
FILTER CATEGORIES:
MACD,
VOLUME,
STOCHRSI,
AWESOME OSCILLATOR,
MOVING AVERAGE,
VWAP,
COUNTERTREND MA
COUNTERTREND VWAP
The script uses a for loop to check if the required confirmation happened within the last filter_lookback number of bars.
🎯 Target and Stop-Loss Levels
Upon a valid filtered signal (signal_up or signal_down), the indicator uses an extensive user-defined type (TrendTargets) and a custom draw_targets method to draw potential trade management lines:
Entry Price: The close price of the bar where the filtered signal occurred.
Stop Loss (SL):
For a Long signal: The sma_low line (the lower band of the trend channel).
For a Short signal: The sma_high line (the upper band of the trend channel).
Profit Targets (T1, T2, T3): These are calculated based on the ATR multiplier (atr_value) and an adjustable user input called target (default 1).
Targets are a multiple of atr_value added to (for longs) or subtracted from (for shorts) the Entry Price.
T1: Entry +/- (5 + target) * atr_value
T2: Entry +/- (10 + target * 2) * atr_value
T3: Entry +/- (15 + target * 3) * atr_value
These levels are plotted as extended lines with corresponding labels (e.g., "SL," "Entry," "T1"). The script also includes logic to mark targets with a "✔" and the stop-loss with an "✖" if the price hits those levels.
🎨 Visualization
The script provides clear visual cues:
Candle Coloring: Candles are colored with up_color (Green/Teal) for an uptrend and dn_color (Brown/Orange) for a downtrend.
Trend Lines: The sma_high and sma_low lines are plotted and subtly shaded between the price action.
Signal Shapes: A filtered signal triggers a set of two colored triangles (one small solid, one large transparent) plotted below the low for a long signal and above the high for a short signal.
Trade Zones: The area between the Stop Loss and the Entry line is shaded in the counter-trend color, and the area between the Entry line and the T3 line is shaded in the trend color.
This indicator is essentially a complete trading system that uses a combination of an ATR-based trend channel for entries, a multitude of technical indicators for confirmation, and an ATR-based system for trade management (SL/TPs).
Would you like me to focus on a specific filter's logic, or perhaps help you configure the indicator's inputs for a certain trading style?






















