LPC Rebate HunterLPC Rebate Hunter Version 1.3.5
From Static to Dynamic Momentum: Replaced the rigid RSI filter with a Multi-Engine Oscillator (WaveTrend, MFI, or RSI), allowing for smoother cycle detection.
From "Pivots" to "Smart Structure": The liquidity engine now detects Swing Failure Patterns (SFP)—identifying when price "pokes" a level to trap traders before reversing—and automatically cleans up mitigated zones.
Choppy Market Protection: Added an ADX (Average Directional Index) integration to strictly filter out signals during flat/sideways markets.
Risk Management Layer: Introduced a Smart Trailing Stop (ATR-based Chandelier Exit) to help traders manage active positions objectively.
Visual Overhaul: Features a modern gradient trend cloud and a fully adaptive "Heads-Up Display" (HUD) that provides real-time market stats.
Chỉ báo và chiến lược
ADX Forecast Colorful [DiFlip]ADX Forecast Colorful
Introducing one of the most advanced ADX indicators available — a fully customizable analytical tool that integrates forward-looking forecasting capabilities. ADX Forecast Colorful is a scientific evolution of the classic ADX, designed to anticipate future trend strength using linear regression. Instead of merely reacting to historical data, this indicator projects the future behavior of the ADX, giving traders a strategic edge in trend analysis.
⯁ Real-Time ADX Forecasting
For the first time, a public ADX indicator incorporates linear regression (least squares method) to forecast the future behavior of ADX. This breakthrough approach enables traders to anticipate trend strength changes based on historical momentum. By applying linear regression to the ADX, the indicator plots a projected trendline n periods ahead — helping users make more accurate and timely trading decisions.
⯁ Highly Customizable
The indicator adapts seamlessly to any trading style. It offers a total of 26 long entry conditions and 26 short entry conditions, making it one of the most configurable ADX tools on TradingView. Each condition is fully adjustable, enabling the creation of statistical, quantitative, and automated strategies. You maintain full control over the signals to align perfectly with your system.
⯁ Innovative and Science-Based
This is the first public ADX indicator to apply least-squares predictive modeling to ADX dynamics. Technically, it embeds machine learning logic into a traditional trend-strength indicator. Using linear regression as a predictive engine adds powerful statistical rigor to the ADX, turning it into an intelligent, forward-looking signal generator.
⯁ Scientific Foundation: Linear Regression
Linear regression is a fundamental method in statistics and machine learning used to model the relationship between a dependent variable y and one or more independent variables x. The basic formula for simple linear regression is:
y = β₀ + β₁x + ε
Where:
y = predicted value (e.g., future ADX)
x = explanatory variable (e.g., bar index or time)
β₀ = intercept
β₁ = slope (rate of change)
ε = random error term
The goal is to estimate β₀ and β₁ by minimizing the sum of squared errors. This is achieved using the least squares method, ensuring the best linear fit to historical data. Once the coefficients are calculated, the model extends the regression line forward, generating the ADX projection based on recent trends.
⯁ Least Squares Estimation
To minimize the error, the regression coefficients are calculated as:
β₁ = Σ((xᵢ - x̄)(yᵢ - ȳ)) / Σ((xᵢ - x̄)²)
β₀ = ȳ - β₁x̄
Where:
Σ = summation
x̄ and ȳ = means of x and y
i ranges from 1 to n (number of data points)
These formulas provide the best linear unbiased estimator under Gauss-Markov conditions — assuming constant variance and linearity.
⯁ Linear Regression in Machine Learning
Linear regression is a foundational algorithm in supervised learning. Its power in producing quantitative predictions makes it essential in AI systems, predictive analytics, time-series forecasting, and automated trading. Applying it to the ADX essentially places an intelligent forecasting engine inside a classic trend tool.
⯁ Visual Interpretation
Imagine an ADX time series like this:
Time →
ADX →
The regression line smooths these values and projects them n periods forward, creating a predictive trajectory. This forecasted ADX line can intersect with the actual ADX, offering smarter buy and sell signals.
⯁ Summary of Scientific Concepts
Linear Regression: Models variable relationships with a straight line.
Least Squares: Minimizes prediction errors for best fit.
Time-Series Forecasting: Predicts future values using historical data.
Supervised Learning: Trains models to predict outcomes from inputs.
Statistical Smoothing: Reduces noise and highlights underlying trends.
⯁ Why This Indicator Is Revolutionary
Scientifically grounded: Based on rigorous statistical theory.
Unprecedented: First public ADX using least-squares forecast modeling.
Smart: Uses machine learning logic.
Forward-Looking: Generates predictive, not just reactive, signals.
Customizable: Flexible for any strategy or timeframe.
⯁ Conclusion
By merging ADX and linear regression, this indicator enables traders to predict market momentum rather than merely follow it. ADX Forecast Colorful is not just another indicator — it’s a scientific leap forward in technical analysis. With 26 fully configurable entry conditions and smart forecasting, this open-source tool is built for creating cutting-edge quantitative strategies.
⯁ Example of simple linear regression with one independent variable
This example demonstrates how a basic linear regression works when there is only one independent variable influencing the dependent variable. This type of model is used to identify a direct relationship between two variables.
⯁ In linear regression, observations (red) are considered the result of random deviations (green) from an underlying relationship (blue) between a dependent variable (y) and an independent variable (x)
This concept illustrates that sampled data points rarely align perfectly with the true trend line. Instead, each observed point represents the combination of the true underlying relationship and a random error component.
⯁ Visualizing heteroscedasticity in a scatterplot with 100 random fitted values using Matlab
Heteroscedasticity occurs when the variance of the errors is not constant across the range of fitted values. This visualization highlights how the spread of data can change unpredictably, which is an important factor in evaluating the validity of regression models.
⯁ The datasets in Anscombe’s quartet were designed to have nearly the same linear regression line (as well as nearly identical means, standard deviations, and correlations) but look very different when plotted
This classic example shows that summary statistics alone can be misleading. Even with identical numerical metrics, the datasets display completely different patterns, emphasizing the importance of visual inspection when interpreting a model.
⯁ Result of fitting a set of data points with a quadratic function
This example illustrates how a second-degree polynomial model can better fit certain datasets that do not follow a linear trend. The resulting curve reflects the true shape of the data more accurately than a straight line.
⯁ What is the ADX?
The Average Directional Index (ADX) is a technical analysis indicator developed by J. Welles Wilder. It measures the strength of a trend in a market, regardless of whether the trend is up or down.
The ADX is an integral part of the Directional Movement System, which also includes the Plus Directional Indicator (+DI) and the Minus Directional Indicator (-DI). By combining these components, the ADX provides a comprehensive view of market trend strength.
⯁ How to use the ADX?
The ADX is calculated based on the moving average of the price range expansion over a specified period (usually 14 periods). It is plotted on a scale from 0 to 100 and has three main zones:
Strong Trend: When the ADX is above 25, indicating a strong trend.
Weak Trend: When the ADX is below 20, indicating a weak or non-existent trend.
Neutral Zone: Between 20 and 25, where the trend strength is unclear.
⯁ Entry Conditions
Each condition below is fully configurable and can be combined to build precise trading logic.
📈 BUY
🅰️ Signal Validity: The signal will remain valid for X bars .
🅰️ Signal Sequence: Configurable as AND or OR .
🅰️ +DI > -DI
🅰️ +DI < -DI
🅰️ +DI > ADX
🅰️ +DI < ADX
🅰️ -DI > ADX
🅰️ -DI < ADX
🅰️ ADX > Threshold
🅰️ ADX < Threshold
🅰️ +DI > Threshold
🅰️ +DI < Threshold
🅰️ -DI > Threshold
🅰️ -DI < Threshold
🅰️ +DI (Crossover) -DI
🅰️ +DI (Crossunder) -DI
🅰️ +DI (Crossover) ADX
🅰️ +DI (Crossunder) ADX
🅰️ +DI (Crossover) Threshold
🅰️ +DI (Crossunder) Threshold
🅰️ -DI (Crossover) ADX
🅰️ -DI (Crossunder) ADX
🅰️ -DI (Crossover) Threshold
🅰️ -DI (Crossunder) Threshold
🔮 +DI (Crossover) -DI Forecast
🔮 +DI (Crossunder) -DI Forecast
🔮 ADX (Crossover) +DI Forecast
🔮 ADX (Crossunder) +DI Forecast
📉 SELL
🅰️ Signal Validity: The signal will remain valid for X bars .
🅰️ Signal Sequence: Configurable as AND or OR .
🅰️ +DI > -DI
🅰️ +DI < -DI
🅰️ +DI > ADX
🅰️ +DI < ADX
🅰️ -DI > ADX
🅰️ -DI < ADX
🅰️ ADX > Threshold
🅰️ ADX < Threshold
🅰️ +DI > Threshold
🅰️ +DI < Threshold
🅰️ -DI > Threshold
🅰️ -DI < Threshold
🅰️ +DI (Crossover) -DI
🅰️ +DI (Crossunder) -DI
🅰️ +DI (Crossover) ADX
🅰️ +DI (Crossunder) ADX
🅰️ +DI (Crossover) Threshold
🅰️ +DI (Crossunder) Threshold
🅰️ -DI (Crossover) ADX
🅰️ -DI (Crossunder) ADX
🅰️ -DI (Crossover) Threshold
🅰️ -DI (Crossunder) Threshold
🔮 +DI (Crossover) -DI Forecast
🔮 +DI (Crossunder) -DI Forecast
🔮 ADX (Crossover) +DI Forecast
🔮 ADX (Crossunder) +DI Forecast
🤖 Automation
All BUY and SELL conditions are compatible with TradingView alerts, making them ideal for fully or semi-automated systems.
⯁ Unique Features
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Condition Table: BUY/SELL
Condition Labels: BUY/SELL
Plot Labels in the Graph Above: BUY/SELL
Automate and Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Background Colors: "bgcolor"
Background Colors: "fill"
Gold Signal System + Alerts // GOLD SIGNAL SYSTEM + ALERTS
//@version=5
indicator("Gold Signal System + Alerts", overlay=true)
// EMAs
ema50 = ta.ema(close, 50)
ema200 = ta.ema(close, 200)
// Conditions
buySignal = ta.crossover(ema50, ema200)
sellSignal = ta.crossunder(ema50, ema200)
// Plot
plot(ema50, color=color.yellow)
plot(ema200, color=color.blue)
// Signals
plotshape(buySignal, title="BUY", style=shape.labelup, color=color.new(color.green,0), text="BUY", size=size.small)
plotshape(sellSignal, title="SELL", style=shape.labeldown, color=color.new(color.red,0), text="SELL", size=size.small)
// Alerts
alertcondition(buySignal, title="Buy Signal", message="BUY signal on GOLD")
alertcondition(sellSignal, title="Sell Signal", message="SELL signal on GOLD")
Regime MapRegime Map — Volatility State Detector
This indicator is a PineScript friendly approximation of a more advanced Python regime-analysis engine.
The original backed identifies market regimes using structural break detection, Hidden-Markov Models, wavelet decomposition, and long-horizon volatility clustering. Since Pine Script cannot execute these statistical models directly, this version implements a lightweight, real-time proxy using realised volatility and statistical thresholds.
The purpose is to provide a clear visual map of evolving volatility conditions without requiring any heavy offline computation.
________________________________________
Mathematical Basis: Python vs Pine
1. Volatility Estimation
Python (Realised Volatility):
RVₜ = √N × stdev( log(Pₜ) − log(Pₜ₋₁) )
Pine Approximation:
RVₜ = stdev( log(Pₜ) − log(Pₜ₋₁), lookback )
Rationale:
Realised volatility captures volatility clustering — a key characteristic of regime transitions.
________________________________________
2. Regime Classification
Python (HMM Volatility States):
Volatility is modelled as belonging to hidden states with different means and variances:
State μ₁, σ₁
State μ₂, σ₂
State μ₃, σ₃
with state transitions determined by a probability matrix.
Pine Approximation (Z-Score Regimes):
Zₜ = ( RVₜ − mean(RV) ) / stdev(RV)
Regime assignment:
• Regime 0 (Low Vol): Zₜ < Zₗₒw
• Regime 1 (Normal): Zₗₒw ≤ Zₜ ≤ Zₕᵢgh
• Regime 2 (High Vol): Zₜ > Zₕᵢgh
Rationale:
Z-scores provide clean statistical boundaries that behave similarly to HMM state separation but are computable in real time.
________________________________________
3. Structural Break Detection vs Rolling Windows
Python (Bai–Perron Structural Breaks):
Segments the volatility series into periods with distinct statistical properties by minimising squared error over multiple regimes.
Pine Approximation:
Rolling mean and rolling standard deviation of volatility over a long window.
Rationale:
When structural breaks are not available, long-window smoothing approximates slow regime changes effectively.
________________________________________
4. Multi-Scale Cycles
Python (Wavelet Decomposition):
Volatility decomposed into long-cycle (A₄) and short-cycle components (D bands).
Pine Approximation:
Single-scale smoothing using long-horizon averages of RV.
Rationale:
Wavelets reveal multi-frequency behaviour; Pine captures the dominant low-frequency component.
________________________________________
Indicator Output
The background colour reflects the active volatility regime:
• Low Volatility (Green): trending behaviour, cleaner directional movement
• Normal Volatility (Yellow): balanced environment
• High Volatility (Red): sharp swings, traps, mean-reversion phases
Regime labels appear on the chart, with a status panel displaying the current regime.
________________________________________
Operational Logic
1. Compute log returns
2. Calculate short-horizon realised volatility
3. Compute long-horizon mean and standard deviation
4. Derive volatility Z-score
5. Assign regime classification
6. Update background colour and labels
This provides a stable, real-time map of market state transitions.
________________________________________
Practical Applications
Intraday Trading
• Low-volatility regimes favour trend and breakout continuation
• High-volatility regimes favour mean reversion and wide stop placement
Swing Trading
• Compression phases often precede multi-day trending moves
• Volatility expansions accompany distribution or panic events
Risk Management
• Enables volatility-adjusted position sizing
• Helps avoid leverage during expansion regimes
________________________________________
Notes
• Does not repaint
• Fully configurable thresholds and lookbacks
• Works across indices, stocks, FX, crypto
• Designed for real-time volatility regime identification
________________________________________
Disclaimer
This script is intended solely for educational and research purposes.
It does not constitute financial advice or a recommendation to buy or sell any instrument.
Trading involves risk, and past volatility patterns do not guarantee future outcomes.
Users are responsible for their own trading decisions, and the author assumes no liability for financial loss.
Arden SMC OTEThis indicator represents a comprehensive trading system based on Smart Money Concepts (SMC) and Optimal Trade Entry (OTE). The script's key feature is the built-in "Liquidity Trap" filter, which protects the trader from entering positions where the price is highly likely to hunt for stop losses before making the true move.
Key Features:
1. Automatic OTE Search: The indicator identifies market structure (Swing Highs/Lows) on the selected timeframe and draws a Fibonacci grid. Entry is based on the 0.62 level, and the target is the -0.27 extension (or a fixed Risk:Reward ratio).
2. "Liquidity Trap" Filter (Smart Logic):
The algorithm scans the chart for Equal Highs (EQH) and Equal Lows (EQL), based on precise candle body touches.
Protection Logic: If a liquidity zone (EQH/EQL) is located between your entry point and your Stop Loss, the indicator cancels the signal. This saves you from situations where the market maker first "sweeps" liquidity (hits your stop) and only then moves in the desired direction.
3. Flexible Risk Management:
3 Stop Loss modes (Conservative behind the swing, Aggressive behind 0.88 Fib, or ATR-based).
Take Profit selection (Structure-based or fixed RR).
4. SMC Filters:
Equilibrium: Checks if the price is in the Discount zone (for buys) or Premium zone (for sells).
Structure Size: Filters out structures that are too small (noise) using ATR.
How to read the chart:
Grey zones/lines: Your potential trade (Entry, Stop, Take Profit).
Orange boxes: Liquidity Zones (EQH/EQL). If they appear, it means orders have accumulated there.
Labels: "ENTRY 🚀" — entry triggered, "TP HIT" — target reached.
Disclaimer:
This indicator is an assistive tool. Always check the higher timeframe context yourself.
Liquidity Filter Settings
❌ Block on Liquidity (EQH/EQL): The main checkbox. If enabled, the script checks: "Is there an orange liquidity box right before my stop loss?". If yes — no signal is generated.
Show Liquidity Zones: Toggle the visibility of the orange boxes.
Touch Count (cNum): How many times the price must hit the exact same level (body-to-body) for it to count as liquidity. Usually 2 (Double Top/Bottom).
Gap Count (bars): Minimum distance (in bars) between touches.
Confirmation Bars: How many candles must pass after the touch for the zone to be confirmed and drawn.
Superior-Range Bound Renko - Alerts - 11-29-25 - Signal LynxSuperior-Range Bound Renko – Alerts Edition with Advanced Risk Management Template
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
This is the Alerts & Indicator Edition of Superior-Range Bound Renko (RBR).
The Strategy version is built for backtesting inside TradingView.
This Alerts version is built for automation: it emits clean, discrete alert events that you can route into webhooks, bots, or relay engines (including your own Signal Lynx-style infrastructure).
Under the hood, this script contains the same core engine as the strategy:
Adaptive Range Bounding based on volatility
Renko Brick Emulation on standard candles
A stack of Laguerre Filters for impulse detection
K-Means-style Adaptive SuperTrend for trend confirmation
The full Signal Lynx Risk Management Engine (state machine, layered exits, AATS, RSIS, etc.)
The difference is in what we output:
Instead of placing historical trades, this version:
Plots the entry and RM signals in a separate pane (overlay = false)
Exposes alertconditions for:
Long Entry
Short Entry
Close Long
Close Short
TP1, TP2, TP3 hits (Staged Take Profit)
This makes it ideal as the signal source for automated execution via TradingView Alerts + Webhooks.
2. Quick Action Guide (TL;DR)
Best Timeframe:
4H and above. This is a swing-trading / position-trading style engine, not a micro-scalper.
Best Assets:
Volatile but structured markets, e.g.:
BTC, ETH, XAUUSD (Gold), GBPJPY, and similar high-volatility majors or indices.
Script Type:
indicator() – Alerts & Visualization Only
No built-in order placement
All “orders” are emitted as alerts for your external bot or manual handling
Strategy Type:
Volatility-Adaptive Trend Following + Impulse Detection
using Renko-like structure and multi-layer Laguerre filters.
Repainting:
Designed to be non-repainting on closed candles.
The underlying Risk Management engine is built around previous-bar data (close , high , low ) for execution-critical logic.
Intrabar values can move while the bar is forming (normal for any advanced signal), but once a bar closes, the alert logic is stable.
Recommended Alert Settings:
Condition: one of the built-in signals (see section 3.B)
Options: “Once Per Bar Close” is strongly recommended for automation
Message: JSON, CSV, or simple tokens – whatever your webhook / relay expects
3. Detailed Report: How the Alerts Edition Works
A. Relationship to the Strategy Version
The Alerts Edition shares the same internal logic as the strategy version:
Same Adaptive Lookback and volatility normalization
Same Range and Close Range construction
Same Renko Brick Emulator and directional memory (renkoDir)
Same Fib structures, Laguerre stack, K-Means SuperTrend, and Baseline signals (B1, B2)
Same Risk Management Engine and layered exits
In the strategy script, these signals are wired into strategy.entry, strategy.exit, and strategy.close.
In the alerts script:
We still compute the final entry/exit signals (Fin, CloseEmAll, TakeProfit1Plot, etc.)
Instead of placing trades, we:
Plot them for visual inspection
Expose them via alertcondition(...) so that TradingView can fire alerts.
This ensures that:
If you use the same settings on the same symbol/timeframe, the Alerts Edition and Strategy Edition agree on where entries and exits occur.
(Subject only to normal intrabar vs. bar-close differences.)
B. Signals & Alert Conditions
The alerts script focuses on discrete, automation-friendly events.
Internally, the main signals are:
Fin – Final entry decision from the RM engine
CloseEmAll – RM-driven “hard close” signal (for full-position exits)
TakeProfit1Plot / 2Plot / 3Plot – One-time event markers when each TP stage is hit
On the chart (in the separate indicator pane), you get:
plot(Fin) – where:
+2 = Long Entry event
-2 = Short Entry event
plot(CloseEmAll) – where:
+1 = “Close Long” event
-1 = “Close Short” event
plot(TP1/TP2/TP3) (if Staged TP is enabled) – integer tags for TP hits:
+1 / +2 / +3 = TP1 / TP2 / TP3 for Longs
-1 / -2 / -3 = TP1 / TP2 / TP3 for Shorts
The corresponding alertconditions are:
Long Entry
alertcondition(Fin == 2, title="Long Entry", message="Long Entry Triggered")
Fire this to open/scale a long position in your bot.
Short Entry
alertcondition(Fin == -2, title="Short Entry", message="Short Entry Triggered")
Fire this to open/scale a short position.
Close Long
alertcondition(CloseEmAll == 1, title="Close Long", message="Close Long Triggered")
Fire this to fully exit a long position.
Close Short
alertcondition(CloseEmAll == -1, title="Close Short", message="Close Short Triggered")
Fire this to fully exit a short position.
TP 1 Hit
alertcondition(TakeProfit1Plot != 0, title="TP 1 Hit", message="TP 1 Level Reached")
First staged take profit hit (either long or short). Your bot can interpret the direction based on position state or message tags.
TP 2 Hit
alertcondition(TakeProfit2Plot != 0, title="TP 2 Hit", message="TP 2 Level Reached")
TP 3 Hit
alertcondition(TakeProfit3Plot != 0, title="TP 3 Hit", message="TP 3 Level Reached")
Together, these give you a complete trade lifecycle:
Open Long / Short
Optionally scale out via TP1/TP2/TP3
Close remaining via Close Long / Close Short
All while the Risk Management Engine enforces the same logic as the strategy version.
C. Using This Script for Automation
This Alerts Edition is designed for:
Webhook-based bots
Execution relays (e.g., your own Lynx-Relay-style engine)
Dedicated external trade managers
Typical setup flow:
Add the script to your chart
Same symbol, timeframe, and settings you use in the Strategy Edition backtests.
Configure Inputs:
Longs / Shorts enabled
Risk Management toggles (SL, TS, Staged TP, AATS, RSIS)
Weekend filter (if you do not want weekend trades)
RBR-specific knobs (Adaptive Lookback, Brick type, ATR vs Standard Brick, etc.)
Create Alerts for Each Event Type You Need:
Long Entry
Short Entry
Close Long
Close Short
TP1 / TP2 / TP3 (optional, if your bot handles partial closes)
For each:
Condition: the corresponding alertcondition
Option: “Once Per Bar Close” is strongly recommended
Message:
You can use structured JSON or a simple token set like:
{"side":"long","event":"entry","symbol":"{{ticker}}","time":"{{timenow}}"}
or a simpler text for manual trading like:
LONG ENTRY | {{ticker}} | {{interval}}
Wire Up Your Bot / Relay:
Point TradingView’s webhook URL to your execution engine
Parse the messages and map them into:
Exchange
Symbol
Side (long/short)
Action (open/close/partial)
Size and risk model (this script does not position-size for you; it only signals when, not how much.)
Because the alerts come from a non-repainting, RM-backed engine that you’ve already validated via the Strategy Edition, you get a much cleaner automation pipeline.
D. Repainting Protection (Alerts Edition)
The same protections as the Strategy Edition apply here:
Execution-critical logic (trailing stop, TP triggers, SL, RM state changes) uses previous bar OHLC:
open , high , low , close
No security() with lookahead or future-bar dependencies.
This means:
Alerts are designed to fire on states that would have been visible at bar close, not on hypothetical “future history.”
Important practical note:
Intrabar: While a bar is forming, internal conditions can oscillate.
Bar Close: With “Once Per Bar Close” alerts, the fired signal corresponds to the final state of the engine for that candle, matching your Strategy Edition expectations.
4. For Developers & Modders
You can treat this Alerts script as an ”RM + Alert Framework” and inject any signal logic you want.
Where to plug in:
Find the section:
// BASELINE & SIGNAL GENERATION
You’ll see how B1 and B2 are built from the RBR stack and then combined:
baseSig = B2
altSig = B1
finalSig = sigSwap ? baseSig : altSig
To use your own logic:
Replace or wrap the code that sets baseSig / altSig with your own conditions:
e.g., RSI, MACD, Heikin Ashi filters, candle patterns, volume filters, etc.
Make sure your final decision is still:
2 → Long / Buy signal
-2 → Short / Sell signal
0 → No trade
finalSig is then passed into the RM engine and eventually becomes Fin, which:
Drives the Long/Short Entry alerts
Interacts with the RM state machine to integrate properly with AATS, SL, TS, TP, etc.
Because this script already exposes alertconditions for key lifecycle events, you don’t need to re-wire alerts each time — just ensure your logic feeds into finalSig correctly.
This lets you use the Signal Lynx Risk Management Engine + Alerts wrapper as a drop-in chassis for your own strategies.
5. About Signal Lynx
Automation for the Night-Shift Nation 🌙
Signal Lynx builds tools and templates that help traders move from:
“I have an indicator” → “I have a structured, automatable strategy with real risk management.”
This Superior-Range Bound Renko – Alerts Edition is the automation-focused companion to the Strategy Edition. It’s designed for:
Traders who backtest with the Strategy version
Then deploy live signals with this Alerts version via webhooks or bots
While relying on the same non-repainting, RM-driven logic
We release this code under the Mozilla Public License 2.0 (MPL-2.0) to support the Pine community with:
Transparent, inspectable logic
A reusable Risk Management template
A reference implementation of advanced adaptive logic + alerts
If you are exploring full-stack automation (TradingView → Webhooks → Exchange / VPS), keep Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source).
If you build improvements or helpful variants, please consider sharing them back with the community.
LarsTrades Order Flow ZonesLarsTrades Order Flow Zones
**Important:
-Futures charts only!
-Trust the default settings
-best on 2min or lower timeframe.
-if indicator error in replay mode: exit, ctrl+r - it will reset.
This indicator builds a full trade workflow from raw order flow imbalances. It finds aggressive buy and sell imbalances, promotes the strongest ones into key levels, and manages each level through its entire life cycle. Every level becomes a visual zone on the chart that updates in real time as the market moves.
It is built for short-term traders who want clarity, speed, and a structured decision process based on imbalances instead of guesswork.
If you rely on order flow, imbalance zones, or systematic retest setups, this tool helps you stay consistent and understand the story behind each move.
Option Premium + VWAP Dashboard1. What this indicator does
This tool creates a live option chain style dashboard on your chart for index options on NSE.
For a selected expiry and a band of strikes around a reference strike, it shows:
Strike price
CE LTP (Last Traded Price)
PE LTP
CE + PE total premium
Combined VWAP of CE + PE
Individual VWAP of CE
Individual VWAP of PE
Inference column describing who is stronger
(buyers or sellers, CE side or PE side, or mixed)
Rows are color coded based on which side is dominating around VWAP, so you get a quick visual sense of:
At which strikes buyers are aggressive
At which strikes sellers are aggressive
Where premiums are trading near VWAP and stay neutral
You can place this dashboard anywhere on the chart and adjust font size and colors as per your preference.
2. Supported indices
You can use this indicator on the following indices:
NIFTY
BANKNIFTY
FINNIFTY
MIDCAP
SENSEX
Input:
Spot Symbol = choose from BANKNIFTY, NIFTY, FINNIFTY, MIDCAP, SENSEX
Internally, the script maps this choice to the corresponding TradingView symbol:
NIFTY → NSE:NIFTY
BANKNIFTY → NSE:BANKNIFTY
FINNIFTY → NSE:CNXFINANCE
MIDCAP → NSE:CNXMIDCAP
SENSEX → BSE:SENSEX
For options, it uses an option prefix derived from this selection:
For all NSE index options → BANKNIFTY, NIFTY, FINNIFTY, MIDCAP
For SENSEX options → BSX (as per your earlier convention)
Options are then constructed in this format:
PREFIX + YYMMDD + C/P + Strike
Example: NIFTY251120C20000
So the expiry date must be set correctly, otherwise TradingView will not find the options.
3. How the logic works internally
For each strike in the selected range, the script:
Builds the CE and PE symbols using:
Underlying prefix (opt_prefix)
Expiry date in YYMMDD format
C or P
Strike price
Fetches from request.security() on your current chart timeframe:
ce_close, pe_close
ce_vwap, pe_vwap
Calculates:
combined_prem = CE LTP + PE LTP
combined_vwap = CE VWAP + PE VWAP
Compares premiums and VWAPs and creates a detailed inference string, for example:
"Optn buyers stronger | Both buyers strong"
"Optn sellers stronger | CE sellers, PE buyers"
"Near VWAP | Mixed"
Chooses row background color based on which side is stronger:
CE buyers strong → BG CE Buyers Strong
PE buyers strong → BG PE Buyers Strong
CE sellers strong → BG CE Sellers Strong
PE sellers strong → BG PE Sellers Strong
If none of the above is clearly dominant, the row is kept neutral.
This gives you an immediate view of:
Where option buyers are aggressively lifting offers
Where option sellers are dominating
Where the market is balanced near VWAP
4. Expiry settings
How to change expiry to get the correct option chain
The indicator uses a manual expiry input:
Group: Expiry Settings
Input: Expiry (manual)
Internally, it extracts:
year(expiry_manual)
month(expiry_manual)
dayofmonth(expiry_manual)
Then it converts this to YYMMDD and builds option symbols.
How to set this correctly:
Open the indicator settings.
Go to “Expiry Settings”.
In Expiry (manual) select the correct date and time of the option expiry.
For NSE weekly or monthly index options, you can simply select the calendar date of the expiry.
Time is not critical for symbol naming, it is used only to obtain year, month, day, but keeping it at market open time (for example, 09:15) is a good habit.
After changing the expiry:
The title row will update to show the new expiry as DD-MM-YY.
The script will start requesting data for symbols with that YYMMDD in their names.
If you see na in most rows, it usually means:
The expiry date does not match the actual symbol format on TradingView.
The strike prices are too far away from existing contracts.
You are using an expiry where this index does not have options.
In that case, double check the expiry date and strike range.
5. Strike settings
The script gives you a flexible way to control which strikes are shown.
Group: Strike Settings
5.1 Automatic strike interval
By default, the indicator uses index specific strike steps:
BANKNIFTY or SENSEX → 100 point interval
NIFTY or FINNIFTY → 50 point interval
MIDCAP also defaults to 50 points
This is controlled internally by:
use_manual_interval = false
and auto_interval is chosen based on the index.
Use case:
If you want a quick standard layout for a typical option chain view, simply leave “Use Manual Strike Interval” unchecked and let the script choose the appropriate interval automatically.
5.2 Manual strike interval
You can override the default step using:
Use Manual Strike Interval (bool)
Manual Strike Interval (int, default 50)
When Use Manual Strike Interval is true, the script will:
Ignore the automatic index based step.
Use your chosen step size for all strikes.
When to use manual interval:
When the exchange has changed strike spacing for a particular series.
When you want a denser view (for example, 25 point steps in NIFTY) around ATM.
When you want a wider spacing for a broad overview, for example, 200 or 500 point steps.
5.3 Reference strike and range
Two important inputs:
Reference Strike (manual)
Default: 26000
This is the center of the table. The script builds strikes above and below this level.
Strikes Above / Below Reference
Default: 5
The script calculates:
start_strike = ref_strike - half_range * strike_interval
Total number of strikes = 2 * half_range + 1
So with:
Reference Strike = 26000
Strike Interval = 100
Strikes Above / Below = 5
You will get strikes from 25500 to 26500 in steps of 100.
How to choose the reference strike in practice:
Set it close to the current spot price or the ATM strike.
For intraday trading, most of your focus is usually on:
ATM
2 or 3 strikes ITM and OTM on each side
If NIFTY is around 22,250, set Reference Strike to 22200 or 22250 based on available strikes.
If BANKNIFTY is around 49,800, set it to 49800 or 50000.
This keeps the dashboard concentrated around active and liquid strikes that you actually trade.
6. Dashboard layout and appearance
Group: Dashboard Layout
Dashboard Location
Choose where the table appears on your chart.
Options: top left, top center, top right, middle left, middle center, middle right, bottom left, bottom center, bottom right.
Font Size
Choose from Tiny, Small, Normal, Large, Huge depending on your screen size and personal preference.
Group: Colors
You can customize:
Header Background
Title Background
Header Text color
Row backgrounds based on strength:
BG CE Buyers Strong
BG PE Sellers Strong
BG CE Sellers Strong
BG PE Buyers Strong
Row BG neutral for mixed or unclear situations
Suggestion:
Keep buyers related backgrounds in green shades.
Keep sellers related backgrounds in red shades.
Keep neutral in grey.
This matches the logic in the Inference column and makes interpretation much easier.
7. How to read the “Inference” column
The inference logic checks:
Is total premium above or below total VWAP?
Is CE above its VWAP?
Is PE above its VWAP?
Then it combines this into messages like:
“Optn buyers stronger | Both buyers strong”
Both CE and PE trade above their respective VWAPs, and combined premium is above combined VWAP.
Buyers are clearly dominant at that strike.
“Optn sellers stronger | Both sellers strong”
Both CE and PE trade below VWAPs, and combined premium is below combined VWAP.
Sellers are in control at that strike.
“Optn buyers stronger | CE buyers stronger”
Combined premium is above combined VWAP, CE trades above its VWAP, PE is not as strong.
CE side buyers are leading.
“Optn buyers stronger | PE buyers stronger”
Similar, but PE side buyers are leading.
“Optn sellers stronger | CE sellers, PE buyers” or “PE sellers, CE buyers”
Mixed conditions, one side is selling aggressively while the other side has some buyer support.
“Near VWAP | Mixed”
Both premiums are hovering near their VWAP, market is balanced at that strike.
Use this to quickly decide:
Where to avoid trading due to mixed and choppy behaviour.
Where buyers or sellers are clearly dominating and trend can be extended or exhausted.
8. Practical usage tips
Use on intraday timeframes
The script uses timeframe.period for VWAP and LTP calculation. Use it on 1 minute, 3 minute, 5 minute, 15 minute charts for intraday decision making.
Align with index trend
Combine this dashboard with your main price action and trend tools.
For example, if the index trend is strongly up and the ATM and slightly OTM calls show “buyers stronger” with green backgrounds, it can support continuation trades.
Watch shifts in dominance
If you see a cluster of strikes shifting from “buyers stronger” to “sellers stronger”, that can signal distribution or trend exhaustion.
Change expiry when series rolls
For weekly options, you must change Expiry (manual) every week to get the correct option chain.
For monthly and quarterly contracts, update it whenever you roll over to a new series.
Adjust manual interval and reference strike
Before the session starts, quickly adjust:
Reference Strike near current spot
Strikes Above / Below based on how wide a range you want to watch
Optional Manual Strike Interval if you prefer finer or wider spacing
This ensures the dashboard shows the most relevant and liquid strikes instead of cluttering your screen with far OTM data.
9. Limitations and notes
This script depends on correct symbol naming on TradingView for NSE index options.
If the broker or data feed uses a different format, some rows may show na.
Expiry detection is manual by design.
Pine Script cannot reliably auto detect NSE weekly expiry series for every situation, so you are given full manual control to avoid wrong symbol requests.
If you change expiry or strike settings and see an error or many na values, try:
Checking the expiry date.
Bringing reference strike closer to spot.
Refreshing the chart if TradingView needs to load new option symbols.
SCALPING PRO V2 - INTERMÉDIANT (Dashboard + TP/SL + Alerts)//@version=5
indicator("SCALPING PRO V2 - INTERMÉDIANT (Dashboard + TP/SL + Alerts)", overlay=true, max_labels_count=500)
// ---------------- INPUTS ----------------
emaFastLen = input.int(9, "EMA Fast")
emaSlowLen = input.int(21, "EMA Slow")
atrLen = input.int(14, "ATR Length")
atrMultSL = input.float(1.2, "SL = ATR *")
tp1mult = input.float(1.0, "TP1 = ATR *")
tp2mult = input.float(1.5, "TP2 = ATR *")
tp3mult = input.float(2.0, "TP3 = ATR *")
minBars = input.int(3, "Min bars between signals")
showDashboard = input.bool(true, "Show Dashboard")
// ---------------- INDICATORS ----------------
emaFast = ta.ema(close, emaFastLen)
emaSlow = ta.ema(close, emaSlowLen)
atr = ta.atr(atrLen)
bullTrend = emaFast > emaSlow
bearTrend = emaFast < emaSlow
crossUp = ta.crossover(emaFast, emaSlow) and bullTrend
crossDown = ta.crossunder(emaFast, emaSlow) and bearTrend
var int lastSignal = na
okSignal = na(lastSignal) or (bar_index - lastSignal > minBars)
buySignal = crossUp and okSignal
sellSignal = crossDown and okSignal
if buySignal or sellSignal
lastSignal := bar_index
// ---------------- TP & SL ----------------
var float sl = na
var float tp1 = na
var float tp2 = na
var float tp3 = na
if buySignal
sl := close - atr * atrMultSL
tp1 := close + atr * tp1mult
tp2 := close + atr * tp2mult
tp3 := close + atr * tp3mult
if sellSignal
sl := close + atr * atrMultSL
tp1 := close - atr * tp1mult
tp2 := close - atr * tp2mult
tp3 := close - atr * tp3mult
// ---------------- ALERTS ----------------
alertcondition(buySignal, title="BUY", message="BUY Signal")
alertcondition(sellSignal, title="SELL", message="SELL Signal")
alertcondition(ta.cross(close, tp1), title="TP1", message="TP1 Hit")
alertcondition(ta.cross(close, tp2), title="TP2", message="TP2 Hit")
alertcondition(ta.cross(close, tp3), title="TP3", message="TP3 Hit")
alertcondition(ta.cross(close, sl), title="SL", message="Stop Loss Hit")
// ---------------- DASHBOARD ----------------
if showDashboard
var table dash = table.new(position.top_right, 1, 5)
if barstate.islast
table.cell(dash, 0, 0, "SCALPING PRO V2", bgcolor=color.new(color.black, 0), text_color=color.white)
table.cell(dash, 0, 1, "Trend: " + (bullTrend ? "Bull" : bearTrend ? "Bear" : "Neutral"))
table.cell(dash, 0, 2, "ATR: " + str.tostring(atr, format.mintick))
table.cell(dash, 0, 3, "Last Signal: " + (buySignal ? "BUY" : sellSignal ? "SELL" : "NONE"))
table.cell(dash, 0, 4, "EMA Fast/Slow OK")
MA200 Deviation Percentile200-Day MA Deviation with Dynamic Thresholds
OVERVIEW
This indicator measures price deviation from the 200-day moving average as a percentage, with dynamically calculated overbought/oversold thresholds based on historical percentiles.
Best suited for broad market indices (SPY, QQQ, IWM, etc.) where the 200-day MA serves as a reliable long-term trend indicator. Individual stocks may exhibit more erratic behavior around this level.
CALCULATION
Deviation (%) = (Close - 200MA) / 200MA x 100
Dynamic thresholds are derived from actual historical distribution rather than assuming normal distribution:
- Overbought threshold = 97.5th percentile of historical deviations
- Oversold threshold = 2.5th percentile of historical deviations
SETTINGS
MA Length (default: 200)
Moving average period.
Lookback Period (default: 1260)
Historical window for threshold calculation. 1260 bars approximates 5 years of daily data.
Threshold Percentile (default: 5%)
Two-tailed threshold. 5% places overbought/oversold boundaries at the 97.5th and 2.5th percentiles respectively.
INTERPRETATION
Deviation Value
- Positive: Price trading above 200MA
- Negative: Price trading below 200MA
- Magnitude indicates extent of deviation
Percentile Ranking (0-100%)
- Shows where current deviation ranks historically
- Above 90%: Historically elevated
- Below 10%: Historically depressed
Dynamic Threshold Lines
- Red line: Upper boundary based on historical distribution
- Green line: Lower boundary based on historical distribution
- These adapt automatically to each asset's volatility characteristics
APPLICATION
Mean Reversion
Extreme deviations tend to normalize over time. When deviation exceeds dynamic thresholds, probability of mean reversion increases.
Trend Assessment
Sustained positive/negative deviation confirms trend direction. Zero-line crossovers may signal trend changes.
NOTES
- Optimized for daily timeframe on market indices
- Requires sufficient historical data (minimum equal to lookback period)
- Extreme readings do not guarantee immediate reversals
- Use in conjunction with other analysis methods
Single AHR DCA (HM) — AHR Pane (customized quantile)Customized note
The log-regression window LR length controls how long a long-term fair value path is estimated from historical data.
The AHR window AHR window length controls over which historical regime you measure whether the coin is “cheap / expensive”.
When you choose a log-regression window of length L (years) and an AHR window of length A (years), you can intuitively read the indicator as:
“Within the last A years of this regime, relative to the long-term trend estimated over the same A years, the current price is cheap / neutral / expensive.”
Guidelines:
In general, set the AHR window equal to or slightly longer than the LR window:
If the AHR window is much longer than LR, you mix different baselines (different LR regimes) into one distribution.
If the AHR window is much shorter than LR, quantiles mostly reflect a very local slice of history.
For BTC / ETH and other BTC-like assets, you can use relatively long horizons (e.g. LR ≈ 3–5 years, AHR window ≈ 3–8 years).
For major altcoins (BNB / SOL / XRP and similar high-beta assets), it is recommended to use equal or slightly shorter horizons, e.g. LR ≈ 2–3 years, AHR window ≈ 2–3 years.
1. Price series & windows
Working timeframe: daily (1D).
Let the daily close of the current symbol on day t be P_t .
Main length parameters:
HM window: L_HM = maLen (default 200 days)
Log-regression window: L_LR = lrLen (default 1095 days ≈ 3 years)
AHR window (regime window): W = windowLen (default 1095 days ≈ 3 years)
2. Harmonic moving average (HM)
On a window of length L_HM, define the harmonic mean:
HM_t = ^(-1)
Here eps = 1e-10 is used to avoid division by zero.
Intuition: HM is more sensitive to low prices – an extremely low price inside the window will drag HM down significantly.
3. Log-regression baseline (LR)
On a window of length L_LR, perform a linear regression on log price:
Over the last L_LR bars, build the series
x_k = log( max(P_k, eps) ), for k = t-L_LR+1 ... t, and fit
x_k ≈ a + b * k.
The fitted value at the current index t is
log_P_hat_t = a + b * t.
Exponentiate to get the log-regression baseline:
LR_t = exp( log_P_hat_t ).
Interpretation: LR_t is the long-term trend / fair value path of the current regime over the past L_LR days.
4. HM-based AHR (valuation ratio)
At each time t, build an HM-based AHR (valuation multiple):
AHR_t = ( P_t / HM_t ) * ( P_t / LR_t )
Interpretation:
P_t / HM_t : deviation of price from the mid-term HM (e.g. 200-day harmonic mean).
P_t / LR_t : deviation of price from the long-term log-regression trend.
Multiplying them means:
if price is above both HM and LR, “expensiveness” is amplified;
if price is below both, “cheapness” is amplified.
Typical reading:
AHR_t < 1 : price is below both mid-term mean and long-term trend → statistically cheaper.
AHR_t > 1 : price is above both mid-term mean and long-term trend → statistically more expensive.
5. Empirical quantile thresholds (Opp / Risk)
On each new day, whenever AHR_t is valid, add it into a rolling array:
A_t_window = { AHR_{t-W+1}, ..., AHR_t } (at most W = windowLen elements)
On this empirical distribution, define two quantiles:
Opportunity quantile: q_opp (default 15%)
Risk quantile: q_risk (default 65%)
Using standard percentile computation (order statistics + linear interpolation), we get:
Opp threshold:
theta_opp = Percentile( A_t_window, q_opp )
Risk threshold:
theta_risk = Percentile( A_t_window, q_risk )
We also compute the percentile rank of the current AHR inside the same history:
q_now = PercentileRank( A_t_window, AHR_t ) ∈
This yields three valuation zones:
Opportunity zone: AHR_t <= theta_opp
(corresponds to roughly the cheapest ~q_opp% of historical states in the last W days.)
Neutral zone: theta_opp < AHR_t < theta_risk
Risk zone: AHR_t >= theta_risk
(corresponds to roughly the most expensive ~(100 - q_risk)% of historical states in the last W days.)
All quantiles are purely empirical and symbol-specific: they are computed only from the current asset’s own history, without reusing BTC thresholds or assuming cross-asset similarity.
6. DCA simulation (lightweight, rolling window)
Given:
a daily budget B (input: budgetPerDay), and
a DCA simulation window H (input: dcaWindowLen, default 900 days ≈ 2.5 years),
The script applies the following rule on each new day t:
If thresholds are unavailable or AHR_t > theta_risk
→ classify as Risk zone → buy = 0
If AHR_t <= theta_opp
→ classify as Opportunity zone → buy = 2B (double size)
Otherwise (Neutral zone)
→ buy = B (normal DCA)
Daily invested cash:
C_t ∈ {0, B, 2B}
Daily bought quantity:
DeltaQ_t = C_t / P_t
The script keeps rolling sums over the last H days:
Cumulative position:
Q_H = sum_{k=t-H+1..t} DeltaQ_k
Cumulative invested cash:
C_H = sum_{k=t-H+1..t} C_k
Current portfolio value:
PortVal_t = Q_H * P_t
Cumulative P&L:
PnL_t = PortVal_t - C_H
Active days:
number of days in the last H with C_k > 0.
These results are only used to visualize how this AHR-quantile-driven DCA rule would have behaved over the recent regime, and do not constitute financial advice.
顺势为王Disclaimer!!!
This script and indicators do not constitute any financial advice. Traders are fully responsible for their own trading decisions, and the script developer is not liable for any losses or gains resulting from the use of this script. Please use with caution and trade rationally. Fans of Chan Theory are welcome to learn and communicate together. QQ: 2508126812
All-in-One India v21. **Overview**: Multi-indicator strategy for NSE index options (NIFTY/BANKNIFTY) tracking CE/PE premiums as a synthetic asset (straddle or single-leg) on TradingView.
2. **Setup**: Input index, expiry (e.g., 21-08-24), strikes (e.g., 50800 CE/PE). Choose "Combined" for straddle premium or single option.
3. **Data**: Fetches OHLCV for options; plots premium as candlesticks (green up, red down).
4. **Indicators** (toggleable): EMA (7/12 cross), Supertrend (ATR7, factor2), VWAP (daily reset), RSI (7-period, 80/20 levels), SMA (7-period).
5. **Signals**: Buy/Sell on crosses/flips (e.g., EMA fast> slow for buy; one per day/direction). Multi-indicator: Sequential AND logic (best with 1 enabled).
6. **Buy Logic**: EMA cross up, Supertrend to up (-1), premium>VWAP/SMA, RSI>80 (momentum tweak).
7. **Sell Logic**: Opposite crosses/flips (e.g., EMA cross down, Supertrend to down +1, RSI<20).
8. **Trading**: Long premium on buy (volatility play); short on sell (decay). No exits—use opposite signal or targets.
9. **Visuals/Alerts**: Shapes for signals; lines for indicators; alerts on buy/sell.
10. **Tips**: Test intraday near expiry; ATM strikes; risk 1-2%; tweak RSI if needed.
DAILY - 3-Condition Arrows - Buy & SellVersion 1.
On the DAILY time frame, this indicator will add a green BUY arrow to a stock price when the following 3 conditions are ALL true:
BUY (all 3 conditions are true)
1. Stock price > 50 EMA
2. MACD line above moving average
3. Williams %R (Best_Solve version) is above moving average
Conversely, a red SELL arrow will point out when the following 3 conditions are ALL true:
SELL (all 3 conditions are true)
1. Stock price < 50 EMA
2. MACD line below moving average
3. Williams %R (Best_Solve version) is below the moving average
趋势阻力集空间Disclaimer!!!
This script and indicators do not constitute any financial advice. Traders are fully responsible for their own trading decisions, and the script developer is not liable for any losses or gains resulting from the use of this script. Please use with caution and trade rationally. Fans of Chan Theory are welcome to learn and communicate together. QQ: 2508126812
CMEGap° - Daily Gap Levels for Bitcoin by ClearViewLabsCME Gap - BTC Futures Gap Tracker by ClearViewLabs
Tracks unfilled CME Bitcoin Futures gaps and displays them as horizontal levels on your chart.
What it detects:
Close-to-open gaps, the difference between the previous session's close and the current session's open. These are not visual gaps (empty space between candles), but price inefficiencies that tend to get revisited.
What it does:
Detects gaps between previous close and current open (≥0.5% default)
Draws levels that extend until filled or expired
Dashboard shows active gaps with age and distance from current price
Statistical edge (2017-2025 CME BTC data, n=992 gaps):
95% of gaps fill within 30 days
75% fill within the same day
Gaps act as price "magnets", price tends to revisit these levels
Use it for:
Identifying potential support/resistance levels
Setting take-profit targets
Understanding where unfilled liquidity exists
Note: This indicator identifies valid technical levels, not trade signals. Your entry strategy determines your edge.
Features:
Works on any BTC chart (pulls CME data via settings)
Auto-removes filled gaps
Color-coded by direction (red = gap up, green = gap down)
Fades older gaps automatically
Settings:
Gap Threshold: Minimum gap size to detect (default 0.5%)
Max Age: Days before unfilled gaps expire (default 30)
CME Symbol: Change source if needed
new_youtube_strategy//@version=5
strategy("Dow + Homma 1m Scalper (15m filter)", overlay=true, margin_long=100, margin_short=100, initial_capital=10000)
//===== INPUTS =====
maLen = input.int(50, "Trend SMA Length", minval=5)
htf_tf = input.timeframe("15", "Higher TF")
priceTolPct = input.float(0.05, "SR tolerance %", step=0.01)
wickFactor = input.float(2.0, "Hammer/ShootingStar wick factor", step=0.1)
dojiThresh = input.float(0.1, "Doji body % of range", step=0.01)
risk_RR = input.float(2.0, "Reward:Risk", step=0.1)
capitalRiskPct = input.float(1.0, "Risk % of equity per trade", step=0.1)
//===== 1m TREND (SMA) =====
sma1 = ta.sma(close, maLen)
sma1Up = sma1 > sma1
sma1Down = sma1 < sma1
uptrend1 = close > sma1 and sma1Up
downtrend1 = close < sma1 and sma1Down
//===== 15m TREND VIA request.security =====
sma15 = request.security(syminfo.tickerid, htf_tf, ta.sma(close, maLen), lookahead=barmerge.lookahead_off)
sma15Up = sma15 > sma15
sma15Down = sma15 < sma15
uptrend15 = close > sma15 and sma15Up
downtrend15 = close < sma15 and sma15Down
//===== SWING HIGHS/LOWS (LOCAL EXTREMA) =====
var int left = 3
var int right = 3
swHigh = ta.pivothigh(high, left, right)
swLow = ta.pivotlow(low, left, right)
//===== SR FLIP LEVELS =====
var float srSupport = na
var float srResistance = na
// when a swing high is broken -> new support
if not na(swHigh)
if close > swHigh
srSupport := swHigh
// when a swing low is broken -> new resistance
if not na(swLow)
if close < swLow
srResistance := swLow
//===== CANDLE METRICS =====
body = math.abs(close - open)
cRange = high - low
upperW = high - math.max(open, close)
lowerW = math.min(open, close) - low
isBull() => close > open
isBear() => close < open
bullHammer() =>
cRange > 0 and
isBull() and
lowerW >= wickFactor * body and
upperW <= body
bearShootingStar() =>
cRange > 0 and
isBear() and
upperW >= wickFactor * body and
lowerW <= body
isDoji() =>
cRange > 0 and body <= dojiThresh * cRange
bullEngulfing() =>
isBear() and isBull() and
open <= close and close >= open
bearEngulfing() =>
isBull() and isBear() and
open >= close and close <= open
//===== SR PROXIMITY =====
tol = priceTolPct * 0.01 * close
nearSupport = not na(srSupport) and math.abs(close - srSupport) <= tol
nearResistance = not na(srResistance) and math.abs(close - srResistance) <= tol
//===== SIGNAL CONDITIONS =====
bullCandle = bullHammer() or isDoji() or bullEngulfing()
bearCandle = bearShootingStar() or isDoji() or bearEngulfing()
longTrendOK = uptrend1 and uptrend15
shortTrendOK = downtrend1 and downtrend15
longSignal = longTrendOK and nearSupport and bullCandle
shortSignal = shortTrendOK and nearResistance and bearCandle
//===== POSITION SIZING (IN RISK UNITS) =====
var float lastEquity = strategy.equity
riskCapital = strategy.equity * (capitalRiskPct * 0.01)
//===== ENTRY / EXIT PRICES =====
longStop = math.min(low, nz(srSupport, low))
longRisk = close - longStop
longTP = close + risk_RR * longRisk
shortStop = math.max(high, nz(srResistance, high))
shortRisk = shortStop - close
shortTP = close - risk_RR * shortRisk
// qty in contracts (approx; assumes price * qty ≈ capital used)
longQty = longRisk > 0 ? riskCapital / longRisk : 0.0
shortQty = shortRisk > 0 ? riskCapital / shortRisk : 0.0
//===== EXECUTION =====
if longSignal and longRisk > 0 and longQty > 0
strategy.entry("Long", strategy.long, qty=longQty)
strategy.exit("Long TP/SL", from_entry="Long", stop=longStop, limit=longTP)
if shortSignal and shortRisk > 0 and shortQty > 0
strategy.entry("Short", strategy.short, qty=shortQty)
strategy.exit("Short TP/SL", from_entry="Short", stop=shortStop, limit=shortTP)
//===== PLOTS =====
plot(sma1, color=color.orange, title="SMA 1m")
plot(sma15, color=color.blue, title="HTF SMA (15m)")
plot(srSupport, "SR Support", color=color.new(color.green, 50), style=plot.style_linebr)
plot(srResistance,"SR Resistance",color=color.new(color.red, 50), style=plot.style_linebr)
// Visual debug for signals
plotshape(longSignal, title="Long Signal", style=shape.triangleup, location=location.belowbar, color=color.lime, size=size.tiny)
plotshape(shortSignal, title="Short Signal", style=shape.triangledown, location=location.abovebar, color=color.red, size=size.tiny)
SEE + RSI Signal with Dual Invalidationrsi mcd and see close signal. when a candle closes below rsi, see and macd the script prints a tiny circle
WEEKLY - 3-Condition Arrows - Buy & SellVersion 1.
On the WEEKLY time frame, this indicator will add a green BUY arrow to a stock price when the following 3 conditions are ALL true:
BUY (all 3 conditions are true)
1. Stock price > 50 EMA
2. MACD line above moving average
3. Williams %R (Best_Solve version) is above moving average
Conversely, a red SELL arrow will point out when the following 3 conditions are ALL true:
SELL (all 3 conditions are true)
1. Stock price < 50 EMA
2. MACD line below moving average
3. Williams %R (Best_Solve version) is below the moving average
Ghost Cipher [Bit2Billions]Ghost Cipher — Adaptive Market Flow Engine
*A structured, intelligence-driven framework that decodes market flow using smoothing, liquidity distribution, volatility behavior, and range-based logic.*
Ghost Cipher translates complex price action into a clean, intuitive visual environment. It combines multiple analytical modules—including adaptive smoothing, liquidity mapping, volatility profiling, and CRT range-theory detection—into a cohesive, rule-based system. Each component is designed to complement the others: smoothing reduces noise for clearer trend detection, liquidity mapping identifies imbalance zones for potential reversals, and range theory structures intra-day and multi-timeframe price dynamics.
This integration provides traders with a streamlined, actionable view of market flow from micro swings to macro transitions, supporting both decision-making and workflow efficiency.
Why This Script Is Original and Useful
* Ghost Cipher is not a simple mashup: each module is developed with proprietary logic and integrates dynamically with others.
* Classic elements like moving averages, volatility bands, and order blocks are adapted and enhanced, not copied from public scripts.
* Closed-source design ensures that traders see what the script does (trend, liquidity, range signals) without exposing full underlying code.
* All visual and analytical outputs are designed to add tangible value over existing indicators, reducing manual analysis and improving clarity.
Key Features & Components
1. Candles & Visualization
* Custom Heikin-Ashi–style candle coloring for a clean chart.
* Multi-timeframe overlays to highlight higher-timeframe influence.
2. Smoothed Trend Processin g
* Proprietary smoothing for noise-reduced trend detection.
* Zero-Lag Multi-Ribbon: layered momentum ribbon with gradient shading for lag-free directional assessment.
3. Liquidity & Institutional Mapping
* Real-time liquidity depth visualization.
* Detection of pockets, imbalance zones, and resting liquidity clusters.
* Smart Bullish & Bearish Order Blocks with mitigation-focused logic.
4. Dynamic Demand & Supply Engine
* Auto-detection of institutional demand/supply zones.
* Adaptive boundaries respond to volatility, displacement, and liquidity conditions.
5. Volatility & Channel Tools
* Adaptive Bollinger-style volatility bands.
* Macro trendlines, break structures, and volumetric channel mapping.
6. Intelligent Market Flow Tools
* Dynamic Magic Line: adapts to real-time volatility, range compression, and volume shifts.
* CRT Candle Range Theory: detects ranges, equilibrium zones, and breakout/reaction signals.
7. Market Sessions
* Highlights bull/bear sessions for directional bias and structural insight.
Dashboard Metrics
* Volume Delta Dashboard: aggregated BTC delta across major exchanges; multi-asset pairing for comparison.
* Market Overview Panel: current bias, trend regime, and structured analyst notes.
Chart Clarity & Design Standards
* Only essential real-time labels displayed; historical labels hidden.
* Organized visuals with consistent colors, line types, and modular design for quick interpretation.
How to Use / What Traders Gain
* Reduces manual charting and repetitive analysis.
* Speeds workflow using rule-based, automated visualization.
* Cuts through market noise for consistent, structured insights.
* Supports multi-timeframe and multi-market analysis.
Inputs & Settings
* Default settings pre-configured
* Simple Show/Hide toggles for modules
* Minimal exposed fields for ease of use
Recommended Timeframes & Markets
* Works best on 15M, 1H, 4H, Daily, and higher
* Suitable across forex, crypto, indices, and liquid equities
* Pivot-based modules may show noise on illiquid assets
Performance & Limitations
* May draw many objects → disable unused modules for speed
* Refresh the chart if historical buffer issues occur
* TradingView platform limitations handled internally
License & Legal
* Proprietary © 2025
* Redistribution, resale, or disclosure prohibited
* Independently developed with proprietary extensions
* Any resemblance to other tools may result from public-domain concepts
Respect & Transparency
* Built on widely recognized public trading concepts.
* Developed with respect for the TradingView community.
* Any overlaps or similarities can be addressed constructively.
Disclaimer
* Educational purposes only
* Not financial advice
* Trading carries risk — always use paper testing and proper risk management
FAQs
* Source code is not public
* Works best on 15m, 1H, 4H, Daily, Weekly charts
* Modules can be hidden/shown with toggles
* Alerts can be set up manually by users
* Supports multiple markets: forex, crypto, indices, and equities
About Ghost Trading Suite
Author: BIT2BILLIONS
Project: Ghost Trading Suite © 2025
Indicators: Ghost Matrix, Ghost Protocol, Ghost Cipher, Ghost Shadow
Strategies: Ghost Robo, Ghost Robo Plus
Pine Version: V6
The Ghost Trading Suite is designed to simplify and automate many aspects of chart analysis. It helps traders identify market structure, divergences, support and resistance levels, and momentum efficiently, reducing manual charting time.
The suite includes several integrated tools — such as Ghost Matrix, Ghost Protocol, Ghost Cipher, Ghost Shadow, Ghost Robo, and Ghost Robo Plus — each combining analytical modules for enhanced clarity in trend direction, volatility, pivot detection, and momentum tracking.
Together, these tools form a cohesive framework that assists in visualizing market behavior, measuring momentum, detecting pivots, and analyzing price structure effectively.
This project focuses on providing adaptable and professional-grade tools that turn complex market data into clear, actionable insights for technical analysis.
Crafted with 💖 by BIT2BILLIONS for Traders. That's All Folks!
Changelog
v1.0 Core Release
* Custom Heikin-Ashi Candles: Clean, visually intuitive candle designs for effortless chart reading.
* Smoothed Moving Averages: Advanced smoothing algorithms for precise trend tracking and confirmation.
* Liquidity Depth Visualization: Real-time insight into liquidity levels, depth pockets, and imbalance zones.
* Dynamic Demand & Supply Mapping: Automatic detection of institutional demand and supply zones with adaptive boundaries.
* High-Timeframe Candle Zones (HTF): Dual HTF candle overlays for macro-level trend context and control over candle count.
* Trend Lines & Channels: Macro and aggressive volumetric trendlines for structured market flow analysis.
* Zero-Lag Moving Average Ribbon: Layered ribbon with shaded gradients for smoother, lag-free momentum visualization.
* Volatility Bands: Adaptive Bollinger-style bands for dynamic range analysis.
* Dynamic Magic Line: Self-adjusting line responding to real-time volatility and volume shifts.
* CRT Candle Range Theory: Automatic detection and visualization of CRT candle ranges and range-based signals.
* Bull & Bear Sessions: Highlights key market sessions to identify directional bias and volatility shifts.
* Order Blocks: Smart detection of bullish and bearish institutional order blocks.
* Dashboard Module:
* Volume Delta Dashboard: Aggregated delta volume from all major exchanges for BTC, with the ability to pair up to 4 additional assets.
* Market Overview Panel: Displays current bias, trend insights, and actionable analyst notes.
RSI SFP + flexi TP/SL + WT JSON bot RSI SFP + Smart TP/SL + Auto-Trading JSON for WunderTrading
Precision reversal detection for fully automated long/short execution
RSI SFP is a next-generation reversal detection engine combining market structure (Swing Failure Pattern) with RSI divergence confirmation.
It is designed for professional users who require fast, non-repainting, and broker-integrated signals that can be used for automation.
This Invite-Only script offers:
🔷 Core Features
✔ Real-time SFP detection (no candle close required)
The algorithm triggers as soon as price touches previous swing high/low and RSI forms a confirmed divergence.
Ideal for users who want the earliest, most reactive entries.
✔ RSI Divergence Engine
Bullish RSI divergence at prior lows
Bearish RSI divergence at prior highs
Adjustable divergence threshold (RSI difference)
Ultra-low latency decision logic
✔ Smart TP/SL Automation
TP = ±1% fixed profit from entry (configurable)
SL based on swing structure or user-defined %
TP/SL displayed visually on the chart
No repainting once triggered
✔ Full Backtesting Module
Tracks wins/losses across last N trades
Displays monthly statistics (last 4 months)
Tracks estimated P&L using user leverage model
Built-in visual tags for every TP / SL hit
✔ Integrated Auto-Trading for WunderTrading
When enabled, the indicator automatically sends structured JSON signals through TradingView alerts.
Supported actions:
Enter Long
Enter Short
Exit All
Each entry includes:
Market order
Position size based on capital & leverage
Exchange-level TP & SL placement
Your bot on WunderTrading can mirror the exact chart signals in real time.
🔷 Use Cases
Full automation using TradingView → Webhook → WunderTrading
Intraday reversal trading
Swing trading
Multi-exchange automated bot execution
Reversal scalping with tight stops
🔷 Important Notes
This indicator does not repaint after signal confirmation.
Real-time signals may flash while the candle is forming (normal for non-close divergence detection).
Only Invite-Only users can access the script.
No source code is shared.
If you want access, please message me directly on TradingView.
A full setup guide, alerts template, and WT bot configuration are included for subscribers.
🇨🇳 中文版(专业销售版)
RSI SFP + 智能 TP/SL + WunderTrading 自动交易 JSON 引擎
专为自动化反转交易打造的实时 SFP + RSI 背离策略
RSI SFP 指标将 Swing Failure Pattern(SFP 假突破结构)与 RSI 背离进行整合,
用于捕捉极早期的反转机会。
本脚本专为需要 实时、无重绘、可自动化执行 的专业交易者设计。
这是一个 Invite-Only(仅邀请)脚本,专供订阅用户授权使用。
🔷 核心功能
✔ 实时信号(不需要 K 线收盘)
只要价格触及前高/前低 + RSI 背离确认,
立即给出 Long / Short 反转信号,属于极短延迟结构逻辑。
✔ 高级 RSI 背离系统
价格 vs RSI 顶背离
价格 vs RSI 底背离
最小 RSI 差值可调
精准且稳定,不重绘
✔ 智能 TP / SL 自动管理
固定 TP = ±1%(可调)
SL 支持 swing 结构或固定百分比
图表上自动绘制 TP/SL 虚线
信号一旦触发后不重绘
✔ 强大回测统计系统
可追踪最近 N 笔交易
最近 4 个月的月度统计
盈亏汇总表(含杠杆模型)
每次 TP/SL 都自动标注在图表上
✔ 内置 WunderTrading 自动化 JSON
启用后,指标会自动通过 TradingView Alerts → Webhook
向 WT 机器人发送标准化 JSON:
开多(Enter Long)
开空(Enter Short)
全部平仓(Exit All)
并自动包含:
市价下单
杠杆
手数
TP/SL 自动挂单
完全同步图表上的信号。
🔷 适用人群
想要全自动交易(TV → WT → 交易所)
反转交易 / SFP 策略
日内 / 轻量级高频反转
Swing 反转捕捉
需要稳定 TP/SL 的量化用户
🔷 注意事项
信号不会在收盘后重绘,但在 K 线形成中可能闪烁(实时逻辑正常现象)
脚本为 Invite-Only 私密指标,源码不会公开
订阅用户可随时获得使用授权
提供详细 WT 机器人设置教程
如需访问权限,请通过 TradingView 私信联系我。
订阅用户将获得完整的使用指南与设置模板。






















