Elite Correlation Matrix AIThe Elite Correlation Matrix AI indicator provides comprehensive real-time correlation analysis across multiple asset classes, displaying the interrelationships between equities, bonds, commodities, currencies, and volatility instruments.
The indicator calculates and displays correlation coefficients between a predefined set of major market indices and instruments, including:
• Major equity indices (SPY, QQQ, IWM)
• Long-term Treasury bonds (TLT)
• Gold (GLD)
• Crude oil (USO)
• Volatility (VIX)
• US Dollar Index (DXY)
• Bitcoin (BTCUSD)
Key features include:
• Rolling correlation calculations across user-defined periods to identify both short-term and longer-term relationships
• Visual correlation heat map showing the strength and direction of relationships between all tracked instruments
• Detection of correlation breakdowns, which often precede significant market regime shifts
• Dashboard display providing summary metrics of prevailing correlation patterns
The indicator enables users to monitor the current state of market relationships and identify when traditional correlations begin to break down, which frequently serves as an early warning of impending changes in market behavior. By tracking the degree of connectedness between different asset classes, the indicator provides insight into the current risk environment and the potential for diversification effectiveness.
This analysis is particularly valuable for understanding periods of market stress when asset relationships deviate from their normal patterns, as well as identifying environments where traditional correlations hold and where they are undergoing structural changes.
トレンド分析
Bollinger Bands with ATR SL Hariss 369Bollinger Bands are a popular technical analysis tool developed by John Bollinger. They consist of three lines plotted on a price chart:
Middle Band – a simple moving average (usually 20 periods).
Upper Band – the middle band plus two standard deviations.
Lower Band – the middle band minus two standard deviations.
Key Features:
Volatility Indicator: The bands expand when volatility increases and contract when volatility decreases.
Trend Analysis: Prices near the upper band indicate overbought conditions, while prices near the lower band indicate oversold conditions.
Trading Signals: Traders often look for price touches, breaks, or rebounds from the bands to identify potential entries or exits.
To strengthen the trend quality RVOL has been considered. The ideal value of RVOL is 1.5
Higher Time Frame Trend filter gives trend clarity in higher time frame. One can select RVOL and HTF (Higher Time Frame) filter.
Bollinger bands indicator is basically a trend following indicator. We should go with the trend rather book profit @1:1 or 1:2 basis. In that case we might miss the long trend. The middle band is generally considered as stop loss. However, ATR based stop loss has been designed in the script in order to capture the volatility in decent way.
Break out signal is initiated on break out with volume taking higher time frame into consideration.
One can use this indicator in any time frame and any class of asset. To filter higher time frame eg. entry / exit 5 min chart, 15m/1h can be taken as higher time frame, for 1h entry/ exit, 4h can be taken as higher time frame trend filter.
APEX TREND: Macro & Hard Stop SystemAPEX TREND: Macro & Hard Stop System
The APEX TREND System is a composite trend-following strategy engineered to solve the "Whipsaw" problem inherent in standard breakout systems. It orchestrates four distinct technical theories—Macro Trend Filtering, Volatility Squeeze, Momentum, and Volatility Stop-Loss—into a single, hierarchical decision-making engine.
This script is not merely a collection of indicators; it is a rules-based trading system designed for Swing Traders (Day/Week timeframes) who aim to capture major trend extensions while strictly managing downside risk through a "Hard Stop" mechanism.
🧠 Underlying Concepts & Originality
Many trend indicators fail because they treat all price movements equally. The APEX TREND differentiates itself by applying an "Institutional Filter" logic derived from classic Dow Theory and Modern Volatility Analysis.
1. The Macro Hard Stop (The 200 EMA Logic)
Origin: Based on the institutional mandate that “Nothing good happens below the 200-day moving average.”
Function: Unlike standard super trends that flip constantly in sideways markets, this system integrates a 200-period Exponential Moving Average (EMA) as a non-negotiable "Hard Stop."
Synergy: This acts as the primary gatekeeper. Even if the volatility engine signals a "Buy," the system suppresses the signal if the price is below the Macro Baseline, effectively filtering out counter-trend traps.
2. The Volatility Engine (Squeeze Theory)
Origin: Derived from John Carter’s TTM Squeeze concept.
Function: The script identifies periods where Bollinger Bands (Standard Deviation) contract inside Keltner Channels (ATR). This indicates a period of potential energy build-up.
Synergy: The system only triggers an entry when this energy is released (Breakout) AND coincides with Linear Regression Momentum, ensuring the breakout is genuine.
3. Anti-Chop Filter (ADX Integration)
Origin: J. Welles Wilder’s Directional Movement Theory.
Function: A common failure point for trend systems is low-volatility chop. This script utilizes the Average Directional Index (ADX).
Synergy: If the ADX is below the threshold (Default: 20), the market is deemed "Choppy." The script visually represents this by painting candles GRAY, signaling a "No-Trade Zone" regardless of price action.
4. The "Run Trend" Stop Loss (Factor 4.0 ATR)
Origin: Adapted from the Turtle Trading rules regarding volatility-based stops.
Function: Standard Trailing Stops (usually Factor 3.0) are too tight for crypto or volatile equities on daily timeframes.
Optimization: This system employs a wider ATR Multiplier of 4.0. This allows the asset to fluctuate naturally within a trend without triggering a premature exit, maximizing the "Run Trend" potential.
🛠 How It Works (The Algorithm)
The script processes data in a specific order to generate a signal:
Check Macro Trend: Is Price > EMA 200? (If No, Longs are disabled).
Check Volatility: Is ADX > 20? (If No, all signals are disabled).
Check Volume: Is Current Volume > 1.2x Average Volume? (Confirmation of institutional participation).
Trigger: Has a Volatility Breakout occurred in the direction of the Macro Trend?
Execution: If ALL above are true -> Generate Signal.
🎯 Strategy Guide
1. Long Setup (Bullish)
Signal: Look for the Green "APEX LONG" Label.
Condition: The price must be ABOVE the White Line (EMA 200).
Execution: Enter at the close of the signal candle.
Stop Loss: Initial stop at the Green Trailing Line.
2. Short Setup (Bearish)
Signal: Look for the Red "APEX SHORT" Label.
Condition: The price must be BELOW the White Line (EMA 200).
Execution: Enter at the close of the signal candle.
Stop Loss: Initial stop at the Red Trailing Line.
3. Exit Rules (Crucial)
This system employs a Dual-Exit Mechanism:
Soft Exit (Profit Taking): Close the position if the price crosses the Trailing Stop Line (Green/Red line). This locks in profits during a trend reversal.
Hard Exit (Emergency): Close the position IMMEDIATELY if the price crosses the White EMA 200 Line against your trade. This prevents holding a position during a major market regime change.
⚙️ Settings
Momentum Engine: Adjust Bollinger Band/Keltner Channel lengths to tune breakout sensitivity.
Apex Filters: Toggle the EMA 200 or ADX filters on/off to adapt to different asset classes.
Risk Management: The ATR Multiplier (Default 4.0) controls the width of the trailing stop. Lower values = Tighter stops (Scalping); Higher values = Looser stops (Swing).
Disclaimer: This script is designed for trend-following on higher timeframes (4H, 1D, 1W). Please backtest on your specific asset before live trading.
Super-AO with Risk Management Alerts Template - 11-29-25Super-AO with Risk Management: ALERTS & AUTOMATION Edition
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
This is the Indicator / Alerts companion to the Super-AO Strategy.
While the Strategy version is built for backtesting (verifying profitability and checking historical performance), this Indicator version is built for Live Execution.
We understand the frustration of finding a great strategy, only to realize you can't easily hook it up to your trading bot. This script solves that. It contains the exact same "Super-AO" logic and "Risk Management Engine" as the strategy version, but it is optimized to send signals to automation platforms like Signal Lynx, 3Commas, or any Webhook listener.
2. Quick Action Guide (TL;DR)
Purpose: Live Signal Generation & Automation.
Workflow:
Use the Strategy Version to find profitable settings.
Copy those settings into this Indicator Version.
Set a TradingView Alert using the "Any Alert() function call" condition.
Best Timeframe: 4 Hours (H4) and above.
Compatibility: Works with any webhook-based automation service.
3. Why Two Scripts?
Pine Script operates in two distinct modes:
Strategy Mode: Calculates equity, drawdowns, and simulates orders. Great for research, but sometimes complex to automate.
Indicator Mode: Plots visual data on the chart. This is the preferred method for setting up robust alerts because it is lighter weight and plots specific values that automation services can read easily.
The Golden Rule: Always backtest on the Strategy, but trade on the Indicator. This ensures that what you see in your history matches what you execute in real-time.
4. How to Automate This Script
This script uses a "Visual Spike" method to trigger alerts. Instead of drawing equity curves, it plots numerical values at the bottom of your chart when a trade event occurs.
The Signal Map:
Blue Spike (2 / -2): Entry Signal (Long / Short).
Yellow Spike (1 / -1): Risk Management Close (Stop Loss / Trend Reversal).
Green Spikes (1, 2, 3): Take Profit Levels 1, 2, and 3.
Setup Instructions:
Add this indicator to your chart.
Open your TradingView "Alerts" tab.
Create a new Alert.
Condition: Select SAO - RM Alerts Template.
Trigger: Select Any Alert() function call.
Message: Paste your JSON webhook message (provided by your bot service).
5. The Logic Under the Hood
Just like the Strategy version, this indicator utilizes:
SuperTrend + Awesome Oscillator: High-probability swing trading logic.
Non-Repainting Engine: Calculates signals based on confirmed candle closes to ensure the alert you get matches the chart reality.
Advanced Adaptive Trailing Stop (AATS): Internally calculates volatility to determine when to send a "Close" signal.
6. About Signal Lynx
Automation for the Night-Shift Nation 🌙
We are providing this code open source to help traders bridge the gap between manual backtesting and live automation. This code has been in action since 2022.
If you are looking to automate your strategies, please take a look at Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source). If you make beneficial modifications, please release them back to the community!
TheStrat: Timeframe Continuity Failed 2This indicator highlights TheStrat Failed 2 reversals only when the market is in Full Time Frame Continuity (FTFC) based on your chosen timeframes.
It is designed for high-probability directional trades with strong trend confirmation.
⸻
What It Detects
Failed 2 (Reversal Setup)
A Failed 2 occurs when price breaks one side of the previous candle, then fails and closes in the opposite direction:
• Failed 2D → Bullish reversal
• Failed 2U → Bearish reversal
This produces trapped breakout traders, often leading to explosive continuation.
FTFC measures whether price is above or below the opening price of higher timeframes.
If selected timeframes are all aligned, trend conviction is strong.
You can toggle ON/OFF each timeframe to define FTFC:
• 1H
• 1D
• 1W
• 1M
• 1Q
• 1Y
Only the timeframes you select must agree.
⸻
Modes for Different Styles
This indicator supports different trading horizons.
Swing Mode (Recommended for Options 1–5 Days Out)
Focus: Fast multi-day trend continuation
Ideal holding: 1–5 days
Best for: Weekly option expirations
Enable:
• 1H → Entry trigger timeframe
• 1D → Short-term direction
• 1W → Swing trend
• 1M → Macro push behind the move
• Q / Y not required
You end up catching the 1H reversal ignition, with Daily/Weekly/Monthly backing it.
Great for:
• Tuesday–Thursday continuation plays
• Multi-day directional runs
• “Ride the weekly magnitude”
Macro Mode (Long-Term Trend Filter)
Focus: Broad market bias
Ideal holding: weeks to months
Best for: Equity swing traders, leaps, ETF positioning
Enable:
• 1W
• 1M
• 1Q
• 1Y
• 1H / 1D not required
Used to ensure you’re riding institutional trend, not counter-trend noise.
Can be paired with a lower-TF entry tool like this indicator running in Swing Mode.
Label Up “F2D FTFC↑!” —— Bullish Failed-2 triggers FTFC → long setup
Label Down “F2U FTFC↓!” —— Bearish Failed-2 triggers FTFC → short setup
Small Circles —— Failed-2 continuation while FTFC remains intact
Optional Intrabar Alerts when price begins to form a Failed-2.
All plotted entries are close-confirmed unless you enable intrabar alerts.
Symmetrical Geometric MandalaSymmetrical Geometric Mandala
Overview
The Symmetrical Geometric Mandala is an advanced geometric trading tool that applies phi (φ) harmonic relationships to price-time analysis. This indicator automatically detects swing ranges and constructs a scale-invariant geometric framework based on the square root of phi (√φ), revealing natural support/resistance zones and harmonic price-time balance points.
Core Concept
Traditional technical analysis often treats price and time as separate dimensions. This indicator harmonizes them using the mathematical constant √φ (approximately 1.272), creating a geometric "squaring" of price and time that remains proportionally consistent across different chart scales.
The Mathematics
When you select a price range (from swing low to swing high or vice versa), the indicator calculates:
PBR (Price-to-Bar Ratio) = Range / Number of Bars
Harmonic PBR = PBR × √φ (1.272019649514069)
Phi Extension = Range × φ (1.618033988749895)
The Harmonic PBR is the critical value - this is the chart scaling factor that creates perfect geometric harmony between price and time for your selected range.
Visual Components
1. Horizontal Boundary Lines
Two horizontal lines extend from the selected range at a distance of Range × φ (golden ratio extension):
Upper line: Extended above the swing high (for uplegs) or swing low (for downlegs)
Lower line: Extended below the swing low (for uplegs) or swing high (for downlegs)
These lines mark the natural harmonic boundaries of the price movement.
2. Rectangle Diagonal Lines
Two diagonal lines that create a "rectangle" effect, connecting:
Overlap points on horizontal boundaries to swing extremes
These lines go in the opposite direction of the price leg (creating the symmetrical mandala pattern)
When extended, they reveal future geometric support/resistance zones
3. Phi Harmonic Circles (Optional)
Two precisely calculated circles (drawn as smooth polylines):
Circle A: Centered at the first swing extreme (Nodal A)
Circle B: Centered at the second swing extreme (Nodal B)
Radius = Range × φ, causing them to perfectly touch the horizontal boundary lines
These circles visualize the geometric harmony and create a mandala-like pattern that reveals natural price zones.
How to Use
Step 1: Select Your Range
Set the Start Date at your swing low or swing high
Set the End Date at the opposite extreme
The indicator automatically detects whether it's an upleg or downleg
Step 2: Read the Harmonic PBR
Check the highlighted yellow row in the table: "PBR × √φ"
This is your chart scaling value
Step 3: Apply Chart Scaling (Optional)
For perfect geometric visualization:
Right-click on your chart's price axis
Select "Scale price chart only"
Enter the PBR × √φ value
The geometry will now display in perfect harmonic proportion
Step 4: Interpret the Geometry
Horizontal lines: Key support/resistance zones at phi extensions
Diagonal lines: Dynamic trend channels and future price-time balance points
Circle intersections: Natural harmonic turning points
Central diamond area: Core price-time equilibrium zone
Key Features
✅ Automatic swing detection - identifies upleg/downleg automatically
✅ Scale-invariant geometry - maintains proportions across timeframes
✅ Phi harmonic calculations - based on golden ratio mathematics
✅ Professional color scheme - clean, non-intrusive visuals
✅ Customizable display - toggle circles, lines, and table independently
✅ Smooth circle rendering - adjustable segments (16-360) for optimal smoothness
Settings
Show Horizontal Boundary Lines: Display phi extension levels
Show Rectangle Diagonal Lines: Display the geometric framework
Show Phi Harmonic Circles: Display circular geometry (optional)
Circle Smoothness: Adjust polyline segments (default: 96)
Colors: Fully customizable color scheme for all elements
Theory Background
This indicator draws inspiration from:
W.D. Gann's price-time squaring techniques
Bradley Cowan's geometric market analysis
Phi/golden ratio harmonic theory
Mathematical constants in market structure
Unlike traditional Fibonacci retracements, this tool uses √φ instead of φ as the primary scaling constant, creating a unique geometric relationship that "squares" price movement with time passage.
Best Practices
Use on significant swings - Works best on major swing highs/lows
Multiple timeframe analysis - Apply to different timeframes for confluence
Combine with other tools - Use alongside support/resistance and trend analysis
Respect the geometry - Pay attention when price interacts with geometric elements
Chart scaling optional - The geometry works at any scale, but scaling enhances visualization
Notes
The indicator draws geometry from left to right (from Nodal A to Nodal B)
All lines extend infinitely for future projections
The table shows real-time calculations for the selected range
Date range selection uses confirm dialogs to prevent accidental changes
Pure FVG [Textbook]1. The Core Concept
This is not a standard "show all gaps" indicator. It is a specific entry signal generator based on Smart Money Concepts (SMC).
It focuses on Consequent Encroachment (The 50% Level). The underlying principle is that a Fair Value Gap (FVG) represents a market inefficiency where opposing traders are trapped. When price retraces at least 50% back into this gap, it creates pressure as these trapped positions look to exit—either through stop-losses or position reversal. This makes the gap most likely to act as a reversal zone.
2. How It Works (The Lifecycle)
The indicator logic follows a strict sequence of events. A signal is generated only if all conditions are met in order:
-- Phase 1: Identification (The Fresh Gap)
The script scans for the classic 3-candle FVG pattern (where the 1st and 3rd candles do not overlap).
Visual: It draws a box (Green for Bullish, Red for Bearish) extending to the right.
The 50% Line: A dashed line is drawn through the center of the gap.
-- Phase 2: Mitigation (The Gray Zone)
This is the critical filter. The indicator waits for a candle to CLOSE past the 50% dashed line.
Once this happens, the gap is considered "Deeply Mitigated."
Visual: The box changes color to Gray. This tells the trader: "Price is deep in the zone, watch for a reaction."
-- Phase 3: The Signal (Rejection)
Once the box is Gray, the script watches for a "Rejection Candle."
Bullish Scenario: Price is deep in the gap (Gray). The script waits for a candle to close higher than it opened (a green candle).
Bearish Scenario: Price is deep in the gap (Gray). The script waits for a candle to close lower than it opened (a red candle).
Visual: A Triangle Label (▲ or ▼) appears, signaling an entry.
-- Phase 4: Invalidation
If the price closes completely past the far edge of the box (the Stop Loss level), the box is deleted immediately.
3. Key Options
These are the most important settings for the user:
-- Min Gap Size (%):
Filters out "noise." It ensures the script ignores tiny, insignificant gaps that are less than X% in height.
-- Max Visible Gaps:
Keeps your chart clean. It limits how many open boxes can be on the screen at once (e.g., only show the last 3 unclosed gaps).
-- Show Signal History Only:
Feature Highlight: When enabled, this hides all the "noise" of open or failed gaps. It only draws the boxes that successfully produced a Rejection Signal in the past.
AliceTears GridAliceTears Grid is a customizable Mean Reversion system designed to capitalize on market volatility during specific trading sessions. Unlike standard grid bots that place blind limit orders, this strategy establishes a daily or session-based "Baseline" and looks for price over-extensions to fade the move back to the mean.
This strategy is best suited for ranging markets (sideways accumulation) or specific forex sessions (e.g., Asian Session or NY/London overlap) where price tends to revert to the opening price.
🛠 How It Works
1. The Baseline & Grid Generation At the start of every session (or the daily open), the script records the Open price. It then projects visual grid lines above and below this price based on your Step % input.
Example: If the Open is $100 and Step is 1%, lines are drawn at $101, $102, $99, $98, etc.
2. Entry Logic: Reversal Mode This script features a "Reversal Mode" (enabled by default) to filter out "falling knives."
Standard Grid: Buys immediately when price touches the line.
AliceTears Logic: Waits for the price to breach a grid level and then close back inside towards the mean. This confirms a potential rejection of that level before entering.
3. Exit Logic
Target Profit: The primary target is the previous grid level (Mean Reversion).
Trailing Stop: If the price continues moving in your favor, a trailing stop activates to maximize the run.
Stop Loss: A manual percentage-based stop loss is available to prevent deep drawdowns in trending markets.
⚙️ Key Features
Visual Grid: Automatically draws entry levels on the chart for the current session, helping you visualize where the "math" is waiting for price.
Timezone & Session Control: Includes a custom Timezone Offset tool. You can trade specific hours (e.g., 09:30–16:00) regardless of your chart's UTC setting.
Grid Management: Independent logic for Long and Short grids with pyramiding capabilities.
Safety Filters: Options to force-close trades at the end of the session to avoid overnight gaps.
⚠️ Risk Warning
Please Read Before Using: This is a Counter-Trend / Grid Strategy.
Pros: High win rate in sideways/ranging markets.
Cons: In strong trending markets (parabolic pumps or crashes), this strategy will add to losing positions ("catch a falling knife").
Recommendation: Always use the Stop Loss and Date Filter inputs. Do not run this on highly volatile assets without strict risk management parameters.
Settings Guide
Entry Reversal Mode: Keep checked for safer entries. Uncheck for aggressive limit-order style execution.
Grid Step (%): The distance between lines. For Forex, use lower values (0.1% - 0.5%). For Crypto, use higher values (1.0% - 3.0%).
UTC Offset: Adjust this to align the Session Hours with your target market (e.g., -5 for New York).
This script is open source. Feel free to use it for educational purposes or modify it to fit your trading style.
Weighted KDE Mode🙏🏻 The ‘ultimate’ typical value estimator, for the highest computational cost @ time complexity O(n^2). I am not afraid to say: this is the last resort BFG9000 you can ‘ever’ get to make dem market demons kneel before y’all
Quickguide
pls read it, you won’t find it anywhere else in open access
When to use:
If current market activity is so crazy || things on your charts are really so bad (contaminated data && (data has very heavy tails || very pronounced peak)), the only option left is to use the peak (mode) of Kernel Density Estimate , instead of median not even mentioning mean. So when WMA won’t help, when WPNR won’t help, you need this thing.
Setting it up:
Interval: choose what u need, you can use usual moving windows, but I also added yearly and session anchors alike in old VWAP (always prefer 24h instead of Session if your plan allows). Other options like cumulative window are also there.
Parameters: this script ain't no joke, it needs time to make calculations, so I added a setting to calculate only for the last N bars (when “starting at bar N” is put on 0). If it’s not zero it acts as a starting point after which the calculations happen (useful for backtesting). Other parameters keep em as they are, keep student5 kernel , turn off appropriate weights if u apply it to other than chart data, on other studies etc.
But instead of listening to me just experiment with parameters and see what they change, would take 5 mins max
Been always saying that VWAP is ish, not time-aware etc, volume info is incorporated in a lil bit wrong way… So I decided not just to fix VWAP (you can do it yourself in 5 mins), but instead to drop there the Ultimate xD typical value estimator that is ever possible to do. Time aware, volume / inferred volume aware, resistant to all kinds of BS. This is your shieldwall.
How it works:
You can easily do a weighted kernel density estimation, in our case including temporal and intensity information while accumulating densities. Here are some details worth mentioning about the thing:
Kernels are raw (not unit variance), that’s easier to work with later.
h_constants for each kernel were calculated ^^ given that ^^ with python mpmath module with high decimal precision.
In bandwidth calculation instead of using empirical standard deviation as a scaler, I use... ta.range(src, len) / math.sqrt(12)
...that takes data range and converts it to standard deviation, assuming data is uniformly distributed. That’s exactly what we need: a scaler that is coherent with the KDE, that has nothing to do with stdevs, as the kernels except for gaussian ones (that we don’t even need to use). More importantly, if u take multiple windows and see over time which distro they approach on the long term, that would be the uniform one (not the normal one as many think). Sometimes windows are multimodal, sometimes Laplace like etc, so in general all together they are uniform ish.
The one and only kernel you really need is Student t with v = 5 , for the use case I highlighted in the first part of the post for TV users. It’s as far as u can get until ish becomes crazy like undefined variance etc. It has the highest kurtosis = 9 of all distros, perfect for the real use case I mentioned. Otherwise, you don’t even need KDE 4 real, but still I included other senseful kernels for comparison or in case I am trippin there.
Btw, don’t believe in all that hype about Epanechnikov kernel which in essence is made from beta distribution with alpha = beta = 2, idk why folk call it with that weird name, it’s beta2 kernel. Yes on papers it really minimises AMISE (that’s how I calculated h constants for all dem kernels in the script), but for really crazy data (proper use case for us), it ain't provides even ‘closely’ compared with student5 kernel. Not much else to add.
Shout out to @RicardoSantos for inspiration, I saw your KDE script a long time ago brotha, finna got my hands on it.
∞
Diff Price (Future - Spot)Diff Line (Future – Spot) plots a grid of spot-price levels derived from the current futures price.
It rounds the current futures price up to the nearest price block (e.g. every 25 points), then subtracts a user‑defined Diff (Future – Spot) to find the main spot level and draws that as the central line. Additional lines are plotted above and below at equal block distances, with labels showing both Future and Spot values (e.g. 4250 (4215)), plus a compact diff info box for quick reference.
Regime Filter [BigBeluga]🔵 OVERVIEW
Regime Filter is a dual-factor trend condition tool combining price trend momentum and volume expansion into a single, easy-to-read visual framework. It quantifies recent trend direction and volume shifts, then shows them as:
Two oscillator plots for Trend and Volume regimes
Dynamic candle coloring for trend clarity
A quadrant scatter map in your chart corner for immediate regime recognition.
This filter helps traders quickly detect when a trend is healthy & confirmed by strong volume, or weakening & vulnerable due to low volume.
🔵 CONCEPTS
Trend Oscillator: A loop-based trend value calculated by comparing the current smoothed price (HMA of HLC3) against its own trailing history. Positive values indicate trend-up regimes, negative values signal trend-down phases.
Volume Oscillator: Similar loop logic but on smoothed volume (HMA of Volume) — highlighting whether trading activity is expanding or contracting relative to past bars.
hma = ta.hma(hlc3, 15)
vol = ta.hma(volume, 15)
for i = 0 to len
if hma > hma
trend += 1
else
trend -= 1
for i = 0 to len
if vol > vol
voltrend += 1
else
voltrend -= 1
Regime Map Scatter Plot: A unique 2D quadrant displayed in the bottom-right corner. This shows where the market is sitting:
> Top Right (green): Trend ↑ and Volume ↑ → strong confirmed up trend.
> Top Left (red): Trend ↓ but Volume ↑ → strong sell momentum.
> Bottom Right (blue): Trend ↑ but Volume ↓ → uptrend losing steam.
> Bottom Left (yellow): Trend ↓ and Volume ↓ → weak bearish drift.
Dynamic Candle Coloring: Candles are colored by trend only: green for uptrends, red for downtrends, and orange near reversals.
Threshold Fills: The oscillator region is shaded green above +10 (healthy uptrend) and red below -10 (strong downtrend) for instant confidence.
🔵 FEATURES
Normalized trend and volume values adapt automatically to your lookback length.
Candlestick color overrides highlight current trend state in real-time.
Clear zero-line and fill bands help you gauge strength vs. noise.
Scatter regime dashboard updates live to track when trend and volume align or decouple.
Color gradients show intensification or cooling in both oscillators and the regime map.
🔵 HOW TO USE
Look for sustained positive trend and volume values to confirm strong directional moves.
Watch for the scatter dot in the green square (top right) for high-confidence breakouts.
If the dot drops to bottom right, uptrend may be tiring — possible exit zone.
If the dot jumps top left, bearish drive is reinforced by heavy volume — caution on longs.
Use the orange trend coloring as an early warning that trend pressure may be shifting.
Combine with breakout levels or moving averages for a robust regime filter system.
🔵 CONCLUSION
The Regime Filter distills price trend and volume dynamics into an actionable multi-mode display: oscillators, color-coded candles, and an intuitive scatter map. This all-in-one layout helps traders visually read market regime strength and spot fading trends before they turn — perfect for swing traders, intraday scalpers, and macro trend followers alike.
6x EMA Set (5/20/50/100/200/300)This Pine Script indicator utilizes six Exponential Moving Averages (5, 20, 50, 100, 200, and 300 EMA) to visualize market trends and support/resistance levels across multiple timeframes on a single chart. The code is highly customizable, allowing the user to input and adjust the period length and color for each EMA directly within the indicator settings. The calculation engine uses Pine Script v5's optimized ta.ema() function to compute each average based on the closing price, with the EMA formula naturally weighting recent price action more heavily. This multi-layered structure enables the trader to quickly compare short-term momentum (Fast EMAs) against long-term structural trends (Slow EMAs).
DH EMA 28/72/200 Unified Ribbon (Scaled HTF)Unified EMA Ribbon (28/72/200)
This indicator merges two popular EMA systems — 21/55/200 and 34/89/200 — into a single, smoother trend-tracking ribbon.
Each pair of EMAs is averaged to create:
EMA 28 (average of 21 & 34)
EMA 72 (average of 55 & 89)
EMA 200 retained as long-term trend filter
The unified ribbon reduces noise, improves trend clarity, and provides clean pullback zones for high-probability entries, especially on the H1 timeframe.
Dashboard AIO Pro: RSI, MACD & Stoch RSI [THF]Description:
This indicator provides a comprehensive "All-in-One" Dashboard that monitors three major momentum oscillators: RSI, MACD, and Stochastic RSI. It displays their real-time values and interprets their signals (Buy/Sell/Neutral) in a clean, customizable table directly on your chart.
Key Features:
Consolidated View: Instead of cluttering your chart with three separate indicator panes, this dashboard summarizes the market state in one compact table.
Dynamic Summary: The script calculates an "Overall Trend" based on a voting system. If 2 or more indicators agree on a direction, the summary updates to show a "Strong Trend".
Fully Customizable Colors: Users can customize the colors for Strong Buy, Buy, Sell, Strong Sell, and Neutral states via the settings menu to match their chart theme.
Alerts Included: Built-in alert conditions for "Strong Buy Consensus" and "Strong Sell Consensus".
How it Works (The Logic):
RSI (14):
Value > 70: Considered Overbought (Bearish signal).
Value < 30: Considered Oversold (Bullish signal).
MACD (12, 26, 9):
Bullish: MACD Line > Signal Line AND Histogram is rising.
Bearish: MACD Line < Signal Line AND Histogram is falling.
Stoch RSI (14, 14, 3, 3):
Evaluates K% line position relative to 80/20 levels and crossovers with D% line.
Overall Summary:
The script assigns a score (+1 for Bullish, 0 for Neutral).
If the total score >= 2, the trend is identified as "Uptrend".
If the indicators show divergent signals, the status remains "Ranging".
Settings:
You can change the length of all indicators (RSI, MACD, Stoch).
You can change the table position and text size.
Color Customization: Dedicated section to change the dashboard colors.
Alper-EMAAlper-EMA
Description:
This indicator allows you to display 5 customizable EMAs (Exponential Moving Averages) on a single chart. Each EMA can be configured independently with length, color, visibility, and calculation timeframe.
Features:
5 fully customizable EMAs
Set individual length and color for each EMA
Toggle visibility for each EMA
Multi-timeframe calculation: e.g., display EMA300 calculated on a 30-minute timeframe while viewing a 1-minute chart
Labels display EMA period and timeframe for clarity
Adjustable label size: tiny / small / normal / large
Clear and readable plot lines
Use Cases:
Monitor multiple timeframe EMAs simultaneously
Analyze trend and support/resistance levels
Track EMA crossovers for strategy development
Note:
This indicator is suitable for both short-term (scalping) and medium-to-long term analysis. The multi-timeframe feature allows you to see different EMA perspectives on a single chart quickly.
MFM – Light Context HUD (Minimal)Overview
MFM Light Context HUD is the free version of the Market Framework Model. It gives you a fast and clean view of the current market regime and phase without signals or chart noise. The HUD shows whether the asset is in a bullish or bearish environment and whether it is in a volatile, compression, drift, or neutral phase. This helps you read structure at a glance.
Asset availability
The free version works only on a selected list of five assets.
Supported symbols are
SP:SPX
TVC:GOLD
BINANCE:BTCUSD
BINANCE:ETHUSDT
OANDA:EURUSD
All other assets show a context banner only.
How it works
The free version uses fixed settings based on the original MFM model. It calculates the regime using a higher timeframe RSI ratio and identifies the current phase using simplified momentum conditions. The chart stays clean. Only a small HUD appears in the top corner. Full visual phases, ratio logic, signals, and auto tune are part of the paid version.
The free version shows the phase name only. It does not display colored phase zones on the chart.
Phase meaning
The Market Framework Model uses four structural phases to describe how the market
behaves. These are not signals but context layers that show the underlying environment.
Volatile (Phase 1)
The market is in a fast, unstable or directional environment. Price can move aggressively with
stronger momentum swings.
Compression (Phase 2)
The market is in a contracting state. Momentum slows and volatility decreases. This phase
often appears before expansion, but it does not predict direction.
Drift (Phase 3)
The market moves in a more controlled, persistent manner. Trends are cleaner and volatility
is lower compared to volatile phases.
No phase
No clear structural condition is active.
These phases describe market structure, not trade entries. They help you understand the conditions you are trading in.
Cross asset context
The Market Framework Model reads markets as a multi layer system. The full version includes cross asset analysis to show whether the asset is acting as a leader or lagger relative to its benchmark. The free version uses the same internal benchmark logic for regime detection but does not display the cross asset layer on the chart.
Cross asset structure is a core part of the MFM model and is fully available in the paid version.
Included in this free version
Higher timeframe regime
Current phase name
Clean chart output
Context only
Works on a selected set of assets
Not included
No forecast signals
No ratio leader or lagger logic
No MRM zones
No MPF timing
No auto tune
The full version contains all features of the complete MFM model.
Full version
You can find the full indicator here:
payhip.com
More information
Model details and documentation:
mfm.inratios.com
Momentum Framework Model free HUD indicator User Guide: mfm.inratios.com
Disclaimer
The Market Framework Model (MFM) and all related materials are provided for educational and informational purposes only. Nothing in this publication, the indicator, or any associated charts should be interpreted as financial advice, investment recommendations, or trading signals. All examples, visualizations, and backtests are illustrative and based on historical data. They do not guarantee or imply any future performance. Financial markets involve risk, including the potential loss of capital, and users remain fully responsible for their own decisions. The author and Inratios© make no representations or warranties regarding the accuracy, completeness, or reliability of the information provided. MFM describes structural market context only and should not be used as the sole basis for trading or investment actions.
By using the MFM indicator or any related insights, you agree to these terms.
© 2025 Inratios. Market Framework Model (MFM) is protected via i-Depot (BOIP) – Ref. 155670. No financial advice.
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.
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.
Superior-Range Bound Renko - Strategy - 11-29-25 - SignalLynxSuperior-Range Bound Renko Strategy with Advanced Risk Management Template
Signal Lynx | Free Scripts supporting Automation for the Night-Shift Nation 🌙
1. Overview
Welcome to Superior-Range Bound Renko (RBR) — a volatility-aware, structure-respecting swing-trading system built on top of a full Risk Management (RM) Template from Signal Lynx.
Instead of relying on static lookbacks (like “14-period RSI”) or plain MA crosses, Superior RBR:
Adapts its range definition to market volatility in real time
Emulates Renko Bricks on a standard, time-based chart (no Renko chart type required)
Uses a stack of Laguerre Filters to detect genuine impulse vs. noise
Adds an Adaptive SuperTrend powered by a small k-means-style clustering routine on volatility
Under the hood, this script also includes the full Signal Lynx Risk Management Engine:
A state machine that separates “Signal” from “Execution”
Layered exit tools: Stop Loss, Trailing Stop, Staged Take Profit, Advanced Adaptive Trailing Stop (AATS), and an RSI-style stop (RSIS)
Designed for non-repainting behavior on closed candles by basing execution-critical logic on previous-bar data
We are publishing this as an open-source template so traders and developers can leverage a professional-grade RM engine while integrating their own signal logic if they wish.
2. Quick Action Guide (TL;DR)
Best Timeframe:
4 Hours (H4) and above. This is a high-conviction swing-trading system, not a scalper.
Best Assets:
Volatile instruments that still respect market structure:
Bitcoin, Ethereum, Gold (XAUUSD), high-volatility Forex pairs (e.g., GBPJPY), indices with clean ranges.
Strategy Type:
Volatility-Adaptive Trend Following + Impulse Detection.
It hunts for genuine expansion out of ranges, not tiny mean-reversion nibbles.
Key Feature:
Renko Emulation on time-based candles.
We mathematically model Renko Bricks and overlay them on your standard chart to define:
“Equilibrium” zones (inside the brick structure)
“Breakout / impulse” zones (when price AND the impulse line depart from the bricks)
Repainting:
Designed to be non-repainting on closed candles.
All RM execution logic uses confirmed historical data (no future bars, no security() lookahead). Intrabar flicker during formation is allowed, but once a bar closes the engine’s decisions are stable.
Core Toggles & Filters:
Enable Longs and Shorts independently
Optional Weekend filter (block trades on Saturday/Sunday)
Per-module toggles: Stop Loss, Trailing Stop, Staged Take Profits, AATS, RSIS
3. Detailed Report: How It Works
A. The Strategy Logic: Superior RBR
Superior RBR builds its entry signal from multiple mathematical layers working together.
1) Adaptive Lookback (Volatility Normalization)
Instead of a fixed 100-bar or 200-bar range, the script:
Computes ATR-based volatility over a user-defined period.
Normalizes that volatility relative to its recent min/max.
Maps the normalized value into a dynamic lookback window between a minimum and maximum (e.g., 4 to 100 bars).
High Volatility:
The lookback shrinks, so the system reacts faster to explosive moves.
Low Volatility:
The lookback expands, so the system sees a “bigger picture” and filters out chop.
All the core “Range High/Low” and “Range Close High/Low” boundaries are built on top of this adaptive window.
2) Range Construction & Quick Ranges
The engine constructs several nested ranges:
Outer Range:
rangeHighFinal – dynamic highest high
rangeLowFinal – dynamic lowest low
Inner Close Range:
rangeCloseHighFinal – highest close
rangeCloseLowFinal – lowest close
Quick Ranges:
“Half-length” variants of those, used to detect more responsive changes in structure and volatility.
These ranges define:
The macro box price is trading inside
Shorter-term “pressure zones” where price is coiling before expansion
3) Renko Emulation (The Bricks)
Rather than using the Renko chart type (which discards time), this script emulates Renko behavior on your normal candles:
A “brick size” is defined either:
As a standard percentage move, or
As a volatility-driven (ATR) brick, optionally inhibited by a minimum standard size
The engine tracks a base value and derives:
brickUpper – top of the emulated brick
brickLower – bottom of the emulated brick
When price moves sufficiently beyond those levels, the brick “shifts”, and the directional memory (renkoDir) updates:
renkoDir = +2 when bricks are advancing upward
renkoDir = -2 when bricks are stepping downward
You can think of this as a synthetic Renko tape overlaid on time-based candles:
Inside the brick: equilibrium / consolidation
Breaking away from the brick: momentum / expansion
4) Impulse Tracking with Laguerre Filters
The script uses multiple Laguerre Filters to smooth price and brick-derived data without traditional lag.
Key filters include:
LagF_1 / LagF_W: Based on brick upper/lower baselines
LagF_Q: Based on HLCC4 (high + low + 2×close)/4
LagF_Y / LagF_P: Complex averages combining brick structures and range averages
LagF_V (Primary Impulse Line):
A smooth, high-level impulse line derived from a blend of the above plus the outer ranges
Conceptually:
When the impulse line pushes away from the brick structure and continues in one direction, an impulse move is underway.
When its direction flips and begins to roll over, the impulse is fading, hinting at mean reversion back into the range.
5) Fib-Based Structure & Swaps
The system also layers in Fib levels derived from the adaptive ranges:
Standard levels (12%, 23.6%, 38.2%, 50%, 61%, 76.8%, 88%) from the main range
A secondary “swap” set derived from close-range dynamics (fib12Swap, fib23Swap, etc.)
These Fibs are used to:
Bucket price into structural zones (below 12, between 23–38, etc.)
Detect breakouts when price and Laguerre move beyond key Fib thresholds
Drive zSwap logic (where a secondary Fib set becomes the active structure once certain conditions are met)
6) Adaptive SuperTrend with K-Means-Style Volatility Clustering
Under the hood, the script uses a small k-means-style clustering routine on ATR:
ATR is measured over a fixed period
The range of ATR values is split into Low, Medium, High volatility centroids
Current ATR is assigned to the nearest centroid (cluster)
From that, a SuperTrend variant (STK) is computed with dynamic sensitivity:
In quiet markets, SuperTrend can afford to be tighter
In wild markets, it widens appropriately to avoid constant whipsaw
This SuperTrend-based oscillator (LagF_K and its signals) is then combined with the brick and Laguerre stack to confirm valid trend regimes.
7) Final Baseline Signals (+2 / -2)
The “brain” of Superior RBR lives in the Baseline & Signal Generation block:
Two composite signals are built: B1 and B2:
They combine:
Fib breakouts
Renko direction (renkoDir)
Expansion direction (expansionQuickDir)
Multiple Laguerre alignments (LagF_Q, LagF_W, LagF_Y, LagF_Z, LagF_P, LagF_V)
They also factor in whether Fib structures are expanding or contracting.
A user toggle selects the “Baseline” signal:
finalSig = B2 (default) or B1 (alternate baseline)
finalSig is then filtered through the RM state machine and only when everything aligns, we emit:
+2 = Long / Buy signal
-2 = Short / Sell signal
0 = No new trade
Those +2 / -2 values are what feed the Risk Management Engine.
B. The Risk Management (RM) Engine
This script features the Signal Lynx Risk Management Engine, a proprietary state machine built to separate Signal from Execution.
Instead of firing orders directly on indicator conditions, we:
Convert the raw signal into a clean integer (Fin = +2 / -2 / 0)
Feed it into a Trade State Machine that understands:
Are we flat?
Are we in a long or short?
Are we in a closing sequence?
Should we permit re-entry now or wait?
Logic Injection / Template Concept:
The RM engine expects a simple integer:
+2 → Buy
-2 → Sell
Everything else (0) is “no new trade”
This makes the script a template:
You can remove the Superior RBR block
Drop in your own logic (RSI, MACD, price action, etc.)
As long as you output +2 or -2 into the same signal channel, the RM engine can drive all exits and state transitions.
Aggressive vs Conservative Modes:
The input AgressiveRM (Aggressive RM) governs how we interpret signals:
Conservative Mode (Aggressive RM = false):
Uses a more filtered internal signal (AF) to open trades
Effectively waits for a clean trend flip / confirmation before new entries
Minimizes whipsaw at the cost of fewer trades
Aggressive Mode (Aggressive RM = true):
Reacts directly to the fresh alert (AO) pulses
Allows faster re-entries in the same direction after RM-based exits
Still respects your pyramiding setting; this script ships with pyramiding = 0 by default, so it will not stack multiple positions unless you change that parameter in the strategy() call.
The state machine enforces discipline on top of your signal logic, reducing double-fires and signal spam.
C. Advanced Exit Protocols (Layered Defense)
The exit side is where this template really shines. Instead of a single “take profit or stop loss,” it uses multiple, cooperating layers.
1) Hard Stop Loss
A classic percentage-based Stop Loss (SL) relative to the entry price.
Acts as a final “catastrophic protection” layer for unexpected moves.
2) Standard Trailing Stop
A percentage-based Trailing Stop (TS) that:
Activates only after price has moved a certain percentage in your favor (tsActivation)
Then trails price by a configurable percentage (ts)
This is a straightforward, battle-tested trailing mechanism.
3) Staged Take Profits (Three Levels)
The script supports three staged Take Profit levels (TP1, TP2, TP3):
Each stage has:
Activation percentage (how far price must move in your favor)
Trailing amount for that stage
Position percentage to close
Example setup:
TP1:
Activate at +10%
Trailing 5%
Close 10% of the position
TP2:
Activate at +20%
Trailing 10%
Close another 10%
TP3:
Activate at +30%
Trailing 5%
Close the remaining 80% (“runner”)
You can tailor these quantities for partial scaling out vs. letting a core position ride.
4) Advanced Adaptive Trailing Stop (AATS)
AATS is a sophisticated volatility- and structure-aware stop:
Uses Hirashima Sugita style levels (HSRS) to model “floors” and “ceilings” of price:
Dungeon → Lower floors → Mid → Upper floors → Penthouse
These levels classify where current price sits within a long-term distribution.
Combines HSRS with Bollinger-style envelopes and EMAs to determine:
Is price extended far into the upper structure?
Is it compressed near the lower ranges?
From this, it computes an adaptive factor that controls how tight or loose the trailing level (aATS / bATS) should be:
High Volatility / Penthouse areas:
Stop loosens to avoid getting wicked out by inevitable spikes.
Low Volatility / compressed structure:
Stop tightens to lock in and protect profit.
AATS is designed to be the “smart last line” that responds to context instead of a single fixed percentage.
5) RSI-Style Stop (RSIS)
On top of AATS, the script includes a RSI-like regime filter:
A McGinley Dynamic mean of price plus ATR bands creates a dynamic channel.
Crosses above the top band and below the lower band change a directional state.
When enabled (UseRSIS):
RSIS can confirm or veto AATS closes:
For longs: A shift to bearish RSIS can force exits sooner.
For shorts: A shift to bullish RSIS can do the same.
This extra layer helps avoid over-reactive stops in strong trends while still respecting a regime change when it happens.
D. Repainting Protection
Many strategies look incredible in the Strategy Tester but fail in live trading because they rely on intrabar values or future-knowledge functions.
This template is built with closed-candle realism in mind:
The Risk Management logic explicitly uses previous bar data (open , high , low , close ) for the key decisions on:
Trailing stop updates
TP triggers
SL hits
RM state transitions
No security() lookahead or future-bar access is used.
This means:
Backtest behavior is designed to match what you can actually get with TradingView alerts and live automation.
Signals may “flicker” intrabar while the candle is forming (as with any strategy), but on closed candles, the RM decisions are stable and non-repainting.
4. For Developers & Modders
We strongly encourage you to mod this script.
To plug your own strategy into the RM engine:
Look for the section titled:
// BASELINE & SIGNAL GENERATION
You will see composite logic building B1 and B2, and then selecting:
baseSig = B2
altSig = B1
finalSig = sigSwap ? baseSig : altSig
You can replace the content used to generate baseSig / altSig with your own logic, for example:
RSI crosses
MACD histogram flips
Candle pattern detectors
External condition flags
Requirements are simple:
Your final logic must output:
2 → Buy signal
-2 → Sell signal
0 → No new trade
That output flows into the RM engine via finalSig → AlertOpen → state machine → Fin.
Once you wire your signals into finalSig, the entire Risk Management system (Stops, TPs, AATS, RSIS, re-entry logic, weekend filters, long/short toggles) becomes available for your custom strategy without re-inventing the wheel.
This makes Superior RBR not just a strategy, but a reference architecture for serious Pine dev work.
5. About Signal Lynx
Automation for the Night-Shift Nation 🌙
Signal Lynx focuses on helping traders and developers bridge the gap between indicator logic and real-world automation. The same RM engine you see here powers multiple internal systems and templates, including other public scripts like the Super-AO Strategy with Advanced Risk Management.
We provide this code open source under the Mozilla Public License 2.0 (MPL-2.0) to:
Demonstrate how Adaptive Logic and structured Risk Management can outperform static, one-layer indicators
Give Pine Script users a battle-tested RM backbone they can reuse, remix, and extend
If you are looking to automate your TradingView strategies, route signals to exchanges, or simply want safer, smarter strategy structures, please keep Signal Lynx in your search.
License: Mozilla Public License 2.0 (Open Source).
If you make beneficial modifications, please consider releasing them back to the community so everyone can benefit.
Super-AO Engine - Sentiment Ribbon - 11-29-25Super-AO Sentiment Ribbon by Signal Lynx
Overview:
The Super-AO Sentiment Ribbon is the visual companion to the Super-AO Strategy Suite.
While the main strategy handles the complex mathematics of entries and risk management, this tool provides a simple "Traffic Light" visual at the top of your chart to gauge the overall health of the market.
How It Works:
This indicator takes the core components of the Super-AO strategy (The SuperTrend and the Awesome Oscillator), calculates the spread between them and the current price, and generates a normalized "Sentiment Score."
Reading the Colors:
🟢 Lime / Green: Strong Upward Momentum. Ideally, you only want to take Longs here.
🟤 Olive / Yellow: Trend is weakening. Be careful with new entries, or consider taking profit.
⚪ Gray: The "Kill Zone." The market is chopping sideways. Automated strategies usually suffer here.
🟠 Orange / Red: Strong Downward Momentum. Ideally, you only want to take Shorts here.
Integration:
This script uses the same default inputs as our Super-AO Strategy Template and Alerts Template. Use them together to confirm your automated entries visually.
About Signal Lynx:
Free Scripts supporting Automation for the Night-Shift Nation 🌙
(www.signallynx.com)
MFM - Light Context HUD (Free)Overview
MFM Light Context HUD is the free version of the Market Framework Model. It gives you a fast and clean view of the current market regime and phase without signals or chart noise. The HUD shows whether the asset is in a bullish or bearish environment and whether it is in a volatile, compression, drift, or neutral phase. This helps you read structure at a glance.
Asset availability
The free version works only on a selected list of five assets.
Supported symbols are
SP:SPX
TVC:GOLD
BINANCE:BTCUSD
BINANCE:ETHUSDT
OANDA:EURUSD
All other assets show a context banner only.
How it works
The free version uses fixed settings based on the original MFM model. It calculates the regime using a higher timeframe RSI ratio and identifies the current phase using simplified momentum conditions. The chart stays clean. Only a small HUD appears in the top corner. Full visual phases, ratio logic, signals, and auto tune are part of the paid version.
The free version shows the phase name only. It does not display colored phase zones on the chart.
Phase meaning
The Market Framework Model uses four structural phases to describe how the market behaves. These are not signals but context layers that show the underlying environment.
Volatile (Phase 1)
The market is in a fast, unstable or directional environment. Price can move aggressively with stronger momentum swings.
Compression (Phase 2)
The market is in a contracting state. Momentum slows and volatility decreases. This phase often appears before expansion, but it does not predict direction.
Drift (Phase 3)
The market moves in a more controlled, persistent manner. Trends are cleaner and volatility is lower compared to volatile phases.
No phase
No clear structural condition is active.
These phases describe market structure, not trade entries. They help you understand the conditions you are trading in.
Cross asset context
The Market Framework Model reads markets as a multi layer system. The full version includes cross asset analysis to show whether the asset is acting as a leader or lagger relative to its benchmark. The free version uses the same internal benchmark logic for regime detection but does not display the cross asset layer on the chart.
Cross asset structure is a core part of the MFM model and is fully available in the paid version.
Included in this free version
Higher timeframe regime
Current phase name
Clean chart output
Context only
Works on a selected set of assets
Not included
No forecast signals
No ratio leader or lagger logic
No MRM zones
No MPF timing
No auto tune
The full version contains all features of the complete MFM model.
Full version
You can find the full indicator here:
payhip.com
More information
Model details and documentation:
mfm.inratios.com
Disclaimer
The Market Framework Model (MFM) and all related materials are provided for educational and informational purposes only. Nothing in this publication, the indicator, or any associated charts should be interpreted as financial advice, investment recommendations, or trading signals. All examples, visualizations, and backtests are illustrative and based on historical data. They do not guarantee or imply any future performance. Financial markets involve risk, including the potential loss of capital, and users remain fully responsible for their own decisions. The author and Inratios© make no representations or warranties regarding the accuracy, completeness, or reliability of the information provided. MFM describes structural market context only and should not be used as the sole basis for trading or investment actions.
By using the MFM indicator or any related insights, you agree to these terms.
© 2025 Inratios. Market Framework Model (MFM) is protected via i-Depot (BOIP) – Ref. 155670. No financial advice.
sabaribuysellThe KIRA EMA 9–21 + VWAP indicator is a simple, clean intraday trading tool designed to capture high-probability trend entries using a fast EMA crossover confirmed by VWAP direction.
BUY CONDITION:
EMA 9 crosses above EMA 21 AND price trades above VWAP.
SELL CONDITION:
EMA 9 crosses below EMA 21 AND price trades below VWAP.
Signals are shown directly on the chart with clear BUY and SELL labels.
Background colors highlight trade zones:
• Green = Buy Zone
• Red = Sell Zone
• Grey = No-Trade Zone
This strategy works best on intraday timeframes:
1 minute to 15 minute charts.
Trend Breakout & Ratchet Stop System [Market Filter]Description:
This strategy implements a robust trend-following system designed to capture momentum moves while strictly managing downside risk through a multi-stage "Ratchet" exit mechanism and broad market filters.
It is designed for swing traders who want to align individual stock entries with the overall market direction.
How it works:
1. Market Regime Filters (The "Safety Check") Before taking any position, the strategy checks the health of the broader market to avoid "catching falling knives."
Broad Market Filter: By default, it checks NASDAQ:QQQ (adjustable). If the benchmark is trading below its SMA 200, the strategy assumes a Bear Market and suppresses all new long entries.
Volatility Filter (VIX): Uses CBOE:VIX to gauge fear. If the VIX is above a specific threshold (Default: 32), entries are paused, and existing positions can optionally be closed to preserve capital.
2. Entry Logic Entries are based on Momentum and Trend confirmation. A position is opened if filters are clear AND one of the following occurs:
Golden Cross: SMA 25 crosses over SMA 50.
SMA Breakouts: A "Three-Bar-Break" logic confirms a breakout above the SMA 50, 100, or 200 (price must establish itself above the moving average).
3. The "Ratchet" Exit System The exit logic evolves as the trade progresses, tightening risk like a ratchet:
Stage 0 (Initial Risk): Starts with a standard percentage Stop Loss from the entry price.
Stage 1 (Breakeven/Lock): Once the price rises by Profit Step 1 (e.g., +10%), the Stop Loss jumps to a tighter level and locks there. This secures the initial move.
Stage 2 (Trailing Mode): If the price continues to rise to Profit Step 2 (e.g., +15%), the Stop Loss converts into a dynamic Trailing Stop relative to the Highest High. This allows the trade to run as long as the trend persists.
Additional Exits:
Dead Cross: Closes position if SMA 25 crosses under SMA 50.
VIX Panic: Emergency exit if volatility spikes above the threshold.
Settings & Customization:
SMAs: Adjustable lengths for all Moving Averages.
Filters: Toggle Market/VIX filters on/off and choose your benchmark ticker (e.g., SPY or QQQ).
Risk Management: Fully customizable percentages for the Ratchet steps (Initial SL, Stage 1 Trigger, Trailing distance).






















