TL Elliott Wave Pro - Rule Checked 12345 ABC Count + Fibs + FVGTL ELLIOTT WAVE PRO — the complete Elliott Wave rule set in one indicator: the count, the three golden rules, the three guidelines, all four fibonacci tools and the fair value gap that turns a level into a trade.
Elliott Wave is usually taught as a picture and traded as a feeling. This indicator turns it into something you can actually check: it labels the impulse, it tells you which of the three golden rules currently hold, it measures every wave against the fibonacci relationships the theory is built on, and the moment a rule breaks it says so instead of quietly redrawing the count into something that still looks right.
Everything below comes from the classic rule set. Nothing is invented, nothing is hidden.
━━━ ① THE WAVE COUNT ━━━
A ZigZag builds the alternating pivot sequence, and the engine reads the most recent structure the rules allow:
· ①②③④⑤ — the five wave impulse: three impulses with the trend, two corrections against it
· ⒶⒷⒸ — the correction that follows: an impulse down, a correction up, an impulse down
Impulse legs are drawn SOLID, corrective legs DASHED. That is not decoration — it is the definition the whole model rests on: impulsive waves are larger and move with the trend, corrective waves are smaller and move against it. The wave that has not happened yet is projected as a dotted gold line straight to its first fibonacci target.
Finished counts are frozen in faded gold exactly where they were found, so you can scroll back through the chart and study how the reading developed instead of only seeing today's answer.
━━━ ② THE THREE GOLDEN RULES — a hard validity gate ━━━
❶ Wave 3 must be the longest impulse wave, and it can never be the shortest
❷ Wave 2 must not surpass the start of wave 1
❸ Wave 4 cannot overlap with wave 1's price territory
Each rule gets a live ✓ / ✗ in the panel. If one of them breaks the count is not "weaker" — it is invalid, and the indicator behaves accordingly: the setup is cancelled, a COUNT INVALID tag goes on the chart with the reason, an alert fires, and the next confirmed pivot starts a fresh count. Rule 1 has a strict and a relaxed reading, switchable in the settings.
━━━ ③ THE THREE GUIDELINES — a soft quality score ━━━
❶ When wave 3 extends as the longest impulse wave, wave 5 typically approximates the length of wave 1
❷ Wave 2 and wave 4 alternate between a flat and a sharp correction — the indicator classifies each correction by depth and duration and shows you the pair, e.g. S / F
❸ After a five wave impulse advance, ABC corrections commonly end near the prior extreme of wave 4 — that level is projected as the C target
Guidelines are informational by default, because that is what they are. You can require one, two or all three before a signal is allowed to fire.
━━━ ④ THE FOUR FIBONACCI TOOLS, WITH THEIR CORRECT ANCHORS ━━━
Wave 2 retracement — 0 % at the end of wave 1, 100 % at its start
· typical 50.0 % and 61.8 %, plus the 60 % average line
Wave 3 extension of wave 1 — projected from the wave 2 extreme
· typical 161.8 % and 261.8 %
Wave 4 retracement — 0 % at the end of wave 3, 100 % at its start
· typical 23.6 %, 38.2 % and 50.0 %, plus the 30–40 % average band
Wave 5 — two separate targets
· 100 % of wave 1 projected from the wave 4 extreme
· 161.8 % of wave 4, anchored 0 % at the wave 4 extreme and 100 % at the wave 3 extreme
The level the market actually turned at is highlighted in gold, and the panel prints the measured value next to the expected one, so you can see at a glance whether this count is textbook or stretched.
━━━ ⑤ +FVG — the confluence that makes it a trade ━━━
A fibonacci zone on its own is a level. A fair value gap sitting inside that zone is a reason. The indicator scans for unfilled three-candle gaps inside the wave 2 and the wave 4 retracement zone, draws them as a +FVG box, and marks the signal accordingly. You can leave it as a quality tag or make it mandatory.
━━━ ⑥ THE TRADES — always in the direction of the impulse ━━━
Trading in the direction of the impulse waves is what pays, so that is all this indicator signals:
WAVE 3 ENTRY — buy the wave 2 correction in an uptrend, sell it in a downtrend
· stop behind the wave 2 pivot, or at the rule 2 invalidation
· TP1 161.8 % of wave 1, TP2 261.8 % of wave 1
WAVE 5 ENTRY — buy the wave 4 correction, sell it in a downtrend
· stop behind the wave 4 pivot, or at the rule 3 invalidation
· TP1 wave 5 = wave 1, TP2 161.8 % of wave 4
Three trigger models per trade: momentum close out of the zone, zone tap for limit-style entries, or a break of the last minor swing for the latest and safest fill. Minimum reward/risk filter, ATR stop buffer, break even at a chosen R. The counter-trend ABC entry exists but is OFF by default, on purpose.
━━━ WHY EVERY SIGNAL EXPLAINS ITSELF ━━━
Hover any signal pill and you get the full reasoning: the exact count with its prices, which golden rules hold, how deep the correction actually went against the typical values, which guidelines are satisfied, whether a fair value gap was inside the zone, plus entry, stop, both targets, risk in pips, reward in pips and the R multiple.
Every wave label carries its own tooltip — what that wave is, how far it travelled, which rule it has to respect and whether it does. Every fibonacci line explains its anchoring. Setups that were found and then rejected get a NO TRADE tag with the reason, so you learn the filter instead of wondering why nothing fired. There is a HOW TO READ THIS card and an honest BEFORE YOU TRADE THIS card on the chart.
━━━ COCKPIT PANEL ━━━
Live count stage, symbol, chart timeframe, ZigZag settings and the size of wave 1 · the three golden rules with ✓ / ✗ / pending · the three guidelines with the flat-sharp alternation pair · every wave measured against its expected fibonacci value · a five step setup checklist that fills in as the trade builds · the open position with stop and target · a large status line · a rough win / loss / break-even tracker and the last signal timestamp.
━━━ ALERTS AND AUTOMATION ━━━
Every event fires a clean JSON payload ready for a webhook: entry, stop, both targets, the direction of the count, the measured wave 2 retracement, the wave 3 extension, the wave 4 retracement, which rules held, whether an FVG was present, the R multiple, symbol, exchange, timeframe, volume and an optional account field. Events: ENTRY, TP1, SL, BE, INVALID, IMPULSE_COMPLETE. Six plain-language alertconditions are included as well for anybody who just wants a notification.
━━━ SETTINGS WORTH KNOWING ━━━
· ZigZag pivot strength and a minimum swing size in ATR — this pair decides the degree of the count and therefore everything else
· Every fibonacci percentage is editable
· Rule 1 strict or relaxed, rules 2 and 3 on or off, kill-on-invalidation on or off
· FVG optional or mandatory, minimum gap size in ATR
· Full TL chart theme: navy background, mint / red candles, corrective legs dimmed — or switch it off and keep your own
· Panel, animated 3D logo and the right-hand extension of the lines are all configurable
Tip: if the candles cover the panel, right click the indicator → Visual order → Bring to front. That is a PulseWire layer setting, not something Pine can control.
━━━ HONEST NOTES ━━━
Elliott Wave is not a standalone technique, and its subjective nature has put a lot of traders off it. Two competent analysts label the same chart differently. This indicator picks ONE reading — the most recent one the three golden rules allow — and tells you the moment that reading dies. It does not pretend the ambiguity is gone.
The count re-reads itself on every new pivot. A label that moves is not a bug; it is the engine refusing to defend a count the market has stopped supporting.
The ZigZag pivot strength decides everything. Too small and you count noise, too large and you only see the count after the move is over. Change it and watch the whole picture change — that is the honest lesson of Elliott Wave, and no indicator can take it away from you.
The percentages are averages, not laws. Corrections come in slightly smaller and slightly larger than the textbook numbers all the time.
The win / loss counter in the panel is a rough on-chart tracker. It assumes a fill at the marked price and resolves target before stop inside the same bar. It is not a backtest and it is not a performance claim.
This indicator is a study tool. It is not financial advice.
━━━ CREDIT ━━━
The rule set is classic Elliott Wave Theory as it is taught publicly. The wave engine, the rule and guideline checks, the fibonacci anchoring, the FVG confluence, the panel and the design are original work.
Open source — read it, change it, learn from it.
Indicator

Trader Forge Co-Pilot V6.0```pinescript
//══════════════════════════════════════════════════════════════
// T R A D E R F O R G E
//══════════════════════════════════════════════════════════════
//
// MULTI-TIMEFRAME PRECISION SYSTEM — V6
//
// STRUCTURE • TIMEFRAME • PRECISION
//
// Pressure creates strength. Discipline creates edge.
//
//══════════════════════════════════════════════════════════════
```
## WHAT IS TRADER FORGE V6?
Trader Forge V6 is a multi-timeframe decision-support system designed to help traders find structured, higher-quality trade setups.
The system does not rely on one indicator.
It combines market location, higher-timeframe direction, momentum, candle behavior, liquidity, market structure, and setup scoring.
```pinescript
SYSTEM_PROCESS =
LOCATION
→ HIGHER_TIMEFRAME_ALIGNMENT
→ SETUP_DETECTION
→ BREAK_OF_STRUCTURE
→ A_PLUS_CONFIRMATION
```
---
## CORE SYSTEM COMPONENTS
```pinescript
DONCHIAN_CHANNEL = "Identifies recent price extremes"
HIGHER_TIMEFRAMES = "1H, 4H and Daily directional bias"
MARKET_STRUCTURE = "Fast and major swing structure"
BREAK_OF_STRUCTURE = "Confirms directional control"
COMPRESSION = "Identifies stored market energy"
EXHAUSTION = "Identifies rejection at key levels"
LIQUIDITY_SWEEPS = "Tracks failed breaks of highs and lows"
STOCH_RSI = "Confirms momentum direction"
VWAP = "Measures session price positioning"
RELATIVE_VOLUME = "Measures market participation"
SETUP_SCORE = "Grades setup quality from 0 to 100"
ATR_TRADE_PLAN = "Calculates risk-based trade levels"
```
---
## HOW THE SYSTEM WORKS
### 1. LOCATION
Price must first reach a meaningful area.
Examples include:
- Upper Donchian zone
- Lower Donchian zone
- Support or resistance
- Previous swing high or low
- Higher-timeframe price extreme
- Liquidity level
```pinescript
validLocation =
lowerDonchianZone or
upperDonchianZone or
keySupport or
keyResistance
```
The system is designed to avoid low-quality entries in the middle of a range.
```pinescript
if priceInMiddle
action := "WAIT"
```
---
### 2. MULTI-TIMEFRAME ALIGNMENT
The system checks three higher timeframes:
```pinescript
timeframeOne = "1 Hour"
timeframeTwo = "4 Hour"
timeframeThree = "Daily"
```
By default, at least two of the three timeframes should support the trade direction.
```pinescript
bullishAlignment = bullishTimeframes >= 2
bearishAlignment = bearishTimeframes >= 2
```
The higher timeframes provide direction.
The lower timeframe provides execution.
---
### 3. SETUP DETECTION
The system looks for evidence that price may be preparing to move.
```pinescript
bullishSetup =
lowerZone and
bullishMomentum and
(bullishExhaustion or compression or bullishLiquiditySweep)
bearishSetup =
upperZone and
bearishMomentum and
(bearishExhaustion or compression or bearishLiquiditySweep)
```
A setup is not automatically an entry.
It tells the trader to begin watching for confirmation.
---
### 4. STRUCTURE CONFIRMATION
The system waits for a Break of Structure before confirming the setup.
```pinescript
bullishBOS = close > previousSwingHigh
bearishBOS = close < previousSwingLow
```
A bullish Break of Structure suggests buyers are gaining control.
A bearish Break of Structure suggests sellers are gaining control.
```pinescript
if bullishSetup and bullishBOS
confirmation := "BULLISH"
if bearishSetup and bearishBOS
confirmation := "BEARISH"
```
---
### 5. A+ SIGNAL
An A+ signal appears only when the required conditions and minimum setup score are satisfied.
```pinescript
minimumScore = 70
aPlusBuy =
bullishSetup and
bullishBOS and
bullishAlignment and
buyScore >= minimumScore
aPlusSell =
bearishSetup and
bearishBOS and
bearishAlignment and
sellScore >= minimumScore
```
The default qualifying score is:
```pinescript
A_PLUS_SCORE = 70
MAX_SCORE = 100
```
A score of 70 does not mean the trade has a guaranteed 70% win rate.
It means the setup earned 70 of the 100 available system points.
---
## SCORE BREAKDOWN
```pinescript
structureConfirmation = 25
donchianLocation = 20
compressionExhaustion = 15
stochRsiMomentum = 10
vwapPosition = 10
oneHourBias = 5
fourHourBias = 5
dailyBias = 10
maximumScore = 100
```
The strongest setups normally combine:
- Good location
- Higher-timeframe agreement
- Momentum confirmation
- Compression or exhaustion
- Liquidity context
- Break of Structure
- Acceptable reward-to-risk
---
## BEGINNER WORKFLOW
```pinescript
stepOne = "Check the Daily chart for major location"
stepTwo = "Check the 4H chart for trend and market condition"
stepThree = "Check the 1H chart for bias and structure"
stepFour = "Use the 5m or 15m chart for execution"
stepFive = "Wait for price to reach a key location"
stepSix = "Wait for a valid setup to form"
stepSeven = "Wait for Break of Structure confirmation"
stepEight = "Review the setup score"
stepNine = "Plan entry, stop and targets"
stepTen = "Enter only when risk is acceptable"
```
### Recommended chart process
```pinescript
DAILY → LOCATION
FOUR_H → CONTEXT
ONE_H → DIRECTION
FIVE_M → EXECUTION
```
---
## BULLISH SETUP
```pinescript
bullishTrade =
priceNearLowerZone and
bullishHigherTimeframes and
bullishSetupCondition and
bullishBreakOfStructure and
score >= minimumScore
```
A bullish setup may include:
- Price near the lower Donchian zone
- A sweep below a previous low
- A bullish exhaustion candle
- Stochastic RSI turning upward
- Price recovering above VWAP
- A bullish Break of Structure
The system may then display:
```pinescript
signal = "A+ BUY"
```
---
## BEARISH SETUP
```pinescript
bearishTrade =
priceNearUpperZone and
bearishHigherTimeframes and
bearishSetupCondition and
bearishBreakOfStructure and
score >= minimumScore
```
A bearish setup may include:
- Price near the upper Donchian zone
- A sweep above a previous high
- A bearish exhaustion candle
- Stochastic RSI turning downward
- Price falling below VWAP
- A bearish Break of Structure
The system may then display:
```pinescript
signal = "A+ SELL"
```
---
## TRADE PLANNING
The system includes an ATR-based planning tool.
```pinescript
stopDistance = atr * 1.5
targetOne = 1.0R
targetTwo = 2.0R
targetThree = 3.0R
```
The ATR levels are planning references.
The trader must still verify:
- Market structure
- Swing highs and lows
- Support and resistance
- Position size
- Maximum account risk
- Daily loss limits
```pinescript
preferredRiskReward = "2:1 or greater"
```
---
## ALERTS INCLUDED
```pinescript
alertcondition(buySetupPending, "Buy Setup Pending")
alertcondition(sellSetupPending, "Sell Setup Pending")
alertcondition(aPlusBuy, "A+ Buy")
alertcondition(aPlusSell, "A+ Sell")
alertcondition(bullishBOS, "Bullish BOS")
alertcondition(bearishBOS, "Bearish BOS")
alertcondition(bullishSweep, "Bullish Liquidity Sweep")
alertcondition(bearishSweep, "Bearish Liquidity Sweep")
```
A pending alert means a setup may be developing.
It does not mean the trader should enter immediately.
---
## IMPORTANT TRADING RULES
```pinescript
RULE_01 = "No location, no trade"
RULE_02 = "Higher timeframes provide direction"
RULE_03 = "Compression does not predict direction"
RULE_04 = "Momentum confirms; it does not lead"
RULE_05 = "Structure confirms the trade"
RULE_06 = "Never chase an extended signal candle"
RULE_07 = "Define risk before entering"
RULE_08 = "Protect capital before seeking profit"
RULE_09 = "A missed trade is better than a forced trade"
RULE_10 = "Consistency beats intensity"
```
---
## WHEN TO WAIT
```pinescript
waitForTrade =
priceInMiddle or
conflictingTimeframes or
missingStructureConfirmation or
score < minimumScore or
poorRiskReward or
oversizedSignalCandle
```
The system is built to encourage patience.
Not every market movement is a valid trade.
---
## DISCLAIMER
Trader Forge V6 is an analytical and educational decision-support tool.
It does not provide financial advice, guarantee profitable results, or automatically account for:
- Position size
- Brokerage fees
- Slippage
- Options decay
- Contract selection
- Economic news
- Prop-firm rules
- Personal risk tolerance
Always perform your own analysis and use responsible risk management.
```pinescript
//══════════════════════════════════════════════════════════════
// TRADER FORGE
//
// SURVIVE → EXECUTE → SCALE
//
// Pressure creates strength. Discipline creates edge.
//══════════════════════════════════════════════════════════════
``` Indicator

Wave Structure PRO v2 [Viprasol]Wave Structure PRO v2 is an automated Elliott Wave structure engine. It builds a ZigZag from confirmed pivots, searches for a valid 1-2-3-4-5 impulse and the following A-B-C correction, validates every candidate against Elliott's three hard rules, and scores how closely each wave matches its ideal Fibonacci proportion. On top of the count it draws the Elliott base channel, Wave 3 / Wave 5 Fibonacci targets, the next-wave retrace zone, and the exact price level where the count becomes invalid.
This is a structure assistant, not a prediction oracle. Elliott counting is inherently ambiguous, and this engine recounts as new pivots confirm. Everything it shows is derived from confirmed swing points, and it tells you honestly when no valid count exists.
HOW IT WORKS
ZigZag Pivot Engine:
Swing highs and lows are detected with a symmetric pivot window (default 8 bars left and right). A pivot only enters the structure after it is confirmed, and consecutive same-direction extremes are merged so the ZigZag always alternates high-low-high-low. The engine keeps the most recent 32 pivots as its working structure.
Sliding-Window Count Search:
The engine scans across the entire pivot structure for the most recent valid count — it does not require the pattern to end exactly at the newest pivot. A completed impulse whose correction is still developing stays on the chart and is marked "prior" in the panel, so a single awkward swing at the right edge does not wipe the analysis. At each candidate position a full 9-pivot impulse + A-B-C structure is preferred over a 6-pivot impulse alone.
Hard-Rule Validation:
Every candidate impulse must pass Elliott's three non-negotiable rules before it is accepted:
1. Wave 2 never retraces more than 100% of Wave 1
2. Wave 3 is never the shortest among Waves 1, 3, and 5
3. Wave 4 never enters the price territory of Wave 1
The A-B-C correction is additionally validated for direction and structure (B stays below the impulse extreme, C extends beyond A).
Fibonacci Quality Score:
Each wave is measured against its textbook ideal — Wave 2 near 0.5-0.618 of Wave 1, Wave 3 extending 1.618+ of Wave 1, Wave 4 near 0.382 of Wave 3, Wave 5 near equality with Wave 1. The four fits combine into a 0-100 "textbook fit" score. Extended fifth waves are scored against the alternative ideal of 0.618 x (Wave 1 + Wave 3), so a legitimately extended fifth is recognized instead of being punished, and the panel flags it as "extended 5th".
Invalidation Level:
For every accepted count the engine draws the price at which the structure stops being valid — a correction that retraces 100% of the impulse start invalidates the count. The exact level is shown on the chart, in the panel, and in the data window, giving you an objective line in the sand instead of a subjective opinion.
Alternation Check:
Waves 2 and 4 are compared as retracements of Wave 1 — when their depths differ meaningfully the panel confirms the alternation guideline is present, and shows an explicit "absent" flag when it is not.
KEY FEATURES
- Automatic 1-5 impulse and A-B-C correction detection with wave labels on the chart
- Sliding-window search — finds the most recent valid count anywhere in the structure, marked "prior" when its final pivot is not the newest swing
- Elliott's 3 hard rules enforced on every count — invalid structures are never labeled
- 0-100 Fibonacci quality score with per-wave ratio annotations at each pivot
- Extended fifth wave recognition with alternative 0.618 x (W1+W3) scoring path
- On-chart invalidation level with price label
- Elliott base channel (2-4 trendline with parallel through Wave 3)
- Wave 3 and Wave 5 Fibonacci extension targets with configurable multiples
- Next-wave retrace target zone (0.382-0.618 of the full impulse)
- Analysis panel: count state, quality, all four wave ratios, alternation, rule status, invalidation price
- Data-window outputs (quality, direction, stage, invalidation) usable by strategies and screeners via input.source
- Transition-based alerts that fire on state changes, not on every pivot refresh
HOW TO USE
Setup:
1. Add to any chart — works on all markets and timeframes
2. Use a standard candlestick chart (not Heikin Ashi)
3. Tune "Swing Sensitivity" to the wave degree you trade: higher values = larger-degree waves, lower values = smaller subdivisions
4. Defaults (sensitivity 8) suit 1H-4H charts on liquid instruments
Reading the Chart:
- Numbered labels 1-5 mark the impulse pivots; A-B-C labels mark the correction (orange)
- Small ratio numbers at pivots 2, 3, 4, 5 show each wave's Fibonacci proportion
- Dotted / dashed blue lines = Wave 3 and Wave 5 extension targets
- Cyan channel = Elliott base channel projected forward
- Purple box = expected retrace zone for the next corrective wave
- Red line = invalidation level; if price crosses it, the count is wrong
- Panel header: up/down arrow shows count direction; "prior" means the count completed before the newest swing
Reading the Panel:
- Quality 70+ = clean textbook structure; below 50 = forced fit, treat with caution
- "NO COUNT" genuinely means no valid structure exists right now — the engine never shows leftover metrics from a dead count
- The Invalidation row gives the exact price that voids the current count
SETTINGS
ZigZag: Swing sensitivity (pivot bars left/right), ZigZag visibility and color.
Waves: Wave label toggles for 1-5 and A-B-C, bullish/bearish/corrective colors, label size.
Fibonacci & Quality: Ratio annotations toggle, target visibility, Wave 3 and Wave 5 extension multiples, target color.
Channel & Target Zone: Base channel toggle and color, retrace zone toggle and color.
Invalidation: Level visibility and color.
Analysis Panel: Show/hide, position.
Alerts: Quality threshold for the high-quality alert, dynamic alert() messages toggle.
ALERTS
1. Count found — a new valid wave count appeared (fires once per count, not on every pivot extension)
2. Count invalidated — the active count stopped being valid
3. 1-5 + A-B-C complete — the correction finished, full cycle in place
4. High-quality count — a new count scored above your quality threshold
With "Dynamic alert() Messages" enabled, alert() notifications include the symbol, timeframe, direction, quality score, and invalidation price. Create the alert with condition "Any alert() function call".
LIMITATIONS & DISCLAIMER
- Elliott Wave counting is subjective by nature; this engine applies one rigorous, rule-based interpretation and recounts as new pivots confirm
- Pivots confirm with a delay equal to the swing sensitivity — labels appear after the swing completes, never in real time at the extreme
- The count can change when a developing swing extends; the transition alerts are designed around this, firing on genuine state changes only
- Wave degree is determined by your sensitivity setting; the engine does not track multiple degrees simultaneously
- Quality scoring measures Fibonacci proportion fit, not probability of continuation
- This indicator is for educational and analytical purposes only — it is not financial advice. Always use proper risk management.
ORIGINALITY
All code is original Viprasol work. Elliott Wave theory itself is public knowledge (R.N. Elliott); no third-party script was reused. v2 supersedes Wave Structure PRO with a stale-state fix, sliding-window count search, invalidation levels, extended-fifth scoring, data-window outputs, and transition-based alerts. Indicator

Sentiment Divergence Tracker The "Sentiment Divergence Tracker" is a sophisticated quantitative analysis tool designed to identify statistical anomalies between two correlated financial assets. By monitoring the relative price movement of a primary asset against a correlated counterpart, this indicator highlights "Divergence Zones" that often precede significant market reversals or mean reversions.
Core Functionality:
Traditional technical analysis often ignores the relationship between inter-market assets. This indicator bridges that gap by normalizing percentage-based price fluctuations, allowing for a clean, comparative view of market sentiment.
Key Features:
Dynamic Divergence Calculation: Utilizes standard deviation and moving average models to calculate the "Fair Value" gap between two assets.
Automated Support/Resistance Mapping: Rather than manual drawing, the indicator plots dynamic support lines that adjust based on market volatility, helping traders identify institutional "value areas."
Oversold/Overbought Detection: Visualizes extreme deviations where the price has stretched too far from its correlated pair, signaling high-probability reversal setups.
Institutional Context: Useful for identifying liquidity pockets where "Smart Money" might be accumulating or distributing based on inter-market relationships.
How to Interpret:
Baseline (0.0): Represents the equilibrium point where both assets are moving in perfect correlation.
Divergence Line: The primary blue plot. When this line moves away from the baseline, it indicates a weakening correlation.
Support/Resistance Levels: These are not static lines but dynamic boundaries. A touch or breach of these levels typically indicates that the asset is statistically "oversold" or "overbought" relative to its pair.
Trade Execution: Look for "Mean Reversion" entries when the Divergence Line exhausts its momentum at the support/resistance boundaries and begins to curl back toward the baseline.
Recommended Settings:
Timeframe: Optimized for 15-minute to 4-hour charts for intraday and swing trading.
Correlated Pair Selection: Ensure the "Correlated Asset" input matches a highly correlated instrument (e.g., Gold/Silver, or major Currency/Index pairs).
Volatility Sensitivity: Adjust the lookback period in the settings to suit your specific asset's volatility profile.
Disclaimer:
This tool is intended for analytical purposes and does not constitute financial advice. Always integrate this indicator with your existing risk management strategy and technical confirmation (e.g., candlestick patterns, order blocks Indicator

Campaign Map - Contreras Law Version en espanol mas abajo. · English version first, Spanish below.
─────────────────────────────────
CAMPAIGN MAP — CONTRERAS' LAW
WHAT IT MEASURES
This indicator builds the historical distribution of a symbol's
campaign corrections (peak→trough declines confirmed by reversal) and
places the CURRENT correction inside that map: is it normal breathing,
a deep pullback, or statistically unusual territory?
THE OBSERVATION BEHIND IT
Contreras' Law (Jacinto Contreras, June 2026): in US large-cap
technology stocks, the typical depth of campaign corrections converges
to a structural constant (~14-15% median at campaign scale),
regardless of the symbol. What differentiates each stock is not its
median but its historical maximum tail (observed: from ~25% to ~53%
depending on the symbol, across ~11 years of hourly data on 9 names).
Operational takeaway: MONITOR WITH THE MEDIAN, SIZE WITH THE TAIL.
HOW IT WORKS
· A reversal-threshold zigzag detects campaign peaks and troughs.
· Only COMPLETED corrections (confirmed by reversal) enter the
statistics: median, 75th percentile, and historical maximum.
· The main line plots the depth of the ongoing correction, colored by
zone: normal (teal), deep (orange), unusual (red).
· Summary table with the symbol's map and current status.
· Two alerts: median cross and P75 cross.
HOW TO USE IT
· Below the median: normal breathing; the pullback alone carries no
trend-change information.
· Between median and P75: deep but normal correction.
· Above P75: statistically unusual territory. The correct reading is
NOT "it must bounce now" — it is: look for exhaustion evidence
(divergences, capitulation) and demand confirmation.
· The historical maximum (the tail) is the worst-case reference for
position sizing and campaign stops.
INPUTS
· Reversal (%): rally confirming the end of a bearish campaign.
8% = campaign scale (default). 3% = swing scale.
· Minimum depth (%): smaller corrections are excluded from the map.
10% campaign / 5% swing.
LIMITATIONS (read before use)
· Statistics do NOT repaint (completed corrections only), but the
ONGOING correction is provisional by nature: its campaign peak may
extend until the reversal confirms.
· The median convergence was observed in US large-cap tech on the
hourly timeframe; it may not hold in other sectors, assets or
timeframes. Verify it on your symbol before relying on it.
· Enough campaigns (>8-10) are required for the map to be
statistically meaningful; the indicator shows "calibrating…" until
then.
· This is a MEASUREMENT and context tool. It does not generate buy or
sell signals and guarantees no outcome. Not financial advice.
─────────────────────────────────
VERSIÓN EN ESPAÑOL
MAPA DE CAMPAÑAS — LEY DE CONTRERAS
QUÉ MIDE
Este indicador construye la distribución histórica de las correcciones
de campaña de un valor (caídas máximo→mínimo confirmadas por reversión)
y sitúa la corrección actual dentro de ese mapa: ¿es una respiración
normal, una corrección profunda o territorio inusual?
LA OBSERVACIÓN QUE LO ORIGINA
Ley de Contreras (Jacinto Contreras, junio de 2026): en valores
tecnológicos estadounidenses de alta capitalización, la profundidad
típica de las correcciones de campaña converge en una constante
estructural (~14-15% de mediana, escala campaña), independiente del
símbolo. Lo que diferencia a cada valor no es su mediana, sino su cola
máxima histórica (observado: desde ~25% hasta ~53% según el símbolo,
sobre ~11 años de datos horarios en 9 valores).
Moraleja operativa: VIGILAR CON LA MEDIANA, DIMENSIONAR CON LA COLA.
CÓMO FUNCIONA
· Un zigzag por umbral de reversión detecta picos y valles de campaña.
· Solo las correcciones COMPLETADAS (confirmadas por reversión) entran
en la estadística: mediana, percentil 75 y máximo histórico.
· La línea principal muestra la profundidad de la corrección en curso,
coloreada según la zona: normal (verde), profunda (naranja),
inusual (rojo).
· Tabla resumen con el mapa del símbolo y el estado actual.
· Dos alertas: cruce de la mediana y cruce del P75.
CÓMO USARLO
· Por debajo de la mediana: respiración normal; el retroceso no es,
por sí solo, información de cambio de tendencia.
· Entre mediana y P75: corrección profunda pero dentro de lo normal.
· Por encima del P75: territorio estadísticamente inusual. La lectura
correcta no es "ya tiene que rebotar", sino: buscar señales de
agotamiento (divergencias, capitulación) y exigir confirmación.
· El máximo histórico (la cola) es la referencia de peor caso para
dimensionar posición y stops de campaña.
PARÁMETROS
· Reversión (%): rally que confirma el fin de una campaña bajista.
8% = escala campaña (por defecto). 3% = escala swing.
· Profundidad mínima (%): correcciones menores no entran al mapa.
10% campaña / 5% swing.
LIMITACIONES (léelas antes de usar)
· Las estadísticas NO repintan (solo correcciones completadas), pero
la corrección EN CURSO es provisional por naturaleza: su máximo de
campaña puede extenderse hasta que la reversión confirme.
· La convergencia de medianas está observada en tecnológicas USA de
alta capitalización en marco horario; en otros sectores, activos o
marcos puede no cumplirse. Compruébalo en tu símbolo antes de usarlo.
· Se necesitan suficientes campañas (>8-10) para que el mapa tenga
valor estadístico; el indicador muestra "calibrando…" mientras tanto.
· Es una herramienta de MEDICIÓN y contexto. No genera señales de
compra/venta ni garantiza resultado alguno. No es asesoramiento
financiero. Indicator

Impulse Correction Balance Map [AGPro Series]Impulse Correction Balance Map
🧠 Core Idea
Is the current correction still healthy compared with the prior impulse, or is the impulse losing structural balance?
📌 Overview / What it does
Impulse Correction Balance Map is a rule-based impulse and correction visualization tool designed to compare the current pullback with the prior directional swing leg.
The script identifies a valid bullish or bearish impulse, measures correction depth, maps the healthy-to-balanced correction pocket, and highlights whether price is still respecting the impulse structure or moving into failure risk.
It does not predict price direction, automate trades, or guarantee continuation after a pullback. It is a structured market-structure and wave-analysis tool for reading impulse strength, correction depth, balance, continuation, and failure context.
🎯 Purpose & Design Philosophy
Many pullback tools mark a retracement or draw generic Fibonacci levels.
This script was built to answer a more practical question:
Is the correction proportionate to the impulse that created it?
The design goal is to help traders evaluate pullbacks as part of a complete impulse-correction relationship instead of treating every retracement as equal.
⚡ Why This Script Is Different
Most tools focus on static retracement levels, generic trend strength, or simple pullback labels.
This script does NOT mark every pullback as a clean opportunity.
Instead, it builds the impulse leg first, measures the correction against that leg, separates healthy correction, balanced pullback, deep correction, continuation, and failure risk, then displays the story through premium chart visuals and a compact AG Pro panel.
⚙️ Methodology
1. Swing Detection
The script uses confirmed swing pivots to identify meaningful bullish or bearish impulse legs.
2. Impulse Validation
An impulse must meet a minimum ATR-normalized size before it becomes the active reference leg.
3. Correction Mapping
After the impulse forms, the script tracks the deepest correction point and calculates retracement depth as a percentage of the impulse.
4. Balance Evaluation
Correction depth is classified into healthy, balanced, deep, continuation, or failure states.
5. Visual Output
The chart displays the impulse box, correction pocket, depth ladder, centered pocket label, right-side tags, event labels, alerts, and a compact AG Pro decision panel.
🗺️ How to Read the Chart
Impulse Box = the prior validated directional swing leg.
Correction Pocket = the projected healthy-to-balanced retracement area.
Depth Ladder = reference rails for shallow, balanced, and deep correction zones.
Centered Pocket Label = the main visual anchor for the active balance pocket and quality score.
Right-Side Tags = current correction depth, balance state, and continuation reference.
Event Labels = key moments such as healthy correction, deep correction, continuation, or correction failure.
Panel = summarizes balance state, impulse direction, correction depth, impulse size, quality score, next context, and timeframe.
🚦 Signals & States
• HEALTHY CORRECTION → correction depth remains shallow relative to the impulse.
• BALANCED PULLBACK → correction is deeper but still inside the normal balance area.
• DEEP CORRECTION → correction is pressing into a riskier retracement zone.
• HIGH FAILURE RISK → correction is beyond the preferred balance area.
• CONTINUATION → price extends beyond the impulse end in the impulse direction.
• CORRECTION FAIL → price invalidates the impulse start area.
• WAIT IMPULSE → no valid impulse reference is active yet.
🔔 Alerts Logic
Alerts trigger when a major impulse-correction state appears.
• Healthy Correction → correction remains inside the healthy retracement area.
• Deep Correction Risk → correction depth moves into the deep-correction risk area.
• Continuation Trigger → price breaks beyond the impulse end in the impulse direction.
• Correction Failure → correction invalidates the impulse start area.
Alerts are attention markers, not trade instructions.
🧩 Confluence Logic
The context becomes stronger when:
• The impulse leg is large enough relative to ATR
• Correction depth remains proportionate
• Price respects the balance pocket
• Continuation appears after a controlled correction
• The panel state agrees with the event label
• Broader trend structure supports the impulse direction
If these elements do not align, the script avoids forcing a continuation interpretation.
📊 When to Use
• Trend continuation analysis
• Pullback evaluation
• Swing structure review
• Crypto, forex, stocks, and index markets
• Wave-style impulse and correction studies
• 1H, 4H, and daily charts
• Markets with clear directional legs and retracement behavior
⚠️ When NOT to Use
• Very low-liquidity symbols
• Extremely choppy markets with no clear swing structure
• News-driven candles where pivots may be distorted
• Ultra-low timeframes with excessive noise
• Markets where every pullback is immediately invalidated by volatility
• Situations where a single retracement should not be treated as a standalone decision
🎛️ Key Inputs
• Swing Pivot Length → controls how swing highs and lows are confirmed.
• Minimum Impulse ATR → defines how large the impulse must be before it becomes active.
• ATR Length → normalizes impulse size, label spacing, and correction context.
• Healthy Correction Max % → defines the upper boundary of the shallow correction zone.
• Balance Correction Max % → defines the upper boundary of the balanced correction zone.
• Deep Correction Max % → defines the deep-correction risk boundary.
• Projection Bars → controls how far correction pockets, rails, and tags project.
• Label Font Size → controls chart label and tag text size.
• Panel Font Size → controls panel text size.
🖥️ Interface & Visual Design
The visual hierarchy is built around the impulse-correction relationship.
The impulse box shows the directional leg.
The correction pocket shows where a controlled retracement can remain balanced.
The depth ladder shows where the correction becomes shallow, balanced, deep, or risky.
The centered badge makes the pocket readable at first glance.
The AG Pro panel summarizes the current state without forcing the user to inspect every level manually.
🧪 Practical Usage Workflow
1. Wait for a valid impulse leg to appear.
2. Check the correction pocket and depth ladder.
3. Read the current balance state in the panel.
4. Watch whether the correction stays healthy, becomes deep, or fails.
5. Look for continuation only after the correction context remains controlled.
6. Interpret the result inside broader trend, liquidity, and volatility context.
🔍 Interpretation Guidelines
A healthy correction does not guarantee continuation. It means the retracement is still proportionate to the prior impulse.
A deep correction does not guarantee reversal. It means the pullback is approaching an area where the original impulse is less structurally clean.
A continuation trigger does not guarantee follow-through. It means price extended beyond the impulse end according to the script's rule set.
A correction failure is a structural warning, not a trading command.
🚫 What This Script Is NOT
This script is not a prediction engine.
It is not financial advice.
It is not an auto-trading system.
It does not provide guaranteed entry or exit signals.
It is not a standard Fibonacci retracement tool.
It is not a full Elliott Wave counter.
⚠️ Limitations & Transparency
Swing detection depends on pivot confirmation, so signals can appear after pivots are confirmed.
Timeframe differences can change impulse and correction structure.
High volatility may cause correction depth to expand quickly.
Low-liquidity markets may produce unreliable swing pivots.
The script is designed for structured interpretation, not certainty.
🧠 Market Context Notes
Impulse-correction behavior is strongest when the market has a clear directional leg, a readable retracement, and enough liquidity for swing structure to matter.
The same correction depth can mean different things in a strong trend, a range, or a volatility shock.
The script should be read together with broader structure, volume, volatility, and market regime.
🧾 Use Case Examples
• If a bullish impulse forms and the correction remains shallow, the map may show healthy correction context.
• If a bearish impulse forms and price retraces deeply against it, the map may show deep correction or failure risk.
• If price breaks beyond the impulse end after a controlled correction, the map may show continuation.
🧱 System Philosophy
Impulse Correction Balance Map is part of the AGPro Series approach to decision-support tools:
clear structure, premium chart readability, honest interpretation, and no promise of certainty.
The goal is to help traders understand the relationship between impulse strength and correction depth without turning analysis into signal spam.
🔐 Non-Promise Statement
No script can know the future.
No correction depth guarantees continuation or reversal.
No signal should be interpreted without broader market context.
📉 Risk Disclosure
Trading involves risk.
Markets can move unpredictably.
This script is for educational and analytical purposes only.
It does not provide financial advice or guaranteed trading outcomes.
Users remain responsible for their own decisions.
📚 Educational Note
Use this script to study how impulses and corrections relate to each other.
The value is not only in the label. The value is in learning whether a pullback is proportionate, stretched, balanced, or structurally weak compared with the impulse that came before it.
Indicator

Bounce DurationOverview
Bounce Duration measures and visualizes the bar count of price bounces within a bearish cycle, from a confirmed swing low to its highest swing high before the next lower low. Each completed bounce is drawn as a labeled box, making it immediately obvious when the current bounce is behaving differently from historical ones.
Most bounce-analysis tools focus on price magnitude (how far a rally retraced). This indicator focuses on time , a dimension that is equally important but rarely visualized directly. An unusually long bounce duration is often a meaningful signal that market structure is changing.
How It Works
Swing highs and lows are identified using confirmed pivots. A bounce is measured from a post-ATH swing low to the highest swing high before the next lower low. The cycle resets on a new all-time high, ensuring only post-peak corrective bounces are measured. A live box tracks the current in-progress bounce in real time for direct comparison against history.
Two safeguards prevent false signals:
Bounces that reach a new ATH are excluded automatically
Only swing lows occurring on or after the ATH reset bar are accepted as valid starting points
Inputs
Minimum Bounce Duration (bars) - Filters out bounces shorter than this threshold
Pivot Length (bars L/R) - Controls swing detection sensitivity. Higher values find fewer, more significant pivots
Use Close Instead of Wick - Switches pivot detection to closing prices, useful for filtering wick noise on volatile instruments
Show Current Bounce - Toggles the live unconfirmed bounce box
Colors, text size, and label alignment are fully customizable
How to Use It
Compare the duration of the current bounce to all prior bounces in the same corrective cycle. Bear market bounces are typically short and uniform. When a bounce persists significantly longer than any previous one, it suggests accumulation may be underway rather than a simple relief rally.
Example: On Bitcoin's daily chart, the current bounce from the 2026 lows, measured on closing prices, is already longer in duration than every prior bounce in the post-ATH correction of prior cycles. This temporal outlier supports the case for a durable bottom forming rather than just another bear market bounce.
The indicator works on any timeframe and any instrument with clear corrective cycles. Adjust Pivot Length to match your timeframe, lower values for intraday and higher for weekly or monthly analysis.
Notes
The current bounce box repaints as it updates each bar. Confirmed historical boxes do not repaint.
No boxes are shown during a sustained uptrend. The indicator is designed for post-peak corrective analysis only.
For informational and educational purposes only. Not financial advice. Indicator

Elliott Wave (Experimental) [UAlgo]Elliott Wave (Experimental) is an automated swing based Elliott Wave scanner that attempts to classify recent market structure into common motive and corrective wave patterns. The script first converts price into a cleaned swing sequence using pivot confirmation and a minimum swing percentage filter. It then runs a two pass detection process that prioritizes five wave patterns first and fills remaining gaps with three wave corrective structures. Each detected pattern is validated with a rule engine, assigned a confidence score using Fibonacci ratio proximity, and rendered on the chart with wave labels, wave lines, optional channels, and optional Fibonacci projection targets.
This indicator is labeled experimental by design. Elliott Wave interpretation is inherently probabilistic and can vary between analysts, so the script focuses on transparent, rule driven validation and a confidence model that helps you judge the quality of each detected structure. Instead of presenting a single rigid count, it can render multiple detected patterns in the swing history and then highlights the latest one in a dashboard with direction, confidence, rule pass ratio, and a next target estimate.
🔹 Features
1) Swing Engine with Pivot Confirmation and Minimum Move Filter
The foundation of the scanner is a zigzag style swing engine. Swings are built from pivot highs and pivot lows confirmed by a configurable lookback. A Min Swing percent filter ensures that only meaningful moves are added as new swings. When consecutive pivots of the same type appear, the engine keeps only the better extreme, which helps reduce noise.
This creates a stable swing sequence that becomes the input for all wave pattern validators.
2) Multiple Pattern Families Supported
The scanner supports a wide set of Elliott structures, each enabled or disabled by inputs:
Impulse 1 2 3 4 5
Diagonal leading or ending with contracting or expanding classification
Zigzag ABC with a 5 3 5 style model
Flat ABC with regular expanded and running classification
Triangle ABCDE with contracting or expanding detection
Combination WXY for double three style sequences
Because patterns can overlap, the script uses a two pass orchestration that gives five wave structures priority, then looks for three wave structures in unused swing segments.
3) Rule Engine with Transparent Results
Each validator returns a WavePattern object that contains:
Wave list with labeled segments
A pattern type tag
Direction bullish or bearish
Validation state
Confidence score
Detailed rule results with pass and fail status and descriptive text
Rules implement common academic guidelines, such as Wave 2 not exceeding Wave 1 origin, Wave 3 not being the shortest, diagonal overlap behavior, and triangle containment conditions.
A relaxed overlap option can be enabled to allow minor Wave 4 overlap into Wave 1 territory when analyzing leveraged or futures markets where strict cash market rules may be less reliable.
4) Fibonacci Based Confidence Scoring
When a pattern passes its core rules, it receives a confidence score based on how close key measured ratios are to common Fibonacci ideals. The score is designed to reward clean proportionality and alternation behavior, while penalizing overlap or weak impulse characteristics.
Confidence is shown in the dashboard and is also mapped to a color for fast interpretation.
5) Rich Chart Rendering with Optional Components
Detected patterns can render several layers of visuals:
Wave lines connecting swing points
Wave labels placed above highs and below lows
Optional wave channel for motive patterns
Optional Fibonacci projection levels with labels
A developing dashed leg from the last confirmed swing to the current bar to indicate the incomplete swing path
A dotted background zigzag to show the underlying swing structure that drives detection
All drawings are rebuilt on the last bar to keep the chart clean and ensure only the current best set of objects remains visible.
6) Fibonacci Projection Engine for Next Targets
The script generates forward projection levels based on pattern type:
After an impulse, it projects common correction retracement levels of the full impulse
After ABC patterns, it projects trend resumption extensions based on Wave A length
After triangles, it projects post triangle thrust targets
The first projection is used as the next target value in the dashboard.
7) Dashboard Summary for the Latest Pattern
A compact dashboard shows the latest detected pattern with:
Pattern name
Direction
Confidence percent
Active wave label
Rules passed count over total rules
Next target from the projection list
Patterns found count and total swings count
This dashboard is designed to provide a quick situational read without requiring you to inspect every label and line manually.
🔹 Calculations
1) Swing Detection and State Management
Swings are detected using pivot highs and lows with symmetric confirmation:
float ph = ta.pivothigh(high, i_pLen, i_pLen)
float pl = ta.pivotlow(low, i_pLen, i_pLen)
When a pivot is found, a WavePoint is constructed at the pivot bar index and time, then passed into the swing engine. The engine enforces alternation and minimum percent change:
If the new pivot is the same type as the last swing, the more extreme point replaces it
If the pivot is the opposite type, it is only accepted if percent change exceeds Min Swing percent
This percent change filter is computed as:
absolute difference between swing prices divided by last swing price times 100
The swing list is capped to a maximum size to limit memory and improve stability.
2) Two Pass Pattern Orchestration with Segment Claiming
The scanner evaluates swing sequences and constructs patterns in two passes:
Pass 1 scans for five wave patterns such as impulse diagonal and triangle. If a valid pattern is found, its swing segment is marked as used so later scans do not overlap it.
Pass 2 scans the remaining unused segments for three wave patterns such as zigzag flat and combination.
This approach reduces overlapping detections and prioritizes larger motive structures.
3) Impulse Validation Rules and Measurements
Impulse detection uses six swing points p0 through p5, producing five waves. It validates:
Wave 2 does not retrace beyond Wave 1 origin
Wave 3 is not the shortest among Waves 1 3 5
Wave 4 does not overlap Wave 1 territory unless relaxed mode is enabled
Wave 3 exceeds the end of Wave 1
Wave 5 generally progresses beyond Wave 3 with tolerance for truncation strength
Wave 3 shows impulse like momentum using a slope proxy based on wave length divided by bar length
Wave ratios are then computed for confidence scoring:
Wave 2 retracement relative to Wave 1
Wave 3 extension relative to Wave 1
Wave 4 retracement relative to Wave 3
Wave 5 extension relative to Wave 3
Wave 5 equality relative to Wave 1
Fibonacci closeness is computed by measuring distance to a list of ideal ratios and converting it into a percent score.
4) Diagonal Validation and Contracting Expanding Classification
Diagonal validation also uses six points. It enforces overlap between Wave 4 and Wave 1 as a defining feature, plus containment rules and the requirement that Wave 5 exceeds Wave 3. It then classifies:
Contracting diagonal when wave lengths shrink in a structured way
Expanding diagonal when wave lengths grow in a structured way
A confidence score is computed using retracement ratios and a momentum decrease check for contracting diagonals.
5) Corrective Pattern Validators
Zigzag ABC validator checks:
Wave B does not exceed Wave A origin
Wave A has a stronger slope than Wave B as an impulse proxy
Wave C ends beyond Wave A
Wave B retracement remains within a tolerance range
Flat ABC validator checks:
Wave B retraces at least 90 percent of Wave A
Classifies regular expanded or running based on whether B exceeds the origin and whether C exceeds A
Requires C to reach or exceed A for regular and expanded cases
Triangle ABCDE validator checks:
Contracting triangle containment of C within A D within B and E within C plus shrinking wave sizes
Expanding triangle growth conditions
Corrective character proxy based on overlap
Combination WXY validator checks:
X does not exceed W origin
W is not triangle like using a size relationship proxy
W and Y proportionality and sideways character checks
X retracement within corrective bounds
Each validator returns rule results and a confidence score when valid.
6) Fibonacci Projection Logic
After detection, the script adds projections to the latest pattern:
For impulse patterns, it projects correction retracement levels of the full impulse: 38.2 percent, 50 percent, 61.8 percent
For ABC patterns, it projects 100 percent and 161.8 percent extensions based on Wave A length
For triangles, it projects thrust targets based on Wave A length
Projection prices are computed by adding or subtracting a multiple of a reference wave length from the last wave end price, depending on detected direction.
7) Rendering and Object Management
On the last bar, the script deletes previous drawing objects and renders the current scan results. Rendering includes:
Wave lines with motive waves in bullish or bearish color and corrective waves in corrective color
Wave labels placed above highs and below lows
Optional wave channel using the wave 2 to wave 4 line and a parallel through wave 3
Fibonacci projection lines and labels extending forward
A developing dashed leg from last confirmed swing to current price proxy
A dotted zigzag reference connecting all swings
This ensures the chart remains responsive and avoids accumulating outdated drawings. Indicator

ICC Market Structure and Phase TrackingICC Market Structure and Phase Tracker
ICC Market Structure and Phase Tracker is a visual market-structure indicator based on the Indication → Correction → Continuation (ICC) framework — a structured approach to analyzing break-of-structure, pullback, consolidation, and trend-continuation phases.
The script focuses on identifying structural phases, key levels, and phase transitions across multiple timeframes, providing clear contextual market structure information.
What the Indicator Identifies
The indicator tracks complete market-structure cycles by classifying price action into the following phases:
Indication — initial structural break or trend initiation
Correction — pullback, retracement, or consolidation following the break
Continuation — expansion or impulse in the direction of structure
Neutral / No Setup — periods without valid structural conditions Each phase is visually distinguished on the chart for fast, at-a-glance structural awareness.
CORE FEATURES
Market Structure & Phase Tracking
Automatic detection of structural breaks, corrections, consolidations, and continuations
Background shading to clearly distinguish phases
Invalidation logic to identify failed or broken structures Multi-Timeframe Context
Optional higher-timeframe (HTF) structure displayed on lower-timeframe charts
HTF indication levels shown as reference lines
HTF phase and context displayed in the information table Structure Event Visualization
Visual markers for continuation and optional reversal structures
Clear visual separation between trend-aligned and counter-structure events
Reversal structure visualization can be enabled or disabled in settings Volatility-Aware Structure Zones
Structure-based support and resistance zones
Optional ATR-based zone sizing that adapts to market volatility
Configurable historical zones (0–3) with visual hierarchy Information Table
Displays current ICC phase, indication level, consolidation status, and HTF context
Designed for quick reference without relying solely on chart visuals Alerts
Alerts trigger only when corresponding visual conditions appear on the chart
Includes alerts for ICC phases, continuation structures, and optional reversals Configuration Overview
Auto Profiles for different trading contexts (Scalping, Intraday, Swing, Entry)
Manual controls for swing length, consolidation behavior, and volatility settings
Higher-timeframe controls for filtering and visual alignment
Reversal toggle to enable or disable counter-structure visualization Default settings are intended as reasonable starting points and can be adjusted for different instruments and timeframes.
Intended Use
This script is designed as a market-structure and contextual analysis tool.
Users are expected to apply their own analysis, validation, and risk management when interpreting the displayed structure.
Feedback
Bug reports, edge cases, and constructive feedback are welcome.
The project is actively refined with a focus on structure clarity, phase accuracy, and multi-timeframe usability. Indicator

Ultimate Major Contextual Dashboard (Multi-Asset)Overview : The Ultimate Major Dashboard is a performance-optimized market overview tool designed to provide a consolidated snapshot of the 7 major Forex pairs and Gold. It aggregates correlation, trend, momentum, and volatility data into a single, clean table, allowing users to view broader market context without switching charts.
Technical Logic & Components : This indicator utilizes a modular function to analyze EURUSD, GBPUSD, USDJPY, USDCHF, AUDUSD, USDCAD, NZDUSD, and XAUUSD across four key dimensions:
Intermarket Correlation (Pearson Coefficient): Uses ta.correlation() to compare each asset against the symbol currently on your main chart.
Logic: Values above 0.7 (Dark Green) suggest a strong positive relationship, while values below -0.7 (Dark Red) suggest inverse behavior. This is calculated over a rolling 50-period window to balance stability with current market sensitivity.
Trend Bias (EMA-200): Evaluates the long-term trend by checking price position relative to the 200-period Exponential Moving Average.
Visuals: An upward arrow (⬆) indicates price is above the EMA; a downward arrow (⬇) indicates it is below.
Momentum (RSI-14): Calculates the Relative Strength Index. The dashboard automatically highlights readings above 70 (OB) or below 30 (OS) to help identify potential momentum extremes.
Volatility (ATR-14): Displays the Average True Range as a reference for the current active range of each market, helping users compare volatility levels across the majors.
How to Interpret the Dashboard
Asset Alignment: Correlation values help identify when pairs are moving in "unison" versus when a specific currency is diverging from the group.
Directional Context: Combining the Trend (EMA) and Momentum (RSI) columns provides a quick view of whether a market is trending strongly or reaching an exhaustion point.
Volatility Benchmarking: The ATR values offer perspective on which pairs are currently the most active, assisting in market comparison based on volatility preference.
Data Handling & Customization
Multi-Symbol Sync: Data is fetched using request.security(). The calculations are synchronized with the chart's current bar state for real-time accuracy.
Dynamic TF: Users can select the analysis timeframe (60, 240, D, W) via the settings menu.
Flexibility: The dashboard position can be toggled between all four corners of the chart to avoid overlapping with price action.
Disclaimer
This tool is provided for analytical and educational purposes only. It does not generate trading signals and should not be considered financial advice. Indicator

Script_Algo - Fibo Correction Strategy🔹 Core Concept
The strategy is built on combining Fibonacci retracement levels, candlestick pattern confirmation, and trend filtering for trade selection. It performs well on the 1-hour timeframe across many cryptocurrency pairs. Particularly on LINKUSDT over the past year and a half, despite the not very optimal 1:1 risk/reward ratio.
The logic is simple: after a strong impulse move, the price often retraces to key Fibonacci levels (specifically, the 61.8% level). If a confirming candlestick (pattern) appears at this moment, the strategy looks for an entry in the direction of the main trend.
🔹 Indicators Used in the Strategy
ATR (Average True Range) — Used to calculate the stop-loss and take-profit levels.
EMA (9 and 21) — Additional moving averages for assessing the direction of movement (not directly used in entry conditions, but the logic can be expanded to include them).
SMA (Trend Filter, 20 by default) — The trend direction filter. Trades are only opened in its direction.
Fibonacci Levels — The 61.8% retracement level is calculated based on the high and low of the previous candle.
🔹 Entry Conditions
🟢 Long (Buy):
Previous Candle:
Must be green (close higher than open).
Must have a body not smaller than a specified minimum.
The upper wick must not exceed 30% of the body size.
→ This filters out "weak" or "indecisive" candles.
Current Candle:
Price touches or breaches the Fibonacci 61.8% retracement level from the previous range.
Closes above this level.
Closes above the Trend Filter (SMA) line.
A position is opened only if there are no other open trades at the moment.
🔴 Short (Sell):
Previous Candle:
Must be red (close lower than open).
Must have a body not smaller than a specified minimum.
The lower wick must not exceed 30% of the body size.
Current Candle:
Price touches or breaches the Fibonacci 61.8% retracement level from the previous range.
Closes below this level.
Closes below the Trend Filter (SMA) line.
A trade is opened only if there are no other open positions.
🔹 Risk Management
Stop-Loss = ATR × multiplier (default is 5).
Take-Profit = ATR × the same multiplier.
Thus, the default risk/reward ratio is 1:1, but it can be easily adjusted by changing the coefficient. Although, strangely enough, this ratio has shown the best results on some assets on the 1-hour timeframe.
🔹 Chart Visualization
Fibonacci level for Long — Green line with circles.
Fibonacci level for Short — Red line with circles.
Trend Filter line (SMA) — Blue.
🔹 Strengths of the Strategy
✅ Utilizes a proven market pattern — retracement to the 61.8% level.
✅ Further filters entries using trend and candlestick patterns.
✅ Simple, transparent logic that is easy to expand (e.g., adding other Fib levels, an EMA filter, etc.).
🔹 Limitations
⚠️ Performs better in trending markets; can generate false signals during ranging (sideways) conditions.
⚠️ The fixed 1:1 risk/reward ratio is not always optimal and could be refined.
⚠️ Performance depends on the selected timeframe and ATR parameters.
📌 Summary:
The strategy seeks corrective entries in the direction of the trend, confirmed by candlestick patterns. It is versatile and can be applied to forex pairs, cryptocurrencies, and stocks.
⚠️ Not financial advice. Pay close attention to risk management to avoid blowing your account. The strategy is not repainting — I have personally verified it through real testing — but it may not necessarily replicate the same results in the future, as the market is constantly changing. Test it, profit, and good luck to everyone! Strategy

Correlation HeatMap Matrix Data [TradingFinder]🔵 Introduction
Correlation is a statistical measure that shows the degree and direction of a linear relationship between two assets.
Its value ranges from -1 to +1 : +1 means perfect positive correlation, 0 means no linear relationship, and -1 means perfect negative correlation.
In financial markets, correlation is used for portfolio diversification, risk management, pairs trading, intermarket analysis, and identifying divergences.
Correlation HeatMap Matrix Data TradingFinder is a Pine Script v6 library that calculates and returns raw correlation matrix data between up to 20 symbols. It only provides the data – it does not draw or render the heatmap – making it ideal for use in other scripts that handle visualization or further analysis. The library uses ta.correlation for fast and accurate calculations.
It also includes two helper functions for visual styling :
CorrelationColor(corr) : takes the correlation value as input and generates a smooth gradient color, ranging from strong negative to strong positive correlation.
CorrelationTextColor(corr) : takes the correlation value as input and returns a text color that ensures optimal contrast over the background color.
Library
"Correlation_HeatMap_Matrix_Data_TradingFinder"
CorrelationColor(corr)
Parameters:
corr (float)
CorrelationTextColor(corr)
Parameters:
corr (float)
Data_Matrix(Corr_Period, Sym_1, Sym_2, Sym_3, Sym_4, Sym_5, Sym_6, Sym_7, Sym_8, Sym_9, Sym_10, Sym_11, Sym_12, Sym_13, Sym_14, Sym_15, Sym_16, Sym_17, Sym_18, Sym_19, Sym_20)
Parameters:
Corr_Period (int)
Sym_1 (string)
Sym_2 (string)
Sym_3 (string)
Sym_4 (string)
Sym_5 (string)
Sym_6 (string)
Sym_7 (string)
Sym_8 (string)
Sym_9 (string)
Sym_10 (string)
Sym_11 (string)
Sym_12 (string)
Sym_13 (string)
Sym_14 (string)
Sym_15 (string)
Sym_16 (string)
Sym_17 (string)
Sym_18 (string)
Sym_19 (string)
Sym_20 (string)
🔵 How to use
Import the library into your Pine Script using the import keyword and its full namespace.
Decide how many symbols you want to include in your correlation matrix (up to 20). Each symbol must be provided as a string, for example FX:EURUSD .
Choose the correlation period (Corr\_Period) in bars. This is the lookback window used for the calculation, such as 20, 50, or 100 bars.
Call Data_Matrix(Corr_Period, Sym_1, ..., Sym_20) with your selected parameters. The function will return an array containing the correlation values for every symbol pair (upper triangle of the matrix plus diagonal).
For example :
var string Sym_1 = '' , var string Sym_2 = '' , var string Sym_3 = '' , var string Sym_4 = '' , var string Sym_5 = '' , var string Sym_6 = '' , var string Sym_7 = '' , var string Sym_8 = '' , var string Sym_9 = '' , var string Sym_10 = ''
var string Sym_11 = '', var string Sym_12 = '', var string Sym_13 = '', var string Sym_14 = '', var string Sym_15 = '', var string Sym_16 = '', var string Sym_17 = '', var string Sym_18 = '', var string Sym_19 = '', var string Sym_20 = ''
switch Market
'Forex' => Sym_1 := 'EURUSD' , Sym_2 := 'GBPUSD' , Sym_3 := 'USDJPY' , Sym_4 := 'USDCHF' , Sym_5 := 'USDCAD' , Sym_6 := 'AUDUSD' , Sym_7 := 'NZDUSD' , Sym_8 := 'EURJPY' , Sym_9 := 'EURGBP' , Sym_10 := 'GBPJPY'
,Sym_11 := 'AUDJPY', Sym_12 := 'EURCHF', Sym_13 := 'EURCAD', Sym_14 := 'GBPCAD', Sym_15 := 'CADJPY', Sym_16 := 'CHFJPY', Sym_17 := 'NZDJPY', Sym_18 := 'AUDNZD', Sym_19 := 'USDSEK' , Sym_20 := 'USDNOK'
'Stock' => Sym_1 := 'NVDA' , Sym_2 := 'AAPL' , Sym_3 := 'GOOGL' , Sym_4 := 'GOOG' , Sym_5 := 'META' , Sym_6 := 'MSFT' , Sym_7 := 'AMZN' , Sym_8 := 'AVGO' , Sym_9 := 'TSLA' , Sym_10 := 'BRK.B'
,Sym_11 := 'UNH' , Sym_12 := 'V' , Sym_13 := 'JPM' , Sym_14 := 'WMT' , Sym_15 := 'LLY' , Sym_16 := 'ORCL', Sym_17 := 'HD' , Sym_18 := 'JNJ' , Sym_19 := 'MA' , Sym_20 := 'COST'
'Crypto' => Sym_1 := 'BTCUSD' , Sym_2 := 'ETHUSD' , Sym_3 := 'BNBUSD' , Sym_4 := 'XRPUSD' , Sym_5 := 'SOLUSD' , Sym_6 := 'ADAUSD' , Sym_7 := 'DOGEUSD' , Sym_8 := 'AVAXUSD' , Sym_9 := 'DOTUSD' , Sym_10 := 'TRXUSD'
,Sym_11 := 'LTCUSD' , Sym_12 := 'LINKUSD', Sym_13 := 'UNIUSD', Sym_14 := 'ATOMUSD', Sym_15 := 'ICPUSD', Sym_16 := 'ARBUSD', Sym_17 := 'APTUSD', Sym_18 := 'FILUSD', Sym_19 := 'OPUSD' , Sym_20 := 'USDT.D'
'Custom' => Sym_1 := Sym_1_C , Sym_2 := Sym_2_C , Sym_3 := Sym_3_C , Sym_4 := Sym_4_C , Sym_5 := Sym_5_C , Sym_6 := Sym_6_C , Sym_7 := Sym_7_C , Sym_8 := Sym_8_C , Sym_9 := Sym_9_C , Sym_10 := Sym_10_C
,Sym_11 := Sym_11_C, Sym_12 := Sym_12_C, Sym_13 := Sym_13_C, Sym_14 := Sym_14_C, Sym_15 := Sym_15_C, Sym_16 := Sym_16_C, Sym_17 := Sym_17_C, Sym_18 := Sym_18_C, Sym_19 := Sym_19_C , Sym_20 := Sym_20_C
= Corr.Data_Matrix(Corr_period, Sym_1 ,Sym_2 ,Sym_3 ,Sym_4 ,Sym_5 ,Sym_6 ,Sym_7 ,Sym_8 ,Sym_9 ,Sym_10,Sym_11,Sym_12,Sym_13,Sym_14,Sym_15,Sym_16,Sym_17,Sym_18,Sym_19,Sym_20)
Loop through or index into this array to retrieve each correlation value for your custom layout or logic.
Pass each correlation value to CorrelationColor() to get the corresponding gradient background color, which reflects the correlation’s strength and direction (negative to positive).
For example :
Corr.CorrelationColor(SYM_3_10)
Pass the same correlation value to CorrelationTextColor() to get the correct text color for readability against that background.
For example :
Corr.CorrelationTextColor(SYM_1_1)
Use these colors in a table or label to render your own heatmap or any other visualization you need.
Library

Official USD Staggered Bands - ArgentinaOfficial USD Staggered Bands - Argentina
The Central Bank, under the administration of Javier Milei (La Libertad Avanza), announced on Friday, April 11, 2025, a series of measures to eliminate the so-called "exchange rate restriction."
In this new phase, the dollar's exchange rate on the Free Exchange Market (MLC) will be able to fluctuate within a band between $1,000 and $1,400 , the limits of which will be expanded at a rate of 1% monthly.
The lines evolve daily, increasing as the public administration predicts. This way, you can know the likelihood of a Central Bank intervention to correct the variation and return the peso to a price within the band.
The script runs under the ticker USDARS Indicator

is_strategyCorrection-Adaptive Trend Strategy (Open-Source)
Core Advantage: Designed specifically for the is_correction indicator, with full transparency and customization options.
Key Features:
Open-Source Code:
✅ Full access to the strategy logic – study how every trade signal is generated.
✅ Freedom to customize – modify entry/exit rules, risk parameters, or add new indicators.
✅ No black boxes – understand and trust every decision the strategy makes.
Built for is_correction:
Filters out false signals during market noise.
Works only in confirmed trends (is_correction = false).
Adaptable for Your Needs:
Change Take Profit/Stop Loss ratios directly in the code.
Add alerts, notifications, or integrate with other tools (e.g., Volume Profile).
For Developers/Traders:
Use the code as a template for your own strategies.
Test modifications risk-free on historical data.
How the Strategy Works:
Main Goal:
Automatically buys when the price starts rising and sells when it starts falling, but only during confirmed trends (ignoring temporary pullbacks).
What You See on the Chart:
📈 Up arrows ▼ (below the candle) = Buy signal.
📉 Down arrows ▲ (above the candle) = Sell signal.
Gray background = Market is in a correction (no trades).
Key Mechanics:
Buy Condition:
Price closes higher than the previous candle + is_correction confirms the main trend (not a pullback).
Example: Red candle → green candle → ▼ arrow → buy.
Sell Condition:
Price closes lower than the previous candle + is_correction confirms the trend (optional: turn off short-selling in settings).
Exit Rules:
Closes trades automatically at:
+0.5% profit (adjustable in settings).
-0.5% loss (adjustable).
Or if a reverse signal appears (e.g., sell signal after a buy).
User-Friendly Settings:
Sell – On (default: ON):
ON → Allows short-selling (selling when price falls).
OFF → Strategy only buys and closes positions.
Revers (default: OFF):
ON → Inverts signals (▼ = sell, ▲ = buy).
%Profit & %Loss:
Adjust these values (0-30%) to increase/decrease profit targets and risk.
Example Scenario:
Buy Signal:
Price rises for 3 days → green ▼ arrow → strategy buys.
Stop loss set 0.5% below entry price.
If price keeps rising → trade closes at +0.5% profit.
Correction Phase:
After a rally, price drops for 1 day → gray background → strategy ignores the drop (no action).
Stop Loss Trigger:
If price drops 0.5% from entry → trade closes automatically.
Key Features:
Correction Filter (is_correction):
Acts as a “noise filter” → avoids trades during temporary pullbacks.
Flexibility:
Disable short-selling, flip signals, or tweak profit/loss levels in seconds.
Transparency:
Open-source code → see exactly how every signal is generated (click “Source” in PulseWire).
Tips for Beginners:
Test First:
Run the strategy on historical data (click the “Chart” icon in PulseWire).
See how it performed in the past.
Customize It:
Increase %Profit to 2-3% for volatile assets like crypto.
Turn off Sell – On if short-selling confuses you.
Trust the Stop Loss:
Even if you think the price will rebound, the strategy will close at -0.5% to protect your capital.
Where to Find Settings:
Click the strategy name on the top-left of your chart → adjust sliders/toggles in the menu.
Русская Версия
Трендовая стратегия с открытым кодом
Главное преимущество: Полная прозрачность логики и адаптация под ваши нужды.
Особенности:
Открытый исходный код:
✅ Видите всю «кухню» стратегии – как формируются сигналы, когда открываются сделки.
✅ Меняйте правила – корректируйте тейк-профит, стоп-лосс или добавляйте новые условия.
✅ Никаких секретов – вы контролируете каждое правило.
Заточка под is_correction:
Игнорирует ложные сигналы в коррекциях.
Работает только в сильных трендах (is_correction = false).
Гибкая настройка:
Подстройте параметры под свой риск-менеджмент.
Добавьте свои индикаторы или условия для входа.
Для трейдеров и разработчиков:
Используйте код как основу для своих стратегий.
Тестируйте изменения на истории перед реальной торговлей.
Простыми словами:
Почему это удобно:
Открытый код = полный контроль. Вы можете:
Увидеть, как именно стратегия решает купить или продать.
Изменить правила закрытия сделок (например, поставить TP=2% вместо 1.5%).
Добавить новые условия (например, торговать только при высоком объёме).
Примеры кастомизации:
Новички: Меняйте только TP/SL в настройках (без кодинга).
Продвинутые: Добавьте RSI-фильтр, чтобы избегать перекупленности.
Разработчики: Встройте стратегию в свою торговую систему.
Как начать:
Скачайте код из PulseWire.
Изучите логику в разделе strategy.entry/exit.
Меняйте параметры в блоке input.* (безопасно!).
Тестируйте изменения и оптимизируйте под свои цели.
Как работает стратегия:
Главная задача:
Автоматически покупает, когда цена начинает расти, и продаёт, когда падает. Но делает это «умно» — только когда рынок в основном тренде, а не во временном откате (коррекции).
Что видно на графике:
📈 Стрелки вверх ▼ (под свечой) — сигнал на покупку.
📉 Стрелки вниз ▲ (над свечой) — сигнал на продажу.
Серый фон — рынок в коррекции (не торгуем).
Как это работает:
Когда покупаем:
Если цена закрылась выше предыдущей и индикатор is_correction показывает «основной тренд» (не коррекция).
Пример: Была красная свеча → стала зелёная → появилась стрелка ▼ → покупаем.
Когда продаём:
Если цена закрылась ниже предыдущей и is_correction подтверждает тренд (опционально, можно отключить в настройках).
Когда закрываем сделку:
Автоматически при достижении:
+0.5% прибыли (можно изменить в настройках).
-0.5% убытка (можно изменить).
Или если появился противоположный сигнал (например, после покупки пришла стрелка продажи).
Настройки для чайников:
«Sell – On» (включено по умолчанию):
Если включено → стратегия будет продавать в шорт.
Если выключено → только покупки и закрытие позиций.
«Revers» (выключено по умолчанию):
Если включить → стратегия будет работать наоборот (стрелки ▼ = продажа, ▲ = покупка).
«%Profit» и «%Loss»:
Меняйте эти цифры (от 0 до 30), чтобы увеличить/уменьшить прибыль и риски.
Пример работы:
Сигнал на покупку:
Цена 3 дня растет → появляется зелёная стрелка ▼ → стратегия покупает.
Стоп-лосс ставится на 0.5% ниже цены входа.
Если цена продолжает расти → сделка закрывается при +0.5% прибыли.
Коррекция:
После роста цена падает на 1 день → фон становится серым → стратегия игнорирует это падение (не закрывает сделку).
Стоп-лосс:
Если цена упала на 0.5% от точки входа → сделка закрывается автоматически.
Важные особенности:
Фильтр коррекций (is_correction):
Это «защита от шума» — стратегия не реагирует на мелкие откаты, работая только в сильных трендах.
Гибкие настройки:
Можно запретить шорты, перевернуть сигналы или изменить уровни прибыли/убытка за 2 клика.
Прозрачность:
Весь код открыт → вы можете увидеть, как формируется каждый сигнал (меню «Исходник» в PulseWire).
Советы для новичков:
Начните с теста:
Запустите стратегию на исторических данных (кнопка «Свеча» в окне PulseWire).
Посмотрите, как она работала в прошлом.
Настройте под себя:
Увеличьте %Profit до 2-3%, если торгуете валюты.
Отключите «Sell – On», если не понимаете шорты.
Доверяйте стоп-лоссу:
Даже если кажется, что цена развернётся — стратегия закроет сделку при -0.5%, защитив ваш депозит.
Где найти настройки:
Кликните на название стратегии в верхнем левом углу графика → откроется меню с ползунками и переключателями.
Важно: Стратегия предоставляет «рыбу» – чтобы она стала «уловистой», адаптируйте её под свой стиль торговли! Strategy

Comprehensive Trading Toolkit [BigBeluga]Trading Toolkit is a comprehensive indicator inspired by the trading strategies of the renowned crypto influencer Michaël van de Poppe . This tool combines RSI divergences, correction zones, and advanced support/resistance levels to provide traders with a robust framework for analyzing market movements.
🔵 Key Features:
RSI Divergences on Chart:
Automatically identifies and plots RSI divergences (bullish and bearish) directly on the main price chart.
Green lines indicate bullish divergences, suggesting potential upward reversals.
Red lines indicate bearish divergences, signaling possible downward movements.
Correction Boxes:
Traders typically define a correction as a drop in value of 10% or more. This drop can happen over a few hours or a few days. Also, it can last for less than 24 hours or many months.
This indicator visualizes corrections with blue shaded boxes, triggered by a percentage decline defined in the settings.
The boxes highlight sharp price drops, helping traders identify significant market movements quickly.
Advanced Support and Resistance Levels:
Dynamically detects key support and resistance levels based on price pivots.
When the price is above a level, it plots a green shaded area from the cross point, marking support.
When the price drops below a level, it plots a red shaded area, highlighting resistance.
Dashed lines indicate weaker levels, while solid lines represent stronger, more reliable levels.
🔵 Usage:
Identify Divergences: Use plotted RSI divergences to detect potential market reversals and align them with price action.
Analyze Correction Zones: Utilize correction boxes to evaluate significant price declines and find potential buying opportunities during these corrections.
Leverage Support and Resistance Levels: Confirm breakouts, reversals, or consolidation zones with the color-coded areas.
Enhance Risk Management: Combine divergences and correction zones to set informed stop-loss or take-profit levels.
Trading Toolkit empowers traders with actionable insights into market trends, corrections, and support/resistance dynamics, making it an invaluable tool for crypto and forex markets. Indicator

Comprehensive Correlation Meter with Multiple MarketsThe Comprehensive Correlation Meter is designed to provide traders and investors with insights into the relationships between multiple financial instruments. This script expands upon an existing idea on PulseWire about correlation by introducing the ability to analyze the correlation between three markets, offering deeper insights into market relationships. It helps users understand how these markets move in relation to each other, aiding in risk management and portfolio diversification.
Key Features:
Multiple Market Analysis: This script allows you to analyze the correlation between your primary market and two other selected markets.
Customizable Inputs: Users can select any symbols for the reference and third markets, and these selections must be confirmed before use.
Correlation Coefficients: Calculates and plots the correlation coefficients for:
Current Market vs. Reference Market
Third Market vs. Reference Market
Current Market vs. Third Market
An average correlation of all three markets combined.
Visual Aids: Plots reference lines at +1, 0, and -1 to indicate maximum positive correlation, no correlation, and maximum negative correlation.
How It Works:
Input Symbols: Select the symbols for the reference and third markets. The current market is based on the chart you are viewing.
Data Collection: The script collects the closing prices of the selected markets and calculates the percentage changes.
Correlation Calculation: Using the collected data, the script computes the covariance and standard deviations to determine the correlation coefficients.
Visualization: The correlation coefficients and covariances are plotted for visual analysis.
How to Use:
Select Symbols:
Use the input fields to specify the reference and third market symbols. Confirm your selections to proceed.
Customize Display:
Choose whether to display the covariance, reference market, current market, and third market.
Select which correlation coefficients to display.
Interpret Results:
A correlation coefficient close to +1 indicates a strong positive correlation.
A coefficient close to -1 indicates a strong negative correlation.
A coefficient around 0 indicates little to no correlation.
Use these insights to manage risk and diversify your portfolio effectively.
Example Use Case:
Suppose you are trading the S&P 500 and want to understand its correlation with the NASDAQ 100 and a particular stock, such as Apple. By setting the S&P 500 as the reference market, the NASDAQ 100 as the third market, and observing the current market (Apple), you can see how these instruments move in relation to each other. This can help you decide on hedging strategies or identify opportunities for diversification. However this is Not a Financial advise Indicator

Indicator

Correlation prix [SP500, TESLA, BTCBefore you see this post I want to thank all the PulseWire team. Every day that passes I learn better and better to use Pine script and I owe this to all those who publish and to the philosophy of PulseWire. Thanks from Amos
This trading indicator compares the prices of the S&P 500 Index (SP500), Tesla (TSLA), and Bitcoin (BTC) to find correlations between them. To make the prices of SP500 and Tesla comparable to the price of Bitcoin, the indicator multiplies the closing price of Tesla by 114 and the closing price of the S&P 500 Index by 5.6.
In this way we can superimpose the prices on the BTC chart and see what happens.
Average BTC price/ tesla price = 114, so if we multiply the tesla price by 114 times we can superimpose it on the BTC price
At average BTC/SPX price = 5.6, also in this case we multiply the price of SPX by 5.6 to overlay the graph and see any correlations.
The indicator then calculates the average price between SP500 and Tesla, using the formula (SP500 + Tesla) / 2. This calculation creates a new line on the chart that represents the average price between these two assets.
The BTC_SP_TE variable is then calculated as the average of the closing price of Bitcoin and the previously calculated average price of SP500 and Tesla, using the formula (Btc + SP_TE) / 2. This calculation creates another line on the chart that represents the average price between Bitcoin and the previously calculated average between SP500 and Tesla.
The idea behind calculating these averages is to find correlations and patterns between the prices of these assets, which can help identify potential trading opportunities. By comparing the average prices of different assets, the trader can look for trends and patterns that might not be apparent when looking at each asset individually.
The indicator plots these prices on a chart and fills the area between them with either green or fuchsia, depending on which one is higher. The strategy suggests buying Bitcoin when the average price of SP500 and Tesla is higher than the current price of Bitcoin, and selling when it is lower.
To add visual cues to the trading strategy, the indicator uses the plotchar function to display a small triangle below the chart when it detects a potential buying opportunity. This is done with the following parameters:
Value: BTC_SP_TE < Btc and Btc > Btc1 and Btc1 > Btc , which is a logical expression that checks whether the average price of SP500 and Tesla is less than the current price of Bitcoin (BTC_SP_TE < Btc), and whether the current price of Bitcoin is higher than the price 10 bars ago (Btc > Btc1 ) and higher than the price on the previous bar (Btc1 > Btc ).
Text: "Moyen BTC_SP_Te", which is the text to display inside the marker.
Symbol: "▲", which is the symbol to use for the marker. In this case, it is a small triangle pointing upwards.
Location: location.belowbar, which specifies that the marker should be placed below the bar.
I hope this is an example of how to create an indicator on PulseWire, remember that correlations do not always last, it is possible that when you see the graph this correspondence no longer exists, do your studies and get inspired. Indicator

Indicator

Indicator

Indicator

Swing ComparatorHere I bring you an array of methods to compare the swings and consistency between assets.
This indicator is excellent for swing traders and scalpers looking to maximize their profits by examining which of two closely related pairs provides greater price fluctuation during given period.
This indicator works against two assets, which are to be configured in settings.
This indicator has 5 particular plots for you to examine, each which can be considered for you to contemplate which pair for you to next perform a trade on.
First off, let's start with the blue.
The blue is simply a pearson correlation coefficient, thankfully now included in pulsewire. This provides a value of 1 as values show to be close correlation, 0 showing no correlation, and -1 showing negative correlation - meaning an increase in one pair correlates to a decrease in another pair. This will turn green when greater than 0.975, showing a very strong relationship between the two pairs, and red when below -0.975. This is the only plot to be interpreted on a scale from -1 to +1.
Next, we have the purple and yellow background plots, followed by the white and green moving averages. Though similar, these are all slightly different.
For each of these 4 plots, a value greater than 0 indicates greater price swings for your Symbol #1, while a value less than 0 indicates greater price swings for Symbol #2.
These calculations are performed on a per bar basis, meaning you're likely going to be examining bars longer than what you'll normally be trading on. Use confluence, as well as your own judgement for this.
For example, if symbol #1 provides a bar with an open value 1% greater or less than close, providing a 1% swing on a given bar, but symbol #2 provides 2%, the indicator will fall down toward the negative, as Symbol #2 had the greater swing.
First, yellow focuses on only open/close bar values, and thus the body of the candlestick.
Purple, on the other hand, focuses on the wicks of the candle - thus, the high/low values. I've opted to make these two different values as a wick focuses on the embodiment within the time period, and body focuses on the open/close instant.
Next, the green is an extended EMA of the purple - High/Low ratio. This is important to examine trend overtime, and reduce unneeded noise.
Lastly, the white is simply difference in the standard deviation of the particular bars, between the two symbols you have selected. The tends to usually tie up with the green pretty well.
Considering this is going to by nature be very noisy datasets, I have included in settings the option to extend an EMA for everything. They have their default settings, but if you'd like to examine the trend without an EMA, feel free to set it to 1 to eliminate its effects.
I have additionally added the ability to introduce clipping, as well as scale the correlation coefficient to remain visible when examining very short term time scales. In the future, I hope to properly normalize all plots to remain within a -1 to +1 basis. Please be patient as I have multiple projects ongoing.
Suggestions and constructive criticism are very well encouraged.
Anyone is welcome to utilize this in their code, as well, i just ask you provide credit.
As you reduce to time frames less than a day, you will likely have to reduce the coefficient min/max closer to 0.025, or just hide it entirely.
TODO:
Make it look better. Sorry, folks.
Introduce latency between pairs.
Examine significance of a coefficient of determination
Remove static weights and introduce z-score and linear normalization.
Consider adding room for a 3rd pair. This could get ugly, however.
Indicator

Indicator
