PROTECTED SOURCE SCRIPT
Mis à jour

AstroTrading_MarketTracker

67
📈 AstroTrading MarketTracker
Multi-Asset Market Structure & Liquidity Zone Screener
Author: Bugra Comez | Version: 1.0 | Category: Market Structure Analysis

🔍 Indicator Overview
This professional-grade tool tracks market structure breaks (BOS/CHoCH), equilibrium zones (EQH/EQL), and liquidity patterns across 5 customizable assets/timeframes. It combines:

Real-time multi-ticker dashboard

ATR-validated pivot points

Break of Structure (BOS) detection

Change of Character (CHoCH) identification

Equilibrium Zones for mean-reversion trading

⚙️ Core Parameters
1. General Settings
maxBoxesCount (500): Max drawn objects on chart (optimizes performance).

maxDistanceToLastBar (750 bars): Limits historical calculation depth.

ATR Length (14): Sensitivity for pivot validation.

2. Structure Detection
BOS Enable: Toggle Break of Structure signals.

CHoCH Enable: Toggle Change of Character signals.

CHoCH+ Enable: Enhanced CHoCH detection.

EQH/EQL Enable: Equilibrium zone tracking.

3. Ticker Configuration
Presets: Preloaded crypto/forex/stocks/futures templates.

Custom Mode:

5 customizable symbols (e.g., BINANCE:BTCUSDT)

Independent timeframes per asset (e.g., 1D, 4H)

Activation toggles for each row

📊 Algorithm Logic
Step 1: Pivot Identification
Uses ATR-filtered pivots to avoid false swings:

pine
Copy
pivotHighNormal = ta.pivothigh(high, 14, 14)
pivotLowNormal = ta.pivotlow(low, 14, 14)
Validates pivots against 233-period SMA for significance.

Step 2: Market Structure Detection
Break of Structure (BOS):

Bullish: Price closes above last significant pivot high

Bearish: Price closes below last significant pivot low

pine
Copy
BOS = ((crossWay == "Bull" and currentStructure == 1) or (crossWay == "Bear" and currentStructure == -1))
Change of Character (CHoCH):

Detects failed breaks indicating trend exhaustion:

pine
Copy
CHoCH = ((crossWay == "Bull" and currentStructure == -1) or (crossWay == "Bear" and currentStructure == 1))
Enhanced CHoCH+:

Requires sequential pivot validation (e.g., higher low after bearish CHoCH).

Step 3: Equilibrium Zones
EQH (Equal Highs): Clusters of 2+ pivot highs within ATR*0.2 range.

EQL (Equal Lows): Clusters of 2+ pivot lows within ATR*0.2 range.

Plotted as dashed lines with labels:

pine
Copy
EQPline := createLine(lastHigh.x, pivotLabel.x, lastHigh.y, pivotLabel.y, color.green, line.style_dashed)
🛠️ Dashboard Features
Multi-Ticker Screener
Symbol: Asset name (e.g., BTC/USDT)

Timeframe: Chart interval analyzed

BOS/CHoCH Status:

Time since last occurrence (e.g., "3 Hours Ago")

Color-coded urgency (green=recent, red=stale)

Structure Strength:
Dashboard Example

🧠 Trading Interpretation
Signal Bullish Scenario Bearish Scenario
BOS Trend continuation Trend continuation
CHoCH Potential bear reversal Potential bull reversal
EQH Resistance cluster Profit-taking zone
EQL Accumulation zone Support cluster
Optimal Use Cases:

Multi-Timeframe Confirmation: Daily BOS + 4H CHoCH alignment

Liquidity Hunting: EQH/EQL zones as stop-run targets

Market Correlation: Compare BTC dominance vs. altcoin structures

⚠️ Critical Warnings
Latency Warning: Higher timeframes update slower - don't use for scalping!

Asset Correlation: Custom tickers must have logical relationships (e.g., BTC + ETH, not BTC + AAPL).

Overload Prevention: >5 active tickers may cause performance issues.

Broker Differences: Futures vs. spot market data discrepancies.

🌟 Advanced Features
Smart Object Management: Auto-removes untouched structures after 200 bars.

Customizable Styles:

pine
Copy
screenerColor = input.color(#1B1F2B, 'Background')
bullishColor = input.color(#089981, 'Bullish')
Multi-Resolution Support: Mix timeframes (e.g., BTC 1D + ETH 4H).

Deep Backtesting: Compatible with TradingView's strategy tester.

📜 Code Architecture
Modular Design: Separates data processing (handleMarketStructures()), visualization (handleDashboard()), and calculations.

Efficient Memory: Uses arrays/objects instead of global variables:

pine
Copy
type marketStructureInfo
labelPlot structureLabel
linePlot structureLine
Dynamic Security Calls:

pine
Copy
[allMarketStructures1] = request.security(ticker1, ticker1TF, allMarketStructures)
✅ Compliance & Publishing
TradingView Rules:

✅ Open-source (MPL 2.0 license header included)

✅ No exaggerated claims ("100% accurate" prohibited)

✅ No paid feature promotion

Screenshot Requirements:

Include 3 annotated examples (different asset classes)

Show dashboard + chart integration

Optimization Checklist:

Test with 10+ chart tabs open

Verify cross-platform mobile/desktop performance

Confirm alert functionality

🔗 Recommended Resources

Video Tutorial (recommended but optional)

Github Repo (for code transparency)

Telegram Group (community support)

Let me know if you need help with visual examples or deeper technical explanations! 🚀

Notes de version
📈 AstroTrading MarketTracker
Multi-Asset Market Structure & Liquidity Zone Screener
Author: Bugra Comez | Version: 1.0 | Category: Market Structure Analysis

🔍 Indicator Overview
This professional-grade tool tracks market structure breaks (BOS/CHoCH), equilibrium zones (EQH/EQL), and liquidity patterns across 5 customizable assets/timeframes. It combines:

Real-time multi-ticker dashboard

ATR-validated pivot points

Break of Structure (BOS) detection

Change of Character (CHoCH) identification

Equilibrium Zones for mean-reversion trading

⚙️ Core Parameters
1. General Settings
maxBoxesCount (500): Max drawn objects on chart (optimizes performance).

maxDistanceToLastBar (750 bars): Limits historical calculation depth.

ATR Length (14): Sensitivity for pivot validation.

2. Structure Detection
BOS Enable: Toggle Break of Structure signals.

CHoCH Enable: Toggle Change of Character signals.

CHoCH+ Enable: Enhanced CHoCH detection.

EQH/EQL Enable: Equilibrium zone tracking.

3. Ticker Configuration
Presets: Preloaded crypto/forex/stocks/futures templates.

Custom Mode:

5 customizable symbols (e.g., BINANCE:BTCUSDT)

Independent timeframes per asset (e.g., 1D, 4H)

Activation toggles for each row

📊 Algorithm Logic
Step 1: Pivot Identification
Uses ATR-filtered pivots to avoid false swings:

pine
Copy
pivotHighNormal = ta.pivothigh(high, 14, 14)
pivotLowNormal = ta.pivotlow(low, 14, 14)
Validates pivots against 233-period SMA for significance.

Step 2: Market Structure Detection
Break of Structure (BOS):

Bullish: Price closes above last significant pivot high

Bearish: Price closes below last significant pivot low

pine
Copy
BOS = ((crossWay == "Bull" and currentStructure == 1) or (crossWay == "Bear" and currentStructure == -1))
Change of Character (CHoCH):

Detects failed breaks indicating trend exhaustion:

pine
Copy
CHoCH = ((crossWay == "Bull" and currentStructure == -1) or (crossWay == "Bear" and currentStructure == 1))
Enhanced CHoCH+:

Requires sequential pivot validation (e.g., higher low after bearish CHoCH).

Step 3: Equilibrium Zones
EQH (Equal Highs): Clusters of 2+ pivot highs within ATR*0.2 range.

EQL (Equal Lows): Clusters of 2+ pivot lows within ATR*0.2 range.

Plotted as dashed lines with labels:

pine
Copy
EQPline := createLine(lastHigh.x, pivotLabel.x, lastHigh.y, pivotLabel.y, color.green, line.style_dashed)
🛠️ Dashboard Features
Multi-Ticker Screener
Symbol: Asset name (e.g., BTC/USDT)

Timeframe: Chart interval analyzed

BOS/CHoCH Status:

Time since last occurrence (e.g., "3 Hours Ago")

Color-coded urgency (green=recent, red=stale)

Structure Strength:
Dashboard Example

🧠 Trading Interpretation
Signal Bullish Scenario Bearish Scenario
BOS Trend continuation Trend continuation
CHoCH Potential bear reversal Potential bull reversal
EQH Resistance cluster Profit-taking zone
EQL Accumulation zone Support cluster
Optimal Use Cases:

Multi-Timeframe Confirmation: Daily BOS + 4H CHoCH alignment

Liquidity Hunting: EQH/EQL zones as stop-run targets

Market Correlation: Compare BTC dominance vs. altcoin structures

⚠️ Critical Warnings
Latency Warning: Higher timeframes update slower - don't use for scalping!

Asset Correlation: Custom tickers must have logical relationships (e.g., BTC + ETH, not BTC + AAPL).

Overload Prevention: >5 active tickers may cause performance issues.

Broker Differences: Futures vs. spot market data discrepancies.

🌟 Advanced Features
Smart Object Management: Auto-removes untouched structures after 200 bars.

Customizable Styles:

pine
Copy
screenerColor = input.color(#1B1F2B, 'Background')
bullishColor = input.color(#089981, 'Bullish')
Multi-Resolution Support: Mix timeframes (e.g., BTC 1D + ETH 4H).

Deep Backtesting: Compatible with TradingView's strategy tester.

📜 Code Architecture
Modular Design: Separates data processing (handleMarketStructures()), visualization (handleDashboard()), and calculations.

Efficient Memory: Uses arrays/objects instead of global variables:

pine
Copy
type marketStructureInfo
labelPlot structureLabel
linePlot structureLine
Dynamic Security Calls:

pine
Copy
[allMarketStructures1] = request.security(ticker1, ticker1TF, allMarketStructures)
✅ Compliance & Publishing
TradingView Rules:

✅ Open-source (MPL 2.0 license header included)

✅ No exaggerated claims ("100% accurate" prohibited)

✅ No paid feature promotion

Screenshot Requirements:

Include 3 annotated examples (different asset classes)

Show dashboard + chart integration

Optimization Checklist:

Test with 10+ chart tabs open

Verify cross-platform mobile/desktop performance

Confirm alert functionality

🔗 Recommended Resources

Video Tutorial (recommended but optional)

Github Repo (for code transparency)

Telegram Group (community support)

Let me know if you need help with visual examples or deeper technical explanations! 🚀

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.