RSI Trend Authority [JOAT]RSI Trend Authority - VAR-RSI with OTT Trend Detection System
Introduction
RSI Trend Authority is an open-source overlay indicator that combines Variable Index Dynamic Average (VAR) smoothed RSI with the Optimized Trend Tracker (OTT) to create a complete trend detection and signal generation system. Unlike traditional RSI which oscillates in a separate pane, this indicator scales the RSI to price and overlays it directly on your chart, making trend analysis more intuitive.
The indicator generates clear BUY and SELL signals when the smoothed RSI crosses the OTT trailing stop line, providing actionable entry points with trend confirmation.
Originality and Purpose
This indicator is NOT a simple mashup of RSI and moving averages. It is an original implementation that transforms RSI into a trend-following overlay system:
Why VAR Smoothing? Traditional RSI is noisy and produces many false signals. The Variable Index Dynamic Average (VAR) is an adaptive smoothing algorithm based on the Chande Momentum Oscillator principle. It adjusts its smoothing factor based on market conditions - responding quickly during trends and smoothing out during choppy markets. This creates an RSI that filters noise while preserving genuine momentum shifts.
Why OTT Trailing Stop? The Optimized Trend Tracker (OTT) is a percentage-based trailing stop mechanism that only moves in the direction of the trend. When VAR-RSI crosses above OTT, a bullish trend is confirmed; when it crosses below, a bearish trend is confirmed. This provides clear, actionable signals rather than subjective interpretation.
Price Scaling Innovation: By scaling RSI (0-100) to price using the formula (RSI * close / 50), the indicator overlays directly on the price chart. This allows traders to see how momentum relates to actual price levels, making trend analysis more intuitive than a separate oscillator pane.
ATR Boundaries: Optional volatility-based boundaries show when price is extended relative to its normal range, helping identify potential reversal zones.
How the components work together:
VAR smoothing removes RSI noise while preserving trend information
OTT provides a dynamic trailing stop that generates clear crossover signals
Price scaling allows direct overlay on the chart for intuitive analysis
ATR boundaries add volatility context for profit target estimation
Core Components
1. VAR-RSI (Variable Index Dynamic Average RSI)
The foundation of this indicator is the VAR smoothing algorithm applied to RSI. VAR is an adaptive moving average that adjusts its smoothing factor based on the Chande Momentum Oscillator principle:
f_var_calc(float data, int length) =>
int a = 9
float b = data > nz(data ) ? data - nz(data ) : 0.0
float c = data < nz(data ) ? nz(data ) - data : 0.0
float d = math.sum(b, a)
float e = math.sum(c, a)
float f = nz((d - e) / (d + e))
float g = math.abs(f)
float h = 2.0 / (length + 1)
float x = ta.sma(data, length)
This creates an RSI that:
Responds quickly during trending conditions
Smooths out during choppy, sideways markets
Reduces false signals compared to raw RSI
2. OTT (Optimized Trend Tracker)
The OTT acts as a dynamic trailing stop that follows the VAR-RSI:
In uptrends, OTT trails below the VAR-RSI line
In downtrends, OTT trails above the VAR-RSI line
The OTT Percent parameter controls how closely it follows
When VAR-RSI crosses above OTT, a bullish trend is confirmed. When VAR-RSI crosses below OTT, a bearish trend is confirmed.
3. Price Scaling
The RSI (0-100 scale) is converted to price scale using:
float scaleFactor = close / 50.0
float varRSIScaled = varRSI * scaleFactor
This allows the indicator to overlay directly on price, showing how momentum relates to actual price levels.
Visual Components
VAR-RSI Line (Cyan/Magenta)
The main indicator line with gradient coloring:
Cyan gradient when RSI is above 50 (bullish)
Magenta gradient when RSI is below 50 (bearish)
Line thickness of 3 for clear visibility
OTT Line (Yellow Circles)
The trailing stop line displayed as circles:
Acts as dynamic support in uptrends
Acts as dynamic resistance in downtrends
Crossovers generate trading signals
Trend Fill
The area between VAR-RSI and OTT is filled:
Cyan fill during bullish trends
Magenta fill during bearish trends
Fill transparency allows price visibility
Buy position and LONG on Dashboard with a Uptrend:
ATR Boundaries (Optional)
Dotted lines showing volatility-based price boundaries:
Upper band: Close + (ATR x Multiplier)
Lower band: Close - (ATR x Multiplier)
Color matches current trend direction
Buy/Sell Signals
Clear labels appear at signal points:
BUY label below bar when VAR-RSI crosses above OTT
SELL label above bar when VAR-RSI crosses below OTT
Additional glow circles highlight signal bars
Bar Coloring
Optional feature that colors price bars:
Cyan bars during bullish trend
Magenta bars during bearish trend
Dashboard Panel
The 8-row dashboard provides comprehensive status information:
Signal: Current position - LONG or SHORT (large text)
VAR-RSI: Current smoothed RSI value (large text)
RSI State: OVERBOUGHT, OVERSOLD, BULLISH, or BEARISH
OTT Trend: UPTREND or DOWNTREND based on OTT direction
Bars Since: Number of bars since last signal
Price: Current close price (large text)
OTT Level: Current OTT trailing stop value
Input Parameters
RSI Settings:
RSI Length: Period for RSI calculation (default: 100)
Source: Price source (default: close)
VAR Settings:
VAR Length: Adaptive smoothing period (default: 50)
OTT Settings:
OTT Period: Trailing stop calculation period (default: 30)
OTT Percent: Distance percentage for trailing stop (default: 0.2)
ATR Trend Boundaries:
Show ATR Boundaries: Toggle visibility (default: enabled)
ATR Length: Period for ATR calculation (default: 14)
ATR Multiplier: Distance multiplier (default: 2.0)
Display Options:
Show Buy/Sell Signals: Toggle signal labels (default: enabled)
Show Status Table: Toggle dashboard (default: enabled)
Table Position: Choose corner placement
Color Bars by Trend: Toggle bar coloring (default: enabled)
Color Scheme:
Bullish Color: Main bullish color (default: cyan)
Bearish Color: Main bearish color (default: magenta)
OTT Line: Trailing stop color (default: yellow)
VAR-RSI Line: Main line color (default: teal)
ATR colors for boundaries
How to Use RSI Trend Authority
Signal-Based Trading:
Enter LONG when BUY signal appears (VAR-RSI crosses above OTT)
Enter SHORT when SELL signal appears (VAR-RSI crosses below OTT)
Use the OTT line as a trailing stop reference
Trend Confirmation:
Cyan fill indicates bullish trend - favor long positions
Magenta fill indicates bearish trend - favor short positions
Check RSI State in dashboard for momentum context
Using the Dashboard:
Monitor "Bars Since" to assess signal freshness
Check RSI State for overbought/oversold warnings
Use OTT Level as a reference for stop placement
ATR Boundaries:
Price near upper ATR band in uptrend suggests extension
Price near lower ATR band in downtrend suggests extension
Boundaries help identify potential reversal zones
Parameter Optimization
For Faster Signals:
Decrease RSI Length (try 50-80)
Decrease VAR Length (try 30-40)
Decrease OTT Period (try 15-25)
For Smoother Signals:
Increase RSI Length (try 120-150)
Increase VAR Length (try 60-80)
Increase OTT Period (try 40-50)
For Tighter Stops:
Decrease OTT Percent (try 0.1-0.15)
For Wider Stops:
Increase OTT Percent (try 0.3-0.5)
Alert Conditions
Three alert conditions are available:
Buy Signal: VAR-RSI crosses above OTT
Sell Signal: VAR-RSI crosses below OTT
Trend Change: OTT direction changes
Understanding the OTT Calculation
The OTT uses a percentage-based trailing mechanism:
float farkOTT = mavgOTT * ottPercent * 0.01
float longStopCalc = mavgOTT - farkOTT
float shortStopCalc = mavgOTT + farkOTT
longStop := mavgOTT > nz(longStop ) ? math.max(longStopCalc, nz(longStop )) : longStopCalc
shortStop := mavgOTT < nz(shortStop ) ? math.min(shortStopCalc, nz(shortStop )) : shortStopCalc
This ensures the trailing stop only moves in the direction of the trend, never against it.
Best Practices
Use on 1H timeframe or higher for more reliable signals
Wait for signal confirmation before entering trades
Consider RSI State when evaluating signal quality
Use ATR boundaries for profit target estimation
The longer RSI length (100) provides smoother trend detection
Combine with support/resistance analysis for better entries
Limitations
Signals may lag during rapid price movements due to smoothing
Works best in trending markets; may whipsaw in ranges
The overlay nature means RSI values are scaled, not absolute
Default parameters are optimized for crypto and forex; adjust for other markets
Technical Notes
This indicator is written in Pine Script v6 and uses:
VAR (Variable Index Dynamic Average) for adaptive smoothing
OTT (Optimized Trend Tracker) for trailing stop calculation
ATR for volatility-based boundaries
Gradient coloring for intuitive trend visualization
The source code is open and available for review and modification.
Disclaimer
This indicator is provided for educational and informational purposes only. It is not financial advice. Trading involves substantial risk of loss. Past performance does not guarantee future results. Always conduct your own analysis and use proper risk management.
-Made with passion by officialjackofalltrades
تحليل الموجات
Continuation Gauge - Bull vs BearDivergence/ strength detector - great for tracking entry at key divergences and visualizing volatility.
Ultimate Gold & FX - K-NN Master V83An environment recognition tool integrated with K-NN (K-Nearest Neighbors).
The MACD, STC, and SMC settings are fully customizable. It also features Elliott Wave displays, making it a highly advanced and versatile tool.
M15 Impulse FVG EntryM15 Impulse FVG Entry
M15 Impulse FVG Entry is a minimalist price-action tool designed to highlight structured entry contexts using impulse candles, decision zones, and Fair Value Gap (FVG) logic.
⸻
Core Logic
1. M15 Impulse Candle
A strong M15 candle is identified using ATR expansion and body-to-range ratio.
This candle defines a decision zone (High / Low).
2. IN Candle
Only the first candle that forms fully inside the decision zone after the M15 impulse is considered.
This candle acts as the structural reference.
3. OUT Candle
Price must break cleanly outside the zone.
The previous candle must already close outside the zone.
No reversal is allowed through the IN candle extreme.
4. FVG Entry Context
The gap between the IN candle and the OUT candle forms the Fair Value Gap.
A midpoint between IN and OUT can be used as a potential entry reference.
⸻
What This Script Shows
• M15 — Impulse candle marker
• Zone — High / Low of the impulse candle
• IN — First valid candle inside the zone
• OUT — Valid breakout candle
⸻
Design Philosophy
• No BUY / SELL bias
• No alerts, no automation
• No indicator stacking
• Clean and chart-friendly
This script provides market context and structure only .
Risk management and execution rules remain the trader’s responsibility.
WaveTrend MACD Fusion Oscillator [MatrixQuantLabs]WaveTrend MACD Fusion Oscillator is a composite momentum oscillator that combines WaveTrend trend structure with MACD momentum analysis in a unified panel.
It is designed to help traders better align trend strength, wave timing, and signal confirmation through normalization, filtering, and divergence analysis.
Core Concept
Instead of using the original WaveTrend histogram structure, this indicator adopts the standard MACD histogram as its momentum foundation.
This design choice allows for clearer and more reliable differentiation of trend strength, while maintaining consistency across different symbols and timeframes through normalization.
WaveTrend is then applied as a wave timing and signal layer, making the overall structure easier to interpret and more robust in varying market conditions.
Key Features
Normalized MACD for Cross-Market Consistency
• The indicator uses standard MACD parameters (12/26/9) and applies normalization to scale values into a consistent range.
• This helps avoid chart distortion across different symbols and timeframes.
• An optional “Hide Weekly+” mode is provided to prevent higher-timeframe MACD values from compressing the panel scale.
MACD Histogram with Optional MACD Lines
• The MACD histogram visually represents bullish and bearish momentum, with dynamic coloring to reflect momentum expansion or contraction.
• MACD and Signal lines can be optionally displayed when deeper analysis is required.
Divergence Detection (Regular & Hidden)
Built-in divergence detection supports both MACD lines and histogram-based divergences, with selectable modes:
• Regular Divergence for potential reversals
• Hidden Divergence for trend continuation
Pivot-based confirmation and range filters help reduce noise and false signals.
WaveTrend Oscillator with Cross Strength Classification
• The WaveTrend module consists of a main trend line and a signal line, highlighting wave structure and momentum shifts.
• Golden crosses and death crosses are classified into multiple strength levels, allowing users to distinguish minor signals from more significant ones.
• The closer a counter-directional cross occurs to the overbought or oversold zones, the stronger the potential reversal signal.
• Optional Laguerre smoothing can be enabled to reduce noise and improve signal stability.
MACD-Based Signal Filtering
WaveTrend cross signals can be filtered using MACD conditions:
• Histogram Filter: Bullish crosses only when the MACD histogram is bullish, bearish crosses only when bearish
• Zero-Line Filter: Bullish crosses only above the MACD zero line, bearish crosses only below
These filters help align wave signals with the broader momentum context and reduce counter-trend noise.
Parameter Notes
Normalization Period
• Adjust this value if the indicator appears compressed or if different symbols show inconsistent scaling.
Pivot Right
• Higher values provide stronger confirmation with more delay; lower values are more sensitive and respond faster.
Laguerre Smoothing (Gamma)
• Lower values offer stronger smoothing and stability; higher values provide faster but noisier responses.
Usage Notes
• Use WaveTrend crosses to identify wave timing and momentum shifts.
• Use MACD (histogram and zero line) to assess trend direction and momentum strength.
• Divergence signals should be treated as early warnings, not standalone trade triggers.
• Best results are achieved when combined with trend analysis, price structure, or higher-timeframe context.
Disclaimer
This indicator is intended for educational and analytical purposes only and does not constitute financial advice. Always apply proper risk management and confirm signals with additional analysis.
Mongoose Capital: Oil Regime + Geo Risk IntegrationMongoose Capital — Oil Regime + Geo Risk Integration
Overview
Oil Regime + Geo Risk Integration is a macro-aware regime classification framework designed to contextualize crude oil price action through curve structure, volatility state, demand pressure, trend alignment, and macro tightness.
Rather than forecasting price, this indicator answers a more important question for energy traders:
“What type of oil market are we currently trading in?”
The output is a clear regime state with an execution playbook, allowing traders to adapt tactics to conditions instead of forcing the same strategy across incompatible environments.
What This Indicator Does
This script classifies the oil market into distinct regimes by evaluating:
Curve structure (tight vs loose)
Volatility state (expanding vs suppressed)
Demand strength
Trend direction
Macro tightness or ease
Geopolitical / risk sensitivity layer
Each bar resolves into a single regime, paired with:
A readable regime label
A background state
A recommended execution posture
Regime Framework (Conceptual)
The regime engine resolves into one of the following high-level environments:
Risk-Off / Defensive
Weak demand
Loose curve
Downtrend
Macro stress present
→ Favor defense, mean reversion, or standing aside
Volatility Expansion / Event Risk
Elevated volatility
Tightening structure
→ Favor tactical trades, reduced size, wider stops
Trend Expansion / Supply-Driven
Strong demand
Tight curve
Trend confirmation
→ Favor continuation, breakouts, directional exposure
Neutral / Transitional
Mixed signals
Low alignment
→ Patience required, confirmation preferred
Alignment Confidence
The indicator also computes an alignment score, reflecting how many core components agree:
Curve
Volatility
Demand
Macro state
Higher alignment implies greater regime confidence. Lower alignment signals transition risk and elevated false moves.
How to Use
Apply the indicator to WTI / CL or related oil instruments.
Identify the current regime label and background state.
Adjust execution behavior accordingly:
Strategy selection
Position sizing
Holding period
Risk tolerance
This tool is most effective when paired with:
Structure-based trading
Order flow tools
Execution overlays (such as the WTI Execution Overlay)
What This Indicator Is
A market context engine
A regime classification system
A macro-aware execution guide
What This Indicator Is Not
Not a buy/sell signal
Not predictive
Not a standalone trading system
Intended Audience
Energy and futures traders
Macro-focused discretionary traders
Traders who adapt strategy based on regime rather than fixed rules
This script assumes the user already understands basic market structure and risk management.
Credits
Developed by Mongoose Labs, the research arm of Mongoose Capital, focused on:
Regime-based market structure
Macro-integrated execution logic
Institutional-style trading frameworks
Provided strictly for educational and analytical use.
Disclaimer
This indicator does not constitute financial advice. Trading futures and leveraged instruments involves substantial risk. Past regime explanations do not guarantee future outcomes. Use at your own discretion.
Internal note (not for publishing):
This pairs perfectly with:
WTI Execution Overlay
Oil Volatility Compression Monitor
Energy Macro Dashboard
Smart Signals [Vdubus]Smart Signals
Concept & Philosophy
Smart Signals is a "Regime-Filtered" oscillator designed to solve the biggest problem with standard indicators: Counter-trend noise.
Most oscillators (like Stochastic or RSI) are "dumb" to market context—they will signal "Sell" continuously during a strong uptrend simply because the price is high. Smart Signals fixes this by first determining the Market Regime (Bullish or Bearish) and then strictly filtering out any signal that contradicts that trend.
It creates a "Tiered" trading system that separates standard trend-following entries from high-probability "Sniper" entries (Hidden Divergence), all presented in a clean, color-blind-friendly visual interface.
Core Functions
1. The "Sheriff" (Trend Filter)
At the heart of the indicator is a heavy, modified Hull Moving Average (HMA 200) that acts as the trend baseline.
Bullish Regime: When the baseline is sloping UP, the indicator enters "Buy Only" mode. All Sell signals are mathematically deleted.
Bearish Regime: When the baseline is sloping DOWN, the indicator enters "Sell Only" mode. All Buy signals are mathematically deleted.
The Math: It uses a custom difference-weighted formula (wmaHalf = Length / 1) to create a stable, chop-resistant trend anchor.
2. Dual-Signal Engine
The indicator scans for two distinct types of entries simultaneously:
♦ Standard Signals (Blue/Red Diamonds):
Logic: A classic Stochastic pullback (Cross 20/80) aligned with the trend.
Use Case: These are frequent "Bread and Butter" trend entries. They are excellent for scaling into a position or adding to a winner as the trend continues.
Location: Plotted at the top (Sell) and bottom (Buy) edges of the panel.
+ Sniper Signals (Gold Crosses):
Logic: Hidden Divergence. The script detects when Price holds structure (Higher Low) while Momentum resets (Lower Low). This is a "Slingshot" setup.
Use Case: These are rare, high-conviction entries. They often mark the end of a complex correction and the resumption of the main trend.
Location: Plotted on the Zero Line to indicate structural strength.
3. Smart Momentum Histogram
The histogram visualizes the "Energy" of the move (MACD 21, 34, 7), but with a twist. It is color-coded to the signal priority:
Gold Bars: A Sniper (Divergence) setup is active.
Solid Blue/Red Bars: A Standard Signal is active.
Faded Blue/Red Bars: The trend is active, but momentum is resetting (waiting mode).
Gray Bars: Counter-trend noise (Ignore).
How to Trade It
Check the "Road": Look at the general color of the histogram columns.
Blue Columns: Look for Longs.
Red Columns: Look for Shorts.
The "Sniper" Entry: Wait for a Gold Cross (+) on the zero line. This is your primary signal to enter a trade with normal risk.
The "Pyramid" Entry: If the trend continues and you see Blue/Red Diamonds (♦) appear at the edges, these are safe places to add to your position.
The Exit: Since this is a trend-following tool, exit when the histogram color flips (e.g., from Blue to Red/Gray), or use your own support/resistance targets.
Alerts Configuration
The indicator comes with a full suite of alerts for automation:
Gold Buy / Gold Sell: Notifies you only for the high-probability Hidden Divergence setups.
Standard Buy / Standard Sell: Notifies you for every trend pullback.
ANY BUY / ANY SELL: A combo alert that triggers on either signal type (useful for simplifying your alert limits).
Accessibility
Color Blind Friendly: The default palette uses High-Contrast Blue (#2962FF) and Soft Red (#FF5252) instead of standard Green/Red, ensuring visibility for all users.
Zero Clutter: No text labels or confusing lines. Just clear, distinct shapes (Diamonds and Crosses) at fixed locations.
Chainbey Ai - Liquidity Zones (Pivot Sweeps) - Chain Style📌 Indicator Description
Chainbey Ai – Liquidity Zones (Pivot Sweeps) – Chain Style
This indicator automatically identifies and visualizes liquidity zones on the chart based on confirmed swing highs and lows, helping traders spot areas where stop-loss clusters, institutional interest, and liquidity grabs are likely to occur.
Unlike simple pivot markers, this script draws true liquidity zones (price areas, not single lines) and tracks when price sweeps those zones — a common behavior before strong reversals or continuations.
The indicator is designed to stay stable when switching pairs or timeframes, using time-anchored zones for reliable positioning across all markets.
🔍 Key Features
Buy-Side Liquidity Zones
Marked above swing highs (potential stop-loss pools)
Sell-Side Liquidity Zones
Marked below swing lows
Liquidity Sweep Detection
Highlights when price grabs liquidity using wick or close
Zone Strength Filters
ATR-based swing size filtering
Optional volume confirmation
Cooldown logic to reduce clutter
Time-Anchored Zones
Zones remain aligned when switching symbols or timeframes
Highly Customizable
Control pivot strength, zone size, filters, and visibility
Works on All Markets
Crypto, Forex, Indices, Commodities, Stocks
🧠 How to Use
Trend Continuation
Look for price to sweep liquidity and continue in trend direction
Reversal Setup
Liquidity sweep + rejection can signal potential reversals
Confluence Tool
Combine with trend, RSI, MACD, structure, or volume analysis
Risk Management
Liquidity zones can act as logical SL/TP reference areas
⚠️ This is a market structure & liquidity tool, not a buy/sell signal generator.
Always use confirmation before entering trades.
⚙️ Recommended Settings (BTC 30m)
Pivot Length: 9–12
Min Swing Size (ATR): 1.5 – 2.5
Cooldown Bars: 30 – 50
Max Active Zones: 15 – 20
Volume Filter: Optional (1.2 – 1.4x)
Evil's Two Legged IndicatorA pullback strategy indicator designed for scalping. This attempts to Identify classic 2-leg pullback patterns and filters out signals during choppy market conditions for better signals.
How It Works:
The indicator detects when price forms two pullback legs (swing lows in an uptrend or swing highs in a downtrend) near key support/resistance zones, then signals when reversal confirmation occurs. Equal-level pullbacks (double bottoms/tops) are marked as stronger signals.
Features:
Channel Options: Donchian (default), Linear Regression, or ATR Bands
Configurable EMA: For trend confirmation (default 21)
Adjustable Leg Detection: Swing lookback period for different timeframes
Equal Level Detection: Highlights stronger setups where both legs terminate at similar prices
Three Chop Filters (can be combined):
ADX Filter — suppresses signals when ADX is below threshold (default 25)
EMA Slope Filter — suppresses signals when EMA is flat
Chop Index Filter — suppresses signals when Chop Index indicates ranging conditions
Signal Types:
Standard signals: 2-leg pullback detected with trend confirmation
Strong signals (highlighted): 2-leg pullback with equal highs/lows — higher probability setup
Recommended Use:
Best suited for scalping on 1-5 minute chart. Designed for 1.5:1 risk/reward setups.
Settings Guide:
Increase "Swing Lookback" for fewer, higher-quality signals
Adjust "Equal Level Threshold" to fine-tune what counts as a double bottom/top
Enable/disable chop filters based on your market and timeframe
Use "Show Strong Signals Only" to filter for highest conviction setups
&BAMM&
This indicator shows a break of the peak and a pullback if the trend was upward and the path changed to downward, along with an indication of the targets, and the opposite in a downward trend.
mehja,atops and bottoms
This indicator shows a break of the peak and a pullback if the trend was upward and the path changed to downward, along with an indication of the targets, and the opposite in a downward trend.
deKoder | Structural Flow [SF]deKoder | SF | Structural Flow - Swing/Pivot Structure Charting
Strips away the noise of standard candlestick charts and reveals the true underlying swing structure through clean, connected pivot lines.
Beneath the storm of wicks / Silent structure whispers truth
Extreme Noise Reduction
Replaces cluttered price action with a minimalist pivot based line chart. The user-defined Window length lets you control sensitivity: shorter for more detail on lower timeframes, longer for cleaner structure on higher timeframes.
Accurate Swing Detection
Only stronger pivots are accepted. Weaker same side pivots are ignored, preserving the true extreme highs and lows without distortion.
Real Time Extension
The final incomplete leg dynamically follows the current close until the next confirmed pivot forms.
Optional Directional Colouring
Enable Directional Colouring to automatically colour confirmed legs with the user defined bull and bear colours on upward and downward swings.
Adjustable Background Candles
Candles with adjustable transparency may be displayed on the chart. Adjust the visibility setting to find the perfect balance between full raw candle data and clean structure
Practical Uses
Instantly reveals classic chart patterns — head & shoulders, double tops/bottoms, triangles, flags with unmistakable clarity
Becomes simple to spot Wyckoff springs, upthrusts, and phase transitions inside trading ranges
Provides a clean foundation for manual Elliott Wave counting . Clear swing structure makes labeling impulses and corrections much easier
Makes trend changes and potential reversals stand out without second-guessing every wick
Excellent for higher-timeframe structural analysis — the longer window setting produces exceptionally clean swing views
Ideal for creating clean educational screenshots and annotated posts - the chart speaks for itself
Reduces emotional noise by shifting focus from every candle to meaningful swing structure
Well suited for swing and price action traders, Wyckoff and Elliott Wave analysis, and anyone who prefers calm, uncluttered charts over constant visual chaos.
Clean charts. Clear sight.
☠ FR33FA11 | deKoder ☠
Released January 2025 | Open Source
If this open-source script (or any of its free companions) has saved you time or helped you read the market better, a coffee or a few sats helps to keep the Pine coming ❤️
Solana: 2N8HWPAHSC7Z8SLyneMrZp234UAP9HCtQX7wNXw7LKQC
Ethereum: 0xE770D254DC579d1db7bA2fe74376b7009527356B
Bitcoin: bc1qd8j3awht5yrjtnvt5dagxldzhaesc83sftype3
Polygon: 0xE770D254DC579d1db7bA2fe74376b7009527356B
Hype: 0xE770D254DC579d1db7bA2fe74376b7009527356B
Trade with TreandThink of this script as a filter and a signal light for trading Gold. It helps you avoid trading in the wrong direction and tells you exactly when the price momentum is shifting.
The Three Main Parts
The Ultimate Trend (The Filter):
This is the big table in the top-right corner.
Bullish (Green): Only look for BUY signals.
Bearish (Red): Only look for SELL signals.
It uses a "300 SMA" (a long-term average) to make sure you aren't "swimming against the tide."
The Entry Signals (The Crossover):
The script watches two lines on your chart (a 20-period and a 10-period).
When they cross, it places a BUY or SELL label on your screen.
The 4 Alerts (The Notifications):
You don't have to stare at the screen all day.
You get a notification for Buy entries, Sell entries, or when the Main Trend flips from Bullish to Bearish (or vice versa).
Simple Rules for Trading
To be successful with this script, follow these four rules:
Rule 1: Check the Table. If it says "Bearish," ignore all "BUY" labels.
Rule 2: Wait for the Label. Only enter a trade when a "BUY" or "SELL" label appears and it matches the trend table.
Rule 3: Protect Your Money. Look at the last 5 candles. Put your Stop Loss just past the highest or lowest point of those candles.
Rule 4: Aim for the Target. Your profit target should be at least double the amount of money you are risking (Risk:Reward 1:2).
How to use the Settings
When you click the Settings icon on the script, you can change:
SMA Filter: Change the "300" if you want the trend to be faster or slower.
Trend Gap: Adjust how far the trailing line stays away from the price.
Moving Average Structure ZigZag [Stable & Filtered]
(日本語説明)
このインジケーターは、移動平均線(MA)の転換に基づき、相場の「真の構造」を可視化するために開発されました。 通常のZigZagのように価格の単純な反転に依存せず、「MAのトレンド転換 + 指定した値幅の到達」という2つの条件を用いることで、レンジ相場の細かなノイズ(ダマシ)を排除し、ダウ理論に基づいた重要な高値・安値だけを結びます。
💡 主な機能
MAタイプの切り替え: SMA, EMA, HMA, VW-HMAなど、目的に合わせたトレンド感度を選択可能。
値幅フィルター(Min Deviation): 添付画像のように、小さな値動きをカットし、大きな市場構造だけを抽出します。
価格アクションへの追従: ラインはMAの数値ではなく、期間内の実最高値・最安値を正確に結び、高値更新時には自動で延伸されます。
🛠 活用シーン
環境認識: 上位足での大きな波形を確認し、現在のフェーズを定義。
ノイズ除去: 市場の主要な節目(レジサポ候補)の特定。
ダウ理論の視覚化: 高値・安値の切り上がり・切り下がりを明確化。
(English Description)
This indicator was developed to visualize the "True Market Structure" based on Moving Average (MA) reversals. Unlike standard ZigZag which relies solely on price reversals, this tool combines MA Trend Reversals and a Minimum Deviation filter to eliminate market noise and highlight significant swing highs and lows based on Dow Theory.
💡 Key Features
Multiple MA Types: Select from SMA, EMA, HMA, VW-HMA, etc., to match your preferred trend sensitivity.
Min Deviation Filter: As shown in the attached image, it filters out minor price fluctuations to extract only the major market waves.
Price Action Tracking: The lines connect the actual High/Low prices within the period, not the MA values themselves. Lines automatically extend when a trend continues to new highs/lows.
🛠 Use Cases
Market Context: Identify major wave patterns on higher timeframes to define the current phase.
Noise Reduction: Pinpoint key market levels and potential support/resistance.
Dow Theory Visualization: Clearly visualize higher highs/lows and trend shifts.
Settings
MA Type: Choose the type of Moving Average.
Moving Average Length: The lookback period for structure.
Min Deviation (Pips): The threshold to filter noise. Adjust according to the volatility of the pair.
Wedge Pattern [Kodexius]Wedge Pattern is a chart-overlay indicator designed to detect and manage classic Rising Wedge (bearish) and Falling Wedge (bullish) structures using strict, rules-based validation. The script focuses on producing clean, tradable wedge prints by building both boundaries from confirmed pivot swings, enforcing a mandatory “no closes outside the wedge” condition during formation, and requiring the wedge apex to be projected into the future to avoid premature or distorted patterns.
This implementation is built for practical execution charts. It continuously updates the active wedge boundaries in real time, clearly labels the pattern type, and reacts decisively when price confirms a valid breakout. When enabled, it also projects a measured-move target derived from the wedge geometry, so the trader can quickly evaluate reward potential without manual projection.
The detection logic is intentionally conservative. Rather than printing every possible converging structure, it aims to identify wedges that respect structural integrity: multiple touches on each boundary, controlled price action inside the converging range, and a valid convergence point (apex) ahead of the current bar. The result is a wedge tool that prioritizes quality, readability, and consistent behavior across symbols and timeframes.
🔹 Features
🔸 Rising and Falling Wedge Detection (Trendline Based)
The indicator detects two wedge types by constructing an upper trendline from pivot highs and a lower trendline from pivot lows:
Rising Wedge (Bearish): both lines slope upward, and the lower line rises faster than the upper line, creating a tightening upward channel that typically resolves with a downside break.
Falling Wedge (Bullish): both lines slope downward, and the upper line falls faster than the lower line, producing a tightening downward channel that typically resolves with an upside break.
This slope relationship is the core wedge classifier. It ensures the script is not just drawing random converging lines, but explicitly requires the characteristic “compression” geometry that defines wedges.
🔸 Pivot-Confirmed Structure with User Control
Wedges are built from confirmed pivots using:
Pivot Left and Pivot Right inputs to control how “strict” a pivot must be.
Min. Touches per Line to enforce multiple confirmations on each boundary.
Standard technical analysis commonly requires at least three touches to validate a trendline. This script supports that workflow by requiring a minimum number of pivot points before a wedge is eligible for drawing.
🔸 Mandatory Integrity Rule: No Closes Outside the Boundaries
A key quality filter is applied before a wedge can be accepted:
During formation, no candle close is allowed outside the upper or lower boundary.
If any close is detected above the upper line or below the lower line (with tick tolerance), the candidate wedge is rejected. This prevents patterns that already “broke” before they were formally detected and reduces false positives caused by messy price action.
🔸 Apex Validation to Avoid Distorted Prints
The wedge apex (the projected intersection point of the two trendlines) must be in the future. This avoids degenerate cases where lines intersect behind current price, which often indicates the structure is not a valid wedge or is already past its useful phase.
🔸 Live Updating Boundaries for Active Patterns
Once a wedge becomes active, its upper and lower lines are extended forward bar by bar. The script recalculates the boundary price at the current bar index using the stored slope, then updates the line endpoints so the wedge remains visually accurate as time advances.
🔸 Breakout Engine with Directional Confirmation
The script differentiates between:
Correct breakout: the wedge breaks in the expected direction.
Rising wedge breaks downward (close below the lower boundary).
Falling wedge breaks upward (close above the upper boundary).
When this happens, the wedge is marked as broken and labeled as BREAKOUT on the chart.
🔸 Invalidation and Failure Handling
If price violates the wedge in the wrong direction, or if the wedge collapses into an impossible structure (upper boundary falls below or equals the lower boundary), the wedge is flagged as FAILED. This keeps signals honest and prevents lingering drawings that no longer represent a valid pattern.
🔸 Optional Target Projection (Measured Move)
When Show Target Projection is enabled, the script plots a dashed target line and a target label after a valid breakout. The target is computed as a measured move using the wedge height, projected from the breakout boundary in the breakout direction. This provides an immediate objective reference for potential continuation.
🔸 Clean Object Management and Chart Readability
To maintain clarity, the script manages the “active” wedge per type:
If a new wedge is detected while an older one is still active and not broken or failed, the old drawings are removed and replaced with the newer valid pattern.
This prevents chart clutter and keeps the display focused on the most relevant wedge structures.
🔹 Calculations
1) Pivot Collection
The script uses pivot functions to confirm swing points:
float ph = ta.pivothigh(high, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
float pl = ta.pivotlow(low, INPUT_PIVOT_LEFT, INPUT_PIVOT_RIGHT)
if not na(ph)
pivot_highs.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, ph))
if not na(pl)
pivot_lows.push(Coordinate.new(bar_index - INPUT_PIVOT_RIGHT, pl))
Each pivot is stored as a Coordinate containing:
index: the bar index where the pivot is confirmed
price: the pivot high or pivot low value
The arrays are capped (for example, last 20 pivots) to control memory and keep selection relevant.
2) Trendline Construction and Slope
A wedge candidate uses the earliest and latest required pivot points for each line. For each boundary, slope is computed as:
method calc_slope(Trendline this) =>
(this.end.price - this.start.price) / (this.end.index - this.start.index)
With slope known, the trendline value at any bar index is:
method get_price_at(Trendline this, int bar_idx) =>
this.start.price + this.slope * (bar_idx - this.start.index)
This approach allows the script to update wedge boundaries consistently without re-fitting lines on every bar.
3) Wedge Type Classification (Geometry Rules)
After both slopes are calculated, wedge type is determined by slope direction and relative steepness:
Rising wedge requires both slopes positive and lower slope greater than upper slope.
Falling wedge requires both slopes negative and upper slope more negative than lower slope (upper line falls faster).
In code logic:
if tl_up.slope > 0 and tl_lo.slope > 0 and tl_lo.slope > tl_up.slope
w_type := 1 // Rising
if tl_up.slope < 0 and tl_lo.slope < 0 and tl_up.slope < tl_lo.slope
w_type := 2 // Falling
This enforces converging boundaries and avoids simple parallel channels.
4) Apex Projection (Trendline Intersection)
The apex is the projected intersection x-coordinate of the two trendlines:
method get_apex_index(Wedge this) =>
float m1 = this.upper.slope
float m2 = this.lower.slope
float y1 = this.upper.start.price
float y2 = this.lower.start.price
int x1 = this.upper.start.index
int x2 = this.lower.start.index
float apex_x = (y2 - y1 + m1 * x1 - m2 * x2) / (m1 - m2)
math.round(apex_x)
Validation requires:
apex_idx > bar_index (apex must be in the future)
This prevents late or structurally invalid wedges from being activated.
5) Mandatory “No Close Outside” Validation
Before activation, the script verifies the pattern has not been violated by candle closes:
method check_violation(Wedge this, int from_idx, int to_idx) =>
bool violated = false
for i = from_idx to to_idx
float up_p = this.upper.get_price_at(i)
float lo_p = this.lower.get_price_at(i)
float c_p = close
if c_p > up_p + syminfo.mintick or c_p < lo_p - syminfo.mintick
violated := true
break
violated
Interpretation:
For every bar from wedge start to current bar, the close must remain between the projected upper and lower boundary prices.
A tick tolerance (syminfo.mintick) is used to reduce micro false violations.
6) Live Update and Breakout Detection
Once active, lines are extended to the current bar and boundary prices are computed:
float u_p = w.upper.get_price_at(bar_index)
float l_p = w.lower.get_price_at(bar_index)
bool b_up = close > u_p
bool b_dn = close < l_p
Correct breakout conditions:
Rising wedge breakout: close below lower boundary.
Falling wedge breakout: close above upper boundary.
if (w.is_rising and b_dn) or (not w.is_rising and b_up)
w.is_broken := true
Invalidation rules include:
wrong-direction break
boundary crossover (upper <= lower)
7) Target Projection (Measured Move)
If target display is enabled, the script calculates wedge height and projects a target from the breakout side:
float m = math.abs(w.upper.start.price - w.lower.get_price_at(w.upper.start.index))
float t = w.is_rising ? l_p - m : u_p + m
Interpretation:
m represents the wedge height near the start of the formation.
t is the target price, projected in the breakout direction.
Rising wedge: target below the lower boundary.
Falling wedge: target above the upper boundary.
A dashed target line and label are then placed forward in time for readability.
Trend Strength Matrix [JOAT]Trend Strength Matrix — Multi-Timeframe Confluence Analysis System
This indicator addresses a specific analytical challenge: how to efficiently compare multiple technical measurements across different timeframes while accounting for their varying scales and interpretations. Rather than managing separate indicator windows with different scales, this tool normalizes four distinct analytical approaches to a common -1 to +1 scale and presents them in a unified matrix format.
Why This Combination Adds Value
The core problem this indicator solves is analytical fragmentation. Traders often use multiple indicators but struggle with:
1. **Scale Inconsistency**: RSI ranges 0-100, MACD has no fixed range, ADX ranges 0-100 but measures strength not direction
2. **Timeframe Coordination**: Checking multiple timeframes requires switching between charts or cramming multiple indicators
3. **Cognitive Load**: Processing different indicator types simultaneously creates mental overhead
4. **Confluence Assessment**: Determining when multiple approaches agree requires manual comparison
This indicator specifically addresses these issues by creating a standardized analytical framework where different measurement approaches can be directly compared both within and across timeframes.
Originality and Technical Innovation
While the individual components (RSI, MACD, ADX, Moving Average) are standard, the originality lies in:
1. **Unified Normalization System**: Each component is mathematically transformed to a -1 to +1 scale using component-specific normalization that preserves the indicator's core characteristics
2. **Multi-Timeframe Weighting Algorithm**: Higher timeframes receive proportionally more weight (40% current, 25% next, 20% third, 15% fourth) based on the principle that longer timeframes provide more significant context
3. **Real-Time Confluence Scoring**: The composite calculation provides an instant assessment of how much the different analytical approaches agree
4. **Adaptive Visual Encoding**: The heatmap format allows immediate pattern recognition of agreement/disagreement across both indicators and timeframes
How the Components Work Together
Each component measures a different aspect of market behavior, and their combination provides a more complete analytical picture:
**Momentum Component (RSI-based)**: Measures the velocity of price changes by comparing average gains to losses
**Trend Component (MACD-based)**: Measures the relationship between fast and slow moving averages, indicating trend acceleration/deceleration
**Strength Component (ADX-based)**: Measures trend strength regardless of direction, then applies directional bias
**Position Component (MA-based)**: Measures price position relative to a reference average
The mathematical relationship between these components creates a comprehensive view:
- When all four agree (similar colors), it suggests multiple analytical approaches are aligned
- When they disagree (mixed colors), it highlights analytical uncertainty or transition periods
- The composite score quantifies the degree of agreement numerically
Detailed Component Analysis
**1. Momentum Oscillator Component**
This component transforms RSI into a centered oscillator by subtracting 50 and dividing by 50, creating a -1 to +1 range where 0 represents equilibrium between buying and selling pressure.
// Momentum calculation normalized to -1 to +1 scale
float rsi = ta.rsi(close, rsiLength)
float rsiScore = (rsi - 50) / 50
// Result: 0 at equilibrium, +1 at extreme overbought, -1 at extreme oversold
**2. Moving Average Convergence Component**
MACD is normalized by its own volatility (standard deviation) to create a bounded oscillator. This prevents the unbounded nature of MACD from dominating the composite calculation.
// MACD normalized by its historical volatility
= ta.macd(close, macdFast, macdSlow, macdSignal)
float macdStdev = ta.stdev(macdLine, 100)
float macdScore = macdStdev != 0 ? math.max(-1, math.min(1, macdLine / (macdStdev * 2))) : 0
**3. Directional Movement Component**
This combines ADX (strength) with directional movement (+DI vs -DI) to create a directional strength measurement. ADX alone shows strength but not direction; this component adds directional context.
// ADX-based directional strength
= calcADX(adxLength)
float adxStrength = math.min(adx / 50, 1) // Normalize ADX to 0-1
float adxDirection = plusDI > minusDI ? 1 : -1 // Direction bias
float adxScore = adxStrength * adxDirection // Combine strength and direction
**4. Price Position Component**
This measures price deviation from a moving average, weighted by the magnitude of deviation to distinguish between minor and significant displacements.
// Price position relative to moving average
float ma = ta.sma(close, maLength)
float maDirection = close > ma ? 1 : -1
float maDeviation = math.abs(close - ma) / ma * 10 // Percentage deviation scaled
float maScore = math.max(-1, math.min(1, maDirection * math.min(maDeviation, 1)))
Multi-Timeframe Integration Logic
The multi-timeframe system uses a weighted average that gives more influence to higher timeframes:
// Timeframe weighting system
float currentTF = composite * 0.40 // Current timeframe: 40%
float higherTF1 = composite_tf2 * 0.25 // Next higher: 25%
float higherTF2 = composite_tf3 * 0.20 // Third higher: 20%
float higherTF3 = composite_tf4 * 0.15 // Fourth higher: 15%
float multiTFComposite = currentTF + higherTF1 + higherTF2 + higherTF3
This weighting reflects the principle that higher timeframes provide more significant context for market direction, while lower timeframes provide timing precision.
What the Dashboard Shows
The heatmap displays a grid where:
Each row represents a timeframe
Each column shows one component's normalized reading
Colors indicate the value: green shades for positive, red shades for negative, gray for neutral
The rightmost column shows the composite average for that timeframe
Visual Elements
Moving Average Line — A simple moving average plotted on the price chart
Background Tint — Subtle coloring based on the composite score
Shift Labels — Markers when the composite crosses threshold values
Dashboard Table — The main heatmap display
Inputs
Calculation Parameters:
Momentum Length (default: 14)
MACD Fast/Slow/Signal (default: 12/26/9)
Directional Movement Length (default: 14)
Moving Average Length (default: 50)
Timeframe Settings:
Enable/disable multi-timeframe analysis
Select additional timeframes to display
How to Read the Display
Similar colors across a row indicate the components are showing similar readings
Mixed colors indicate the components are showing different readings
The composite percentage shows the average of all four components
Alerts
Composite crossed above/below threshold values
Strong readings (above 50% or below -50%)
Important Limitations and Realistic Expectations
This indicator displays current analytical conditions—it does not predict future price movements
Agreement between components indicates current analytical alignment, not future price direction
All four components are based on historical price data and inherently lag price action
Market conditions can change rapidly, making current readings irrelevant
Different parameter settings will produce different readings and interpretations
No combination of technical indicators can reliably predict future market behavior
Strong readings in one direction do not guarantee continued movement in that direction
The composite score reflects mathematical relationships, not market fundamentals or sentiment
This tool should be used as one input among many in a comprehensive analytical approach
Appropriate Use Cases
This indicator is designed for:
- Analytical organization and efficiency
- Multi-timeframe confluence assessment
- Pattern recognition in indicator relationships
- Educational study of how different analytical approaches relate
- Supplementary analysis alongside other methods
This indicator is NOT designed for:
- Standalone trading signals
- Guaranteed profit generation
- Market timing precision
- Replacement of fundamental analysis
- Automated trading systems
— Made with passion by officialjackofalltrades
zenba kit basic
interaction between 9 moving average and 108 moving average.
gradient filled zones.
200 moving average with color change.
vwap & standard deviations +/- 1.01
retrowave auroral style coloring
LJ Parsons Adjustable expanding MRT FibBased on premium/discount/fair-value levels the indicator will expand with the market by settable dates.
The levels are not fib based as such but are resonant levels within an multiplicative /12 log scale using the LJ Parsons Market resonance hypothesis.
Low-High Waves for NeowaveOpen your chart at daily and hide the symbol graphic. Now you can see the waves. It’s including limited data sorry for this but I’m not a programmer and TradingView have limitations.
Bullish/Bearish Movement SumThis indicator calculates and displays the cumulative sum of bullish and bearish price movements over a specified period.
Features:
- Green line: Cumulative sum of all bullish movements
- Red line: Cumulative sum of all bearish movements (absolute value)
- Blue area: Net difference (bullish - bearish)
- Information table showing current values and bull/bear ratio
Settings:
- Calculation Period: Choose rolling window size (default: 100 bars) or 0 for cumulative from start
- Calculation Mode: Choose between "Points" (absolute price changes) or "Percentage" (% changes)
Use Cases:
- Identify market directional strength
- Compare bullish vs bearish pressure
- Spot divergences between price and directional momentum
- Ratio > 1 indicates more bullish than bearish movement
Developed with assistance from Claude (Anthropic)
CS Trendline ProTitle: CS Trendline Pro
Description:
CS Trendline Pro is a comprehensive scalping and day-trading system designed to filter out noise and identify high-probability breakout setups. It combines the structural precision of Fractal Trendlines with a robust Dual-EMA Filter, visualized through an intuitive "Traffic Light" color system.
This tool is specifically engineered for traders who want to trade Trendline Breakouts but need a safety mechanism to avoid false signals (fakeouts) and counter-trend traps.
🚦 How the "Traffic Light" Logic Works
The core feature of this script is the dynamic coloring of the candles, which acts as a visual filter for your entries:
🟢 GREEN Zone (Safe Buy):
Condition: A Bullish Trendline Breakout has occurred AND the price is holding ABOVE the EMA 30 (Yellow Line).
Meaning: Momentum is bullish, and you are in a safe zone to look for Long entries.
🔴 RED Zone (Safe Sell):
Condition: A Bearish Trendline Breakout has occurred AND the price is holding BELOW the EMA 30 (Yellow Line).
Meaning: Momentum is bearish, and you are in a safe zone to look for Short entries.
⚪ GRAY Zone (No Trade / Wait):
Condition: A breakout occurred, but the price is on the "wrong side" of the EMA 30.
Meaning: Indecision. The market structure is conflicting with the immediate momentum. It is recommended to stay out until the color changes.
🛠️ Key Features
** automated Trendlines:** Automatically draws Support and Resistance dynamic trendlines based on pivot points (LuxAlgo engine).
Dual EMA Filter:
EMA 30 (Yellow): Acts as the immediate "Safe Zone" filter.
EMA 200 (White): Displays the macro trend. (Pro Tip: Only take Green signals if price is above the White line).
CS-BUY / CS-SELL Labels: Clear text markers appear exactly when a valid breakout occurs.
Customizable: Adjustable sensitivity (Length), EMA periods, and Slope calculation methods (ATR, Stdev, Linreg).
📉 How to Trade with CS Trendline Pro
For Scalping (5m / 15m):
Identify the Main Trend: Look at the White EMA (200).
If Price > EMA 200 → Focus on BUY signals.
If Price < EMA 200 → Focus on SELL signals.
Wait for the Signal:
Wait for the candle to turn Teal (Green) or Red.
Ensure the candle closes with the new color.
Risk Management:
Place Stop Loss below the recent swing low (for buys) or above the swing high (for sells).
Target a 1.5 Risk/Reward ratio or trail your stop using the EMA 30.
⚠️ Important Note on Backpainting
This indicator uses pivot points to draw trendlines. By nature, a pivot point can only be confirmed after a few bars have passed (Lag).
Backpaint Setting (Default ON): Keeps your historical chart clean by connecting the exact pivot points in the past.
Real-Time Behavior: In live trading, the trendline and signal will appear once the pivot is confirmed (based on your 'Length' setting). This is normal behavior for any trendline script.
Settings Recommended:
5-Minute Chart: Length 10 or 14.
15-Minute Chart: Length 14.
Enjoy trading with precision! ~ CS Trading
JK Scalp - Nishith RajwarJK Scalp Nishith Rajwar
Multi-Stochastic Rotation & Momentum Scalping Framework
JK Scalp is a rule-based momentum and rotation oscillator designed for short-term scalping and intraday execution.
It focuses on how momentum rotates across multiple stochastic speeds, instead of relying on a single oscillator or lagging averages.
This is an execution aid, not a predictive indicator.
🧠 Concept & Originality
Unlike standard stochastic tools, JK Scalp uses four synchronized stochastic layers:
• Fast (9,3) → execution timing
• Medium (14,3) → structure confirmation
• Slow (44,3) → swing context
• Trend (60,10,10) → dominant momentum regime
The core idea is quad-rotation:
High-probability trades occur when all momentum layers rotate together after reaching an extreme.
This script combines:
• Momentum rotation
• Divergence logic
• Flag continuation logic
• Trend-state filtering
into a single cohesive framework, not a simple indicator mashup.
📊 How to Use (Step-by-Step)
1️⃣ Best Timeframes
• Scalping: 1m – 3m
• Intraday: 5m – 15m
• Avoid higher timeframes (not designed for swing holding)
Works best on:
• Index options
• Index futures
• Highly liquid stocks
• Crypto majors
2️⃣ Understanding the Signals
🔁 Quad Rotation (Core Signal)
A valid rotation requires:
• Fast, Medium, Slow, and Trend stochastic moving in the same direction
• Momentum exiting Overbought / Oversold zones
• Trend stochastic supporting the move
This filters out random oscillator noise.
3️⃣ Entry Conditions
🟢 LONG Setup
• Bullish quad rotation
• Either:
– Bullish divergence OR
– Bullish flag pullback
• Fast stochastic turning up
🔴 SHORT Setup
• Bearish quad rotation
• Either:
– Bearish divergence OR
– Bearish flag pullback
• Fast stochastic turning down
⚠️ Signals are confirmation-based, not anticipatory.
4️⃣ SUPER LONG / SUPER SHORT
These appear only when:
• Quad rotation
• Divergence confirmation
They represent high-confidence momentum inflection zones, not guaranteed reversals.
5️⃣ Stop-Loss Visualization
Optional SL zones are plotted using:
• Recent swing high / low
• ATR-based buffer (configurable)
This helps traders visualize risk, not automate exits.
🎨 Visual System (Why It Looks Different)
• Multi-layer glow effects → momentum strength
• Dynamic cloud → fast vs trend dominance
• Color-shifting fast line → acceleration vs decay
• Chart overlays → execution clarity without clutter
Everything is designed for speed and readability during live trading.
⭐ Unique Selling Points (USP)
✅ Multi-speed stochastic rotation (not single-line signals)
✅ Context-first, not signal spam
✅ Built-in divergence + continuation logic
✅ Non-repainting logic
✅ Designed for scalpers, not hindsight analysis
✅ Works across indices, options, crypto, and futures
⚠️ Important Notes
• Not a standalone trading system
• Best combined with:
– Market structure
– Key levels
– Session timing
• Avoid low-liquidity or news-spike candles
This indicator guides execution, it does not replace discretion.
👤 Who This Is For
• Scalpers & intraday traders
• Options traders needing precise timing
• Traders who understand momentum & structure
• Users who want fewer but higher-quality signals
🏁 Summary
JK Scalp helps you trade momentum rotation, not overbought/oversold myths.
Wait for alignment. Execute with discipline.
Harmonic Patterns (Experimental) [Kodexius]Harmonic Patterns (Experimental) is a multi pattern harmonic geometry scanner that automatically detects, validates, and draws classic harmonic structures directly on your chart. The script continuously builds a pivot map (swing highs and swing lows), then evaluates the most recent pivot sequence against a library of harmonic ratio templates such as Gartley, Bat, Deep Bat, Butterfly, Crab, Deep Crab, Cypher, Shark, Alt Shark, 5-0, AB=CD, and 3 Drives.
Unlike simple “pattern exists / pattern doesn’t exist” indicators, this version scores candidates by accuracy . Each pattern includes “ideal” ratio targets, and the script computes a total error score by measuring how far the observed ratios deviate from the ideal. When multiple patterns could match the same pivot structure, the script selects the best match (lowest total error) and displays that one. This reduces clutter and makes the output more practical in real market conditions where many ratio ranges overlap.
The end result is a clean, information rich visualization of harmonic opportunities that is:
-Pivot based and swing aware
-Ratio validated with configurable tolerance
-Direction filtered (bullish, bearish, or both)
-Ranked by accuracy to prefer higher quality matches
Note: This is an experimental pattern engine intended for research, confluence and chart study. Harmonic patterns are probabilistic and can fail often. Always combine with your own risk management and confirmation tools.
🔹 Features
🔸Pivot Detection
The script uses pivot functions to detect structural turning points:
-Pivot Left Bars controls how many bars must exist on the left of the pivot
-Pivot Right Bars controls confirmation delay on the right (smaller value reacts faster)
Additionally, a Min Swing Distance (%) filter can ignore tiny swings to reduce noise. Pivots are stored separately for highs and lows and capped by Max Pivots to Store to keep the script efficient.
🔸Pattern Library (XABCD and Beyond)
Supported structures include:
-Gartley, Bat, Deep Bat, Butterfly, Crab, Deep Crab
-Cypher (uses XC extension and CD retracement logic)
-Shark and Alt Shark (0-X-A-B-C mapping)
-5-0 (AB and BC extensions with CD retracement)
-AB=CD (symmetry and proportionality checks)
-3 Drives (6 point structure, drive and retracement ratios)
Each pattern is defined by ratio ranges and also “ideal” ratio targets used for scoring.
🔸 Pattern Fibonacci Rules (Detailed Ratio Definitions)
This script validates each harmonic template by measuring a small set of Fibonacci relationships between the legs of the pattern. All measurements are computed using absolute price distance (so the ratios are direction independent), and then a directional sanity check ensures the geometry is positioned correctly for bullish or bearish cases.
How ratios are measured
Most patterns in this script use the standard X A B C D harmonic structure. Four ratios are evaluated:
1) XB retracement of XA
This measures how much price retraces from A back toward X when forming point B .
xbRatio = |B - A| / |A - X|
2) AC retracement of AB
This measures how much point C retraces the AB leg.
acRatio = |C - B| / |B - A|
3) BD extension of BC
This measures the “drive” from C into D relative to the BC leg.
bdRatio = |D - C| / |C - B|
4) XD retracement of XA
This is the most important “completion” ratio in many patterns. It measures where D lands relative to the original XA swing.
xdRatio = |D - A| / |A - X|
Important: the script applies a user defined Fibonacci Tolerance to each accepted range, meaning the pattern can still pass even if ratios are slightly off from the textbook values.
🔸 XABCD Pattern Ratio Templates
Below are the exact ratio rules used by the templates in this script.
Gartley
-XB must be ~0.618 of XA
-AC must be between 0.382 and 0.886 of AB
-BD must be between 1.272 and 1.618 extension of BC
-XD must be ~0.786 of XA
In practice, Gartley is a “non extension” structure, meaning D usually remains inside the X boundary .
Bat
-XB between 0.382 and 0.50 of XA
-AC between 0.382 and 0.886 of AB
-BD between 1.618 and 2.618 of BC
-XD ~0.886 of XA
Bat patterns typically complete deeper than Gartley and often create a sharper reaction at D.
Deep Bat
-XB ~0.886 of XA
-AC between 0.382 and 0.886 of AB
-BD between 1.618 and 2.618 of BC
-XD ~0.886 of XA
Deep Bat uses the same completion zone as Bat, but requires a much deeper B point.
Butterfly
-XB ~0.786 of XA
-AC between 0.382 and 0.886 of AB
-BD between 1.618 and 2.618 of BC
-XD between 1.272 and 1.618 of XA
Butterfly is an extension pattern . That means D is expected to break beyond X (in the completion direction).
Crab
-XB between 0.382 and 0.618 of XA
-AC between 0.382 and 0.886 of AB
-BD between 2.24 and 3.618 of BC
-XD ~1.618 of XA
Crab is also an extension pattern . It often produces a very deep D completion and a strong reaction zone.
Deep Crab
-XB ~0.886 of XA
-AC between 0.382 and 0.886 of AB
-BD between 2.0 and 3.618 of BC
-XD ~1.618 of XA
Deep Crab combines a deep B point with a strong XA extension completion.
🔸 Cypher Fibonacci Rules (XC Based)
Cypher is not validated with the same four ratios as XABCD patterns. Instead it uses an XC based completion model:
1) B as a retracement of XA
xb = |B - A| / |A - X| // AB/XA
Must be between 0.382 and 0.618 .
2) C as an extension from X relative to XA
xc = |C - X| / |A - X| // XC/XA
Must be between 1.272 and 1.414 .
3) D as a retracement of XC
xd = |D - C| / |C - X| // CD/XC
Must be ~ 0.786 .
This makes Cypher structurally different: the “completion” is defined as a retracement of the entire XC leg, not XA.
🔸 Shark and Alt Shark Fibonacci Rules (0-X-A-B-C Mapping)
Shark patterns are commonly defined as 0 X A B C . In this script the pivots are mapped like this:
0 = pX, X = pA, A = pB, B = pC, C = pD
So the final pivot (stored as pD) is labeled as C on the chart.
Three ratios are validated:
1) AB relative to XA
ab_xa = |B - A| / |A - X|
Must be between 1.13 and 1.618 .
2) BC relative to AB
bc_ab = |C - B| / |B - A|
Must be between 1.618 and 2.24 .
3) OC relative to OX
oc_ox = |C - 0| / |X - 0|
For Shark it must be between 0.886 and 1.13 .
For Alt Shark it must be between 1.13 and 1.618 (a deeper / more extended completion).
🔸 5-0 Fibonacci Rules
5-0 is validated as a sequence of extensions and then a fixed retracement:
1) AB extension of XA
ab_xa = |B - A| / |A - X|
Must be between 1.13 and 1.618 .
2) BC extension of AB
bc_ab = |C - B| / |B - A|
Must be between 1.618 and 2.24 .
3) CD retracement of BC
cd_bc = |D - C| / |C - B|
Must be approximately 0.50 .
Note that for 5-0 the script does not rely on an XA completion ratio like 0.786 or 1.618. The defining completion is the 0.5 retracement of BC.
🔸 AB=CD Fibonacci Rules
AB=CD is a symmetry pattern and is treated differently from the harmonic templates:
1) AB and CD length symmetry
The script checks if CD is approximately equal to AB within tolerance.
2) BC proportion
BC/AB is expected to fall in a common Fibonacci retracement zone:
-approximately 0.618 to 0.786 (with a looser tolerance in code)
3) CD/BC expansion
CD/BC is expected to be an expansion ratio:
-approximately 1.272 to 1.618 (also with a looser tolerance)
This allows the script to capture both classic equal leg AB=CD and common “expanded” variations.
🔸 3 Drives Fibonacci Rules (6 Point Structure)
3 Drives is a 6 point structure and is validated using retracement ratios and extension ratios:
Retracement rules
Retracement 1 must be between 0.618 and 0.786 of Drive 1
Retracement 2 must be between 0.618 and 0.786 of Drive 2
Extension rules
Drive 2 must be between 1.272 and 1.618 of Retracement 1
Drive 3 must be between 1.272 and 1.618 of Retracement 2
This pattern is meant to capture rhythm and proportional repetition rather than a single XA completion ratio.
🔸 Why the script can show “ratio labels” on legs
If you enable Show Fibonacci Values on Legs , the script prints the measured ratios near the midpoint of each leg (or diagonal, depending on pattern type). This makes it easy to visually confirm:
-Which ratios caused the pattern to pass
-How close the structure is to ideal harmonic values
-Why one template was preferred over another via the accuracy score
🔸 Fibonacci Tolerance Control
All ratio checks use a single tolerance input (percentage). This tolerance expands or contracts the acceptable ratio ranges, letting you decide whether you want:
-Tight, high precision matches (lower tolerance)
-Broader, more frequent matches (higher tolerance)
🔸 Direction Filter (Bullish Only / Bearish Only / Both)
You can restrict scanning to bullish patterns, bearish patterns, or allow both. This is useful if you are aligning with higher timeframe bias or only trading one side of the market.
🔸 Best Match Selection (Anti Clutter Logic)
When a new pivot confirms, the script evaluates all enabled patterns against the latest pivot sequence and keeps the one with the smallest total error score. This is especially helpful because many harmonic templates overlap in real time. Instead of drawing multiple conflicting labels, you get one “most accurate” candidate.
🔸 Clean Visual Rendering and Optional Details
The drawing system can display:
-Main structure lines (X-A-B-C-D or special mappings)
-Dashed diagonals for geometric context (XB, AC, BD, XD)
-Pattern fill to visually highlight the structure zone
-Point labels (X,A,B,C,D or 0..5 for 3 Drives, 0-X-A-B-C for Shark)
-Leg Fibonacci labels placed around midpoints for fast ratio reading
All colors (bullish and bearish line and fill) are configurable.
🔸 Pattern Spacing and Display Limits
To keep charts readable, the script includes:
-Max Patterns to Display to limit on-chart drawings
-Min Bars Between Patterns to avoid repeated signals too close together in the same direction
Older patterns are automatically deleted once the display limit is exceeded.
🔸 Alerts
When enabled, alerts trigger on new confirmed detections:
-Bullish Pattern Detected
-Bearish Pattern Detected
Alerts fire once per bar when a new pattern is confirmed by a fresh pivot.
🔹 Calculations
This section summarizes the core logic used under the hood.
1) Pivot Detection and Swing Filtering
The script confirms pivots using right side confirmation, then optionally filters them by minimum swing distance relative to the last opposite pivot.
// Pivot detection
float pHigh = ta.pivothigh(high, pivotLeftBars, pivotRightBars)
float pLow = ta.pivotlow(low, pivotLeftBars, pivotRightBars)
// Example swing distance filter (conceptual)
abs(newPivot - lastOppPivot) / lastOppPivot >= minSwingPercent
Pivots are stored in capped arrays (high pivots and low pivots), ensuring performance and stable memory usage.
2) Ratio Measurements (Retracement and Extension)
The engine measures harmonic ratios using two core helpers:
Retracement measures how much the third point retraces the previous leg.
Extension measures how much the next leg extends relative to the previous leg.
// Retracement: (p3 - p2) compared to (p2 - p1)
calcRetracement(p1, p2, p3) =>
float leg = math.abs(p2.price - p1.price)
float retr = math.abs(p3.price - p2.price)
leg != 0 ? retr / leg : na
// Extension: (p4 - p3) compared to (p3 - p2)
calcExtension(p2, p3, p4) =>
float leg = math.abs(p3.price - p2.price)
float ext = math.abs(p4.price - p3.price)
leg != 0 ? ext / leg : na
For a standard XABCD pattern the script evaluates:
-XB retracement of XA
-AC retracement of AB
-BD extension of BC
-XD retracement of XA
3) Tolerance Based Range Check
Ratio validation uses a flexible range check that expands min and max by the tolerance percent:
isInRange(value, minVal, maxVal, tolerance) =>
float tolMin = minVal * (1.0 - tolerance)
float tolMax = maxVal * (1.0 + tolerance)
value >= tolMin and value <= tolMax
This means even “fixed” ratios (like 0.786) still allow a user controlled deviation.
4) Positional Sanity Check for D (Beyond X or Not)
Some harmonic patterns require D to remain within X (non extension patterns), while others require D to break beyond X (extension patterns). The script enforces that using a boolean flag in each template.
Conceptually:
-If the pattern is an extension type, D should cross beyond X in the expected direction
-If the pattern is not extension type, D should stay on the correct side of X
This prevents visually incorrect “ratio matches” that violate the intended geometry.
5) Template Definitions (Ranges + Ideal Targets)
Every pattern includes ratio ranges plus ideal values. The ideal values are used only for scoring quality, not for pass/fail. Example concept:
-Ranges determine validity
-Ideal targets determine ranking
6) Accuracy Scoring (Total Error)
When a candidate passes all validity checks, the script computes an accuracy score by summing absolute deviations from ideal ratios:
calcError(value, ideal) =>
math.abs(value - ideal)
// Total error is the sum of the four leg errors (as available for the pattern)
totalError =
calcError(xbRatio, xbIdeal) +
calcError(acRatio, acIdeal) +
calcError(bdRatio, bdIdeal) +
calcError(xdRatio, xdIdeal)
Lower score means closer to the “textbook” harmonic proportions.
7) Best Match Resolution (Choosing One Winner)
When multiple enabled patterns match the same pivot structure, the script selects the one with the lowest totalError:
updateBest(currentBest, newCandidate) =>
result = currentBest
if not na(newCandidate)
if na(currentBest) or newCandidate.totalError < currentBest.totalError
result := newCandidate
result
This is a major practical feature because it reduces clutter and highlights the highest quality interpretation.
8) Bullish and Bearish Scanning Logic
The scanner runs when pivots confirm:
-Bullish patterns are evaluated on a newly confirmed pivot low (potential D)
-Bearish patterns are evaluated on a newly confirmed pivot high (potential D)
From that D pivot, the script searches backward through stored pivots to build a valid pivot sequence (X,A,B,C,D). If 3 Drives is enabled, it also attempts to find the extra preceding point needed for the 6 point structure.
9) Rendering: Lines, Fill, Labels, and Leg Fib Text
After detection the script draws:
-Primary legs with thicker lines
-Geometric diagonals with dashed lines (for XABCD types)
-Optional fill between selected legs to emphasize the structure area
-A summary label showing direction, pattern name, and ratios
-Optional point labels and leg ratio labels placed near midpoints
To avoid overlapping with candles, the script offsets labels using ATR:
float yOff = math.max(ta.atr(14) * 0.15, syminfo.mintick * 10)
10) Pattern Lifecycle and Cleanup
To respect chart limits and keep visuals clean, the script deletes old drawings once the maximum visible patterns threshold is exceeded. This includes lines, fills, and labels.






















