[ahDirtCuhzzz]ICT Sessions_Asia and London Focused- I turn the days background off
- I only toggle Asia & London session
- I adjust Asia to 1900 -- 2200
- I turn off weekly/monthly lines
- I added labels to midnight and 830 open with the ability to change colors on the label/text.
รูปแบบชาร์ต
BB Algo👉 Index (NIFTY / BANKNIFTY)
👉 1-Minute
👉 Bollinger Band 21-2 + RSI 14
👉 Candle close confirmation
👉 Auto Target & Stoploss
👉 BUY / SELL labels with full details
Fusion Signals Pro [Apicode]# Fusion Signals Pro
**Technical Documentation**
## 1. Overview
**Fusion Signals Pro** is a multi-indicator, multi-timeframe confirmation system developed in **Pine Script v6**.
Its primary goal is to **identify high-probability long and short entries** by requiring alignment across several momentum, trend, and oscillator indicators.
The indicator combines:
* Momentum (RPM, MACD)
* Oscillators (RSI, Stochastic, CCI, BBO)
* Trend-following logic (SuperTrend, EMA + T3 smoothing)
* A proprietary Heiken-Ashi–based trend module (**HACOLT**)
When all components align, the system generates **entry signals**, visual confirmations, and alerts.
---
## 2. Indicator Characteristics
| Property | Value |
| ------------------ | ----------------------------- |
| Script Version | Pine Script™ v6 |
| Overlay | Yes (candles, EMAs, signals) |
| Main Panel | Oscillator-style status panel |
| Repainting Control | Configurable per indicator |
| Market Types | Crypto, Stocks, ETFs |
| Timeframes | 15m, 30m, 1H, 2H and higher |
---
## 3. Architecture Summary
The indicator consists of **five major modules**:
1. **Multi-Timeframe Data Engine**
2. **Indicator Calculation Engine**
3. **Scoring & State Engine**
4. **Signal & Alert Engine**
5. **Trendline & HACOLT Engine**
---
## 4. Multi-Timeframe Data Engine
### `getSecurityData()`
This function safely retrieves higher- or alternate-timeframe data while controlling repainting behavior.
**Key features:**
* Supports real-time vs historical bar handling
* Optional repainting toggle per indicator
* Uses `request.security()` internally
```pinescript
getSecurityData(src, resolution, allowRepainting)
```
---
## 5. Indicator Components
### 5.1 RPM (Rate of Price Momentum)
**Purpose:**
Measures cumulative percentage price change over a defined period.
**Logic:**
* Calculates bar-to-bar % change
* Sums the change over `RPM Period`
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.2 BBO (Bull–Bear Oscillator)
**Custom oscillator combining:**
* Candle price structure
* RSI confirmation
* Super Smoother filter
**Output values:**
* `+100` → Bullish impulse
* `-100` → Bearish impulse
* `0` → Neutral
Smoothed using a **Super Smoother Moving Average**.
---
### 5.3 MACD
**Configurable elements:**
* Fast EMA
* Slow EMA
* Signal line
* Histogram or MACD line selection
**Signal Logic:**
* Positive value → Bullish
* Negative value → Bearish
Supports independent timeframe and repainting control.
---
### 5.4 RSI (Relative Strength Index)
**Standard RSI logic (14-period default)**
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.5 Stochastic Oscillator
**Calculation:**
* %K → smoothed by SMA
* Uses configurable smoothing parameters
**Signal Threshold:**
* `> 50` → Bullish
* `< 50` → Bearish
---
### 5.6 CCI (Commodity Channel Index)
**Signal Logic:**
* `> 0` → Bullish
* `< 0` → Bearish
---
### 5.7 SuperTrend
**Parameters:**
* ATR Period
* Multiplier Factor
**Trend Logic:**
* Price above SuperTrend → Bullish
* Price below SuperTrend → Bearish
---
## 6. Visual Status Panel (Fusion Matrix)
Each indicator is plotted as a **horizontal square block**, color-coded:
* **Green** → Bullish
* **Red** → Bearish
### Indicator Order (Top to Bottom):
1. RPM
2. MACD
3. RSI
4. Stochastic
5. CCI
6. BBO
7. SuperTrend
8. HACOLT
Labels dynamically update on the last bar.
---
## 7. Scoring System
Each indicator contributes **1 point** when bullish.
| Indicator | Condition |
| ---------- | ----------- |
| RPM | `> 0` |
| MACD | `> 0` |
| RSI | `> 50` |
| Stochastic | `> 50` |
| CCI | `> 0` |
| BBO | `> 0` |
| SuperTrend | Price above |
**Score Range:** `0 → 7`
### Color Mapping
* **7** → Strong Green (Full alignment)
* **5–6** → Light Green
* **4** → Neutral (Gray)
* **1–3** → Light Red
* **0** → Strong Red
This score controls:
* Candle color
* Bar color
* Visual confidence level
---
## 8. Entry Logic
### Long Entry
All bullish conditions must be met:
```text
RPM > 0
MACD > 0
RSI > 50
Stochastic > 50
CCI > 0
BBO > 0
SuperTrend bullish
```
### Short Entry
All bearish conditions must be met (inverse logic).
---
## 9. Position State Machine
The indicator tracks trade direction using an internal state:
| State | Meaning |
| ----- | ---------- |
| `1` | Long bias |
| `-1` | Short bias |
| `0` | Neutral |
**Signals trigger only on state transitions**, reducing false signals and repeated entries.
---
## 10. Alerts
### Available Alerts
* Long Entry
* Short Entry
* Generic Entry (Long or Short)
* HACOLT Trend Change
Alerts include:
* Symbol
* Price
* Direction
---
## 11. Trendline Engine (EMA + T3)
### Features:
* Multi-timeframe EMA calculation
* T3 smoothing for noise reduction
* Auto / Multiplier / Manual timeframe selection
### Logic:
* EMA1 (fast) vs EMA2 (slow)
* Filled area changes color on crossover
* Acts as a **trend bias filter**
---
## 12. HACOLT Module (Advanced Trend Filter)
**HACOLT** is a proprietary trend detection system based on:
* Heiken-Ashi logic
* TEMA smoothing
* Candle structure analysis
* State persistence logic
### States:
* `1` → Bullish trend
* `-1` → Bearish trend
### Uses:
* Additional confirmation
* Early trend detection
* Visual trend persistence
---
## 13. Repainting Control
Each major component includes:
* Independent timeframe
* Independent repainting toggle
This allows:
* Backtesting accuracy
* Real-time responsiveness
* Hybrid confirmation setups
---
## 14. Intended Use
**Fusion Signals Pro is designed for:**
* Trend-following strategies
* Confirmation-based entries
* Multi-timeframe analysis
* Crypto and equity markets
⚠️ It is **not** intended as a standalone trading system without risk management.
---
## 15. Conclusion
Fusion Signals Pro is a **high-confluence trading indicator** that merges momentum, oscillators, and trend-following logic into a unified decision framework.
Its strength lies in **signal alignment**, **state tracking**, and **visual clarity**, making it suitable for both discretionary and systematic traders.
Top % Up Scanner (2m/5m/15m/30m)TradeSage
Top % Up Scanner (Multi-Timeframe Momentum Detector)
Overview
A real-time scanner that identifies stocks with the strongest 2-minute price movement, backed by high volume. Perfect for day traders and scalpers looking to catch explosive intraday moves.
Key Features
📊 Multi-Timeframe Display
Shows % gains across 2m, 5m, 15m, and 30m periods
Quick snapshot of momentum across different timeframes
🔍 Smart Filters
Price Range: Scans only $0.10 - $20 stocks (customizable)
High Volume: Requires 3x+ average volume confirmation
Top Mover: Highlights when 2m gain is the highest in lookback period
🎯 Visual Alerts
Green triangle below breakout bars
Green background highlight
Auto-generated label showing all timeframe %s
Built-in alert for notifications
Best For
Day trading momentum breakouts
Scalping explosive moves
Multi-chart scanning for hottest movers
Early detection before moves become obvious
Recommended Setup
Timeframe: 1-2 minute charts
Use with: Support/resistance levels and proper risk management
Customize: Adjust price range, volume threshold, and lookback period to match your style
EMA Touch & Color-Filtered Engulfing「前の足が陰線であること」という重要なフィルターが加わり、ついにロジックが完成しましたね!
TradingViewのコミュニティで高い評価を得るための、専門的かつ分かりやすい**「完全版・英語説明文」**を作成しました。そのままコピーして投稿にお使いください。
Title
EMA Touch & Color-Filtered Engulfing
Description
🚀 Overview
This indicator is a professional-grade price action tool designed for high-probability trend-following entries. It combines 4-layer Exponential Moving Averages (EMA) with a Strict Color-Filtered Engulfing logic.
The script is optimized to find moments where the market sentiment completely shifts—confirmed by price breaking through the previous candle's extreme levels (Highs/Lows) while reversing the candle color.
💎 Key Features
Strict Color-Filtered Logic:
Bullish (Long): A Green candle must engulf a Red candle’s High. This confirms that buyers have completely overpowered the previous sellers.
Bearish (Short): A Red candle must engulf a Green candle’s Low. This confirms that sellers have completely overtaken the previous buyers.
High-Break / Low-Break Confirmation: Unlike standard body-only engulfing patterns, this script requires the current close to break the previous candle's wick extremes, ensuring stronger momentum.
4-Layer EMA Structure: Default settings (10, 20, 40, 80) help you visualize dynamic support and resistance zones instantly.
Minimalist Visuals:
The Japanese character "包" (Engulf) marks high-conviction signals.
Small dots indicate precise EMA Touch moments.
📈 How to Trade with This Script
Trend Alignment: Identify the trend direction using the 4 EMA lines.
The Retest: Wait for the price to pull back and touch an EMA line (look for the dot).
The Confirmation: Execute when the "包" signal appears. This indicates that the trend is resuming with enough force to swallow the previous counter-trend candle's range.
🔔 Integrated Alerts
You can set alerts for:
EMA Touches: Be notified the moment price hits your key levels.
Engulfing Signals: Catch momentum shifts as they happen.
Combo Signals (Recommended): Receive an alert only when a "True Engulfing" occurs on an EMA touch—the highest probability setup.
EMA Touch True Engulfing### Overview
This script is a premium technical analysis tool that combines **Multi-EMA Touch Alerts** with a highly strict **"True Engulfing"** price action filter.
Unlike standard engulfing indicators that only look at the candle body, this version requires the current candle to engulf the **entire range (including wicks)** of the previous candle. This ensures you only see the most powerful reversal signals near key dynamic support and resistance.
### Key Features
* **Strict "True Engulfing" Logic**: Signals only appear when the current candle's body completely swallows the previous candle's High and Low.
* **4-Layer EMA Setup**: Tracks 4 customizable EMAs (Default: 10, 20, 40, 80) for trend context.
* **Minimalist Visuals**: Uses the Japanese character **"包"** (meaning "Engulf") for a clean, non-intrusive chart layout.
* **Green Label**: High-probability Bullish Engulfing.
* **Red Label**: High-probability Bearish Engulfing.
* **Combo Alerts**: Built-in alert conditions for EMA touches, True Engulfing patterns, and a "Combo Alert" for when both happen simultaneously.
### How to Trade
1. **Trend Context**: Identify the primary trend using the EMAs.
2. **The Retest**: Wait for the price to pull back to an EMA.
3. **The Confirmation**: Look for the **"包"** label. This indicates that the market has completely rejected the EMA level by overpowering the previous candle's entire range.
SMART MONEY SMT+BOS+ENTRYThis advanced trading indicator combines Smart Money Theory (SMT) and Break of Structure (BOS) analysis with synchronized multi-asset monitoring. The core concept identifies institutional activity by detecting discrepancies between correlated assets, revealing potential accumulation zones and reversal points before they become apparent to retail traders.
Key Features
Smart Money Detection:
Real-time divergence analysis between two selected assets (e.g., BTC/ETH, Gold/Silver, Currency pairs)
Identification of institutional accumulation/distribution patterns
Trend confirmation through structural sweeps and momentum shifts
Structural Analysis:
Break of Structure (BOS) detection with multi-factor confirmation
ATR-based candle size filtering to eliminate false breakouts
Clear structural shift identification with visual confirmation
Risk-Managed Execution:
Dual entry modes: Immediate (on BOS close) or Retest (on pullback to level)
Automated stop-loss placement at last structural extreme
Dynamic take-profit calculation based on user-defined risk/reward ratio
Support for long-only, short-only, or bidirectional trading strategies
Visual Interface
Colored arrows signaling buy/sell opportunities at optimal entry points
Real-time stop-loss and take-profit level visualization
SMT divergence markers above/below price action
Structural level indicators for clear market context
Configuration Options
Asset Pair Selection - Primary and secondary symbols for comparative analysis
Trading Direction - Long, Short, or Both directions
Swing Sensitivity - Adjustable pivot point detection period
Risk/Reward Ratio - Customizable profit targets relative to risk
BOS Confirmation Filter - Minimum candle body size requirement via ATR percentage
Optimal Application
Best performance on correlated assets (crypto pairs, commodities, indices)
Effective across multiple timeframes (M15 for entries, H4/D1 for context)
Combines well with volume profile and order flow analysis
Suitable for both discretionary and systematic trading approaches
Technical Advantages
Dual-asset synchronization for early signal detection
Multi-layer filtering system reducing false positives
Integrated risk management with visual guidance
Customizable sensitivity for different market conditions
Русская версия
Индикатор Smart Money Theory (SMT) + Break of Structure (BOS)
Обзор
Этот продвинутый торговый индикатор объединяет анализ Smart Money Theory (SMT) и Break of Structure (BOS) с синхронизированным мониторингом нескольких активов. Основная концепция выявляет активность институциональных игроков путем обнаружения расхождений между коррелирующими активами, показывая зоны накопления и точки разворота до того, как они становятся очевидными для розничных трейдеров.
Ключевые возможности
Детекция "умных денег":
Анализ дивергенций в реальном времени между двумя выбранными активами
Выявление паттернов накопления/распределения институциональными участниками
Подтверждение тренда через структурные сдвиги и изменения импульса
Структурный анализ:
Обнаружение Break of Structure (BOS) с многофакторным подтверждением
Фильтрация по размеру свечи на основе ATR для устранения ложных пробоев
Четкая идентификация структурных сдвигов с визуальным подтверждением
Управление рисками:
Два режима входа: Немедленный (при закрытии BOS) или Ретест (при откате к уровню)
Автоматическое размещение стоп-лосса на последнем структурном экстремуме
Динамический расчет тейк-профита на основе заданного риск-риворда
Поддержка лонг-стратегий, шорт-стратегий или обоих направлений
Визуальный интерфейс
Цветные стрелки, сигнализирующие о точках входа на покупку/продажу
Визуализация уровней стоп-лосса и тейк-профита в реальном времени
Маркеры SMT-дивергенций над/под ценовым действием
Индикаторы структурных уровней для четкого контекста рынка
Настройки
Выбор пары активов - Основной и вторичный символы для сравнительного анализа
Направление торговли - Лонг, Шорт или Оба направления
Чувствительность свингов - Настраиваемый период детекции точек разворота
Коэффициент риск/вознаграждение - Настраиваемые цели по прибыли относительно риска
Фильтр подтверждения BOS - Минимальный размер тела свечи в процентах от ATR
Оптимальное применение
Наилучшие результаты на коррелирующих активах (криптопары, товары, индексы)
Эффективен на различных таймфреймах (M15 для входов, H4/D1 для контекста)
Хорошо сочетается с анализом Volume Profile и ордерного потока
Подходит как для дискреционного, так и для системного трейдинга
Технические преимущества
Синхронизация двух активов для раннего обнаружения сигналов
Многоуровневая система фильтрации, снижающая ложные срабатывания
Интегрированное управление рисками с визуальным сопровождением
Настраиваемая чувствительность под разные рыночные условия
Pivot Zones Break Close MM200 This strategy is a trend-following and reversal algorithm based on the dynamic identification of institutional price zones (Pivots). The objective is to capture precise movements when price "breaks and closes" above a support or below a resistance level, while filtering signals with a 200-period Simple Moving Average (SMA) to ensure maximum safety.
PRO RSI + MACD AI - INST TOGGLEMac d and rsi cobination with ai signals usefull for all tyme frame and all type of scripts
JD Moon - Intraday Boxကျွန်တော် JD Moon ပါ၊
ဒီ Box Indicator က Intraday Trader တွေအတွက် အချိန်ကုန်သက်သာအောင် တကူးတက ဆွဲစရာမလိုအောင် Price Action သမားတွေအတွက် အသုံးလိုတဲ့အရာမို့ ဖန်တီးထားတာပါ၊ အရမ်း ရိုးရှင်းပြီး အရမ်း အသုံးဝင်ပါတယ်။ တစ်ရက်အတွင်း စျေးနှုန်းအရွေ့ကို စောင့်ကြည့်ဖို့ပါ။ အထူးသဖြင့်ကျွန်တော့်အတွက် ဖန်တီးထားတာဖြစ်ပြီး လိုအပ်သူတွေ ကျွန်တော့်လို Chart တိုင်းမှာ လှိုင်းဆွဲဖို့ ငပျင်းလေးတွေ ယူသုံးနိုင်ပါတယ်။
Prev HL Labels + TF Filter + INTRADAY Alerts OnlyWhat it does
Displays the previous candle’s High and Low prices as two price labels plotted near the previous bar (one above the high, one below the low).
Triggers intraday alerts only when price breaks above the previous high or breaks below the previous low.
Lets you choose which timeframes the script is allowed to run on (labels + alerts), via a timeframe filter.
ICT Professional OB HunterICT Professional OB Hunter
A professional-grade Order Block mapping tool designed for traders following Smart Money Concepts to track institutional order flow and significant market structures.
This tool identifies validated Order Blocks with Break of Structure confirmation, filtering out market noise and focusing only on high-probability levels where institutional participation is evident.
How It Works
The script operates without repainting, using historical swing highs and lows as reference points rather than future data. Three core criteria must be satisfied before an Order Block is drawn:
Strong Candle Formation: The candle must have a significant body (no dojis), exceeding the ATR threshold—indicating genuine institutional participation rather than indecision.
Displacement: Following the Order Block candle, price must move with momentum exceeding 1.5x the ATR. This captures true "market shifting" moves while ignoring slow, low-volume price action.
Break of Structure: Price must definitively break the previous swing high or low to confirm momentum before the Order Block is validated and drawn.
What You See on the Chart
Thick Blue Lines: Bullish Order Blocks representing demand zones where price historically finds support and reacts upward.
Thick Orange Lines: Bearish Order Blocks representing supply zones that act as resistance.
Yellow Boxes: OTE (Optimal Trade Entry) zones between the 50% and 61.8% retracement levels of the Order Block—ICT's preferred fib confluence area for precision entries.
Dashed Lines: Breaker Blocks indicating former Order Blocks that have been violated by price and now act as reverse levels or "mitigated" areas.
Key Differences from Standard Tools
Most available Order Block indicators mark every red or green candle indiscriminately, creating excessive noise and poor trading opportunities. This code implements a displacement filter to capture only structures formed after significant, volume-backed institutional moves. It contains no future reference or repainting logic—all decisions finalize strictly on bar close based on confirmed historical data.
Settings
Displacement Lookback (2-5 bars): Determines how many subsequent bars to analyze for momentum confirmation after the initial Order Block candle. Three bars provides the optimal balance between responsiveness and confirmation.
ATR Multiplier (0.5+): Sets the sensitivity for displacement detection. A value of 1.5 works well for Gold (XAU/USD). Lower values generate more Order Blocks but decrease quality and reliability.
Mitigation Zones: Toggle the display of OTE (Optimal Trade Entry) boxes on or off.
Usage Recommendations
This indicator is not a standalone buy/sell signal generator—it marks zones where institutional capital is likely positioned.
Recommended approach:
Apply to 15-minute or 1-hour charts, particularly during the New York session (14:30-17:00 EST) when institutional volume peaks.
Wait for price to reach the confluence of the Blue Line and Yellow OTE box.
The setup invalidates if price closes below the OTE zone boundary.
When Orange lines transition to dashed (Breaker Block), recognize that former support has become resistance; adjust position management accordingly.
Risk Warning
This is a statistical model based on historical price behavior, not a "holy grail" solution. Market conditions change, particularly during high-volatility macroeconomic news events (FOMC, CPI, NFP), where Order Blocks may fail. Always employ stop-loss protection and integrate this tool as one component of a comprehensive risk management strategy rather than relying on it exclusively.
Written in Pine Script v6 utilizing array structures for efficient real-time line updates and optimized for performance even on older hardware configurations.
Developer Note: Historical backtest analysis indicates that BOS-validated Order Blocks, particularly in Gold (XAU/USD) and major indices, demonstrate improved win rates when combined with disciplined entry criteria and proper risk management. However, the market retains ultimate authority—respect price action above all indicators.
Renko + Heikin Ashi Strategy v1🔷 Renko + Heikin Ashi Strategy (Sonu179208)
Renko + Heikin Ashi Strategy is a powerful trend-following and reversal-based TradingView strategy that combines custom Renko brick logic with smoothed Heikin Ashi confirmation to filter noise and capture high-probability trades.
This strategy is designed for intraday, positional, and options trading, especially useful for NIFTY, SENSEX, BankNifty, and option premiums.
🚀 Core Concepts
🧱 Renko Logic (Non-Time Based)
Custom-built Renko engine (no built-in Renko charts required)
Brick size can be calculated using:
ATR
Percentage
Fixed points
Traditional divider
Detects trend continuation and 2-brick reversals
Multiple bricks per candle supported with safety limits
🔥 Heikin Ashi Confirmation
Smoothed Heikin Ashi candles using EMA
Optional confirmation logic:
Renko + HA must agree
OR HA reversal within Renko trend
Helps avoid false Renko reversals in sideways markets
📈 Trade Logic
✅ Buy (Long)
Renko reversal from Bear → Bull
Optional Heikin Ashi bullish confirmation
Trade direction allows Long / Short / Both
❌ Sell (Short)
Renko reversal from Bull → Bear
Optional Heikin Ashi bearish confirmation
🔁 Smart Position Handling
Automatically closes opposite positions before new entries
Separate logic for:
Long-only mode
Short-only mode
🛑 Risk Management
Optional Fixed Stop Loss (points)
Optional Trailing Stop Loss
Works for both Long and Short trades
Designed to be compatible with strategy backtesting
⏱ Backtest Controls
Enable / Disable Date Range Filter
Define custom Start & End dates
Useful for forward testing and historical validation
🔔 Alerts & Webhooks (Automation Ready)
Entry Alerts:
Buy
Sell
Exit Alerts
Fully customizable Webhook messages
Ideal for:
Algo trading
Broker API
TradingView → automation tools
🎨 Visual Features
Renko bricks drawn directly on chart
Optional:
Renko connecting lines
Reversal arrows
Heikin Ashi candles
Color-coded bullish & bearish bricks
On-chart Info Table displaying:
Box size & method
Renko direction
HA direction
Trade mode
Stop loss & trailing status
Active date filter status
⚙️ Highly Customizable Inputs
Renko source: Close / HL2 / HLC3 / OHLC4 / High / Low
Brick size parameters
Heikin Ashi smoothing
Display toggles
Safety limits for performance
⚠️ Disclaimer
This strategy is for educational and research purposes only.
Always forward-test and manage risk properly before using in live trading.
Market conditions vary, and no strategy guarantees profits.
Heikin Ashi + RSI Strategy📊 Heikin Ashi + RSI Strategy (Advanced)
This strategy combines Heikin Ashi trend confirmation with RSI momentum analysis to generate high-probability Long & Short trading signals, supported by advanced risk management, multi-timeframe filters, and visual trade tracking.
Designed for intraday, swing, and positional traders, this system is fully customizable and works across stocks, indices, crypto, and forex.
🔹 Core Logic
✅ BUY (Long) Conditions
A long trade is triggered based on your selected mode:
HA Turns Green → Heikin Ashi candle flips from red to green
RSI Upward → RSI rising compared to previous bars
Both → Heikin Ashi confirmation + RSI momentum (strongest)
❌ SELL (Short) Conditions
A short trade is triggered based on:
HA Turns Red → Heikin Ashi candle flips from green to red
RSI Downward → RSI declining compared to previous bars
Both → Trend + momentum alignment
🔹 Trade Direction Control
Long Only
Short Only
Both (Default)
Perfect for directional markets or index trading.
🔹 Multi-Timeframe Support
Separate timeframes for:
Heikin Ashi
RSI
Leave empty to use the chart timeframe
This allows higher-TF trend + lower-TF entries.
🔹 Risk Management (Highly Flexible)
🛑 Stop Loss Options
Percentage-based
ATR-based
Fixed points
🎯 Take Profit Options
Percentage-based
ATR-based
Fixed points
Risk-Reward based (RR)
🔁 Trailing Stop
Optional percentage-based trailing SL
🔹 Time & Session Filters
Trade only between custom date ranges
Optional session filter (e.g. market hours)
Ideal for avoiding low-liquidity periods.
🔹 Visual Features
Buy / Sell arrows with optional labels
SL / TP / Entry price lines
Position-based background coloring
Clean on-chart execution markers
📋 Smart Info Table (Top-Right)
Displays real-time data:
Heikin Ashi status
RSI direction & value
Active timeframes
Current position (LONG / SHORT / FLAT)
Open P&L
Total trades
Win rate %
🔔 Alerts Included
Long Entry Alert
Short Entry Alert
Any Entry Alert
➡️ Ready for TradingView webhooks & automation
⚠️ Disclaimer
This strategy is for educational and research purposes only.
Always backtest, forward test, and use proper risk management before live trading.
NFO Rolling Straddle with Entry ExitNFO Rolling Entry Exit based on combined premiums, use on Options chart as Underlying chart doesn't allow long history
BTC Arbitrage Detector套利检测器 — 技术原理与 Webhook 实时监控指南
许可证:Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
作者:加密社
适用市场:加密货币(如 BTC/USDT)、外汇(如 EUR/USD)
一、核心目标
本指标旨在实时监测同一交易品种在多个交易所或经纪商之间的价格极差(Price Spread),并通过统计方法识别当前价差是否处于“异常”状态。当价差显著扩大时,可能意味着存在套利机会、流动性断裂或数据源异常,用户可据此采取相应操作。
二、关键技术原理
1. 多源数据聚合
指标通过 request.security() 函数并行请求多个交易所的实时价格与成交量数据。例如,当图表品种为 BTCUSD 且类型为 crypto 时,自动从以下 19 家交易所获取数据:
BITSTAMP, COINBASE, BINANCE, KRAKEN, OKX, BYBIT, KUCOIN, MEXC, BITGET...
对于外汇品种(如 EURUSD),则切换至 OANDA, PEPPERSTONE, IBKR, SAXO 等 13 家外汇经纪商。
注意:若某交易所不支持该品种(如 GEMINI 无 ETH/BTC),系统会自动忽略无效符号(ignore_invalid_symbol = true),确保脚本稳定运行。
2. 价差计算与滑动窗口
价差定义:在每个 K 线周期,取所有有效交易所的最新价格,计算其最大值与最小值之差(即 range())。
历史窗口:默认使用最近 1000 根 K 线的价差序列(可通过输入参数调整),构成动态参考分布。用户也可启用“完整数据集”以使用全部历史数据(需注意资源限制)。
3. 百分位分级机制
对当前价差在其历史分布中的位置进行百分位排名(percentrank),并按以下阈值划分等级:
异常(Unusual):> 98% 分位(默认)
高(High):> 75% 分位
典型(Typical):> 25% 分位
低(Low):≤ 25% 分位
该分级基于非参数统计,无需假设价差服从正态分布,适应性强。
4. 自适应平滑算法(AMA)
为减少噪声干扰,指标提供两种平滑选项:
固定 EMA:对原始价差序列应用指数移动平均(默认周期 9)
自适应移动平均(AMA):将当前价差的百分位排名作为“效率比率”(Efficiency Ratio),动态调整平滑系数。当价差突变(高百分位)时响应更快,平稳期则更平滑。
5. 交互式仪表盘
仪表盘展示每家交易所的:
最新价格 / 成交量
平均价格 / 成交量(基于用户设定的平均周期,默认 20)
可选显示与主图资产的绝对差值(如 Binance 价格比主图高 $ 120)
支持按任意列升序/降序排序,快速定位最高/最低报价源
三、如何利用 Webhook 实现异常价差实时告警
TradingView 的 Alert + Webhook 功能可将指标信号推送至外部服务(如 Telegram、Discord、自建服务器),实现 7×24 小时监控。
步骤 1:修改脚本,添加 Alert 条件
原脚本为纯指标(indicator),不支持 alertcondition()。需在脚本末尾添加以下代码:
// 在脚本最后添加(calc_bars_count 行之后)
var float spreadPercentRank = na
spreadPercentRank := spreads.percentrank(spreads.size() - 1)
// 定义异常价差条件(例如 >98% 分位)
unusualCondition = spreadPercentRank > unusualPercentilInput
// 创建告警条件
alertcondition(unusualCondition, title="异常价差触发", message="【{{ticker}}】出现异常跨交易所价差!当前百分位:{{plot0}}%,价差:{{plot1}}")
注意:{{plot0}} 和 {{plot1}} 会自动替换为第一个和第二个 plot() 的当前值(即 spreadPercentRank 和 currentSpread)。
步骤 2:在 TradingView 创建告警
打开图表,加载修改后的指标
点击指标名称 → “添加告警”(Add Alert)
触发条件选择 “异常价差触发”
在“操作”中选择 Webhook URL
填入你的 Webhook 地址(例如:https://your-server.com/arbitrage-alert)
勾选 “仅当条件首次为真时触发”(避免重复通知)
保存
Arbitrage Detector — Technical Principles and Webhook Real-Time Monitoring Guide
License: Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0)
Author: Crypto Community
Applicable Markets: Cryptocurrencies (e.g., BTC/USDT), Forex (e.g., EUR/USD)
1. Core Objective
This indicator is designed to monitor the price spread—the difference between the highest and lowest quoted prices—of the same trading instrument across multiple exchanges or brokers in real time. Using statistical methods, it evaluates whether the current spread falls into an "anomalous" regime. A significantly widened spread may signal potential arbitrage opportunities, liquidity fragmentation, or data feed anomalies, enabling users to take timely action.
2. Key Technical Principles
2.1 Multi-Source Data Aggregation
The script uses Pine Script’s request.security() function to fetch real-time price and volume data from multiple venues simultaneously. For example:
When the chart symbol is BTCUSD and its type is crypto, the script automatically pulls data from 19 major cryptocurrency exchanges:
BITSTAMP, COINBASE, BINANCE, KRAKEN, OKX, BYBIT, KUCOIN, MEXC, BITGET, GEMINI, CRYPTOCOM, WHITEBIT, BTSE, HTX, GATE, etc.
For forex pairs like EURUSD, it switches to 13 leading brokers:
OANDA, PEPPERSTONE, IBKR, SAXO, TICKMILL, FXCM, FOREX.COM, CAPITAL.COM, etc.
Note: If a venue does not support the symbol (e.g., GEMINI lacks ETH/BTC), the script safely skips it using ignore_invalid_symbol = true, ensuring robust execution.
2.2 Spread Calculation and Sliding Window
Spread Definition: At each confirmed bar, the script collects all valid latest prices and computes their range (max – min).
Historical Reference Window: By default, it maintains a rolling window of the last 1,000 spread values to form a dynamic empirical distribution. Users can adjust this length or enable “Full Dataset” mode to use all available historical data (subject to TradingView’s runtime limits).
2.3 Percentile-Based Classification
The current spread is ranked against its historical distribution using percentrank(). It is then classified into one of four tiers based on user-defined thresholds:
Unusual: >98th percentile (default)
High: >75th percentile
Typical: >25th percentile
Low: ≤25th percentile
This non-parametric approach makes no assumptions about the underlying distribution of spreads, offering strong adaptability across volatile and stable market regimes.
2.4 Adaptive Smoothing Algorithm (AMA)
To reduce noise while preserving responsiveness, two smoothing options are provided:
Fixed EMA: Applies a standard exponential moving average (default period: 9) to the raw spread series.
Adaptive Moving Average (AMA): Uses the current spread’s percentile rank as an “efficiency ratio” to dynamically adjust the smoothing factor. During sharp divergences (high percentile), the AMA reacts quickly; during calm periods, it becomes smoother.
2.5 Interactive Dashboard
The on-chart dashboard displays, for each venue:
Latest price and volume
Average price and volume (over a user-defined lookback period, default: 20 bars)
Optional absolute delta vs. the chart’s primary symbol (e.g., “Binance price is $ 120 higher than chart”)
Sortable columns (ascending/descending) by price or volume to instantly identify outliers
3. Setting Up Webhook Alerts for Real-Time Anomaly Notifications
TradingView’s Alert + Webhook system allows you to push signals to external services (e.g., Telegram, Discord, or a custom server) for 24/7 monitoring.
Step 1: Modify the Script to Add Alert Conditions
Since the original script is declared as an indicator(), it cannot trigger alerts by default. Append the following code at the end of the script (after the calc_bars_count line):
pinescript
编辑
// Add at the very end of the script
var float spreadPercentRank = na
spreadPercentRank := spreads.percentrank(spreads.size() - 1)
// Define alert condition: spread exceeds "Unusual" threshold
bool unusualCondition = spreadPercentRank > unusualPercentilInput
// Create alert condition with dynamic message
alertcondition(unusualCondition, title="Unusual Spread Detected",
message="【{{ticker}}】Unusual cross-exchange spread detected! Percentile: {{plot0}}%, Spread: {{plot1}}")
Note: {{plot0}} and {{plot1}} will be replaced at runtime with the values of the first and second plot() calls in the script—corresponding to spreadPercentRank and currentSpread, respectively.
Step 2: Create an Alert in TradingView
Apply the modified indicator to your chart.
Click the indicator name in the legend → “Add Alert”.
Under Condition, select “Unusual Spread Detected”.
In the Actions section, choose “Webhook URL”.
Enter your webhook endpoint (e.g., your-server.com).
Check “Once Per Bar” or “Once Per Condition” to avoid repeated notifications.
Save the alert.
SIDDAMRAJU2Open the indicator Settings (Click the Gear icon).
Look for the "Target Line Settings" group.
You can now pick any Color you want, change the Style to Solid/Dotted/Dashed, and make the line Thicker or Thinner.
Would you like me to...
Add "Risk to Reward" (RR) Ratio to the table? Since we know the Stop Loss distance and the Target distance, I can calculate the exact Ratio (e.g., "1:2.5") and display it in the dashboard so you know if the trade is worth taking.
Directional Movement Index-25adx with horizontal lines
low line 15 for low volume
mid line 25
high line 40 for high volume and maybe reverse






















