Sideways Zone Breakout 📘 Sideways Zone Breakout – Indicator Description
Sideways Zone Breakout is a visual market-structure indicator designed to identify low-volatility consolidation zones and highlight potential breakout opportunities when price exits these zones.
This indicator focuses on detecting periods where price trades within a tight range, often referred to as sideways or consolidation phases, and visually marks these zones directly on the chart for clarity.
🔍 Core Concept
Markets often spend time moving sideways before making a directional move.
This indicator aims to:
Detect price compression
Visually highlight the sideways zone
Signal when price breaks above or below the zone boundaries
Instead of predicting direction, it simply reacts to range expansion after consolidation.
⚙️ How the Indicator Works
1️⃣ Sideways Zone Detection
The indicator looks back over a user-defined number of candles
It calculates the highest high and lowest low within that window
If the total price range remains within a defined percentage of the current price, the market is considered sideways
This helps filter out trending and highly volatile conditions.
2️⃣ Visual Zone Representation
When a sideways condition is detected:
A clear price zone is drawn between the recent high and low
The zone is displayed using a soft gradient fill for better visibility
Outer borders are added to enhance zone clarity without cluttering the chart
This makes consolidation areas easy to spot at a glance.
3️⃣ Breakout Identification
Once a sideways zone is active:
A bullish breakout is marked when price closes above the upper boundary
A bearish breakout is marked when price closes below the lower boundary
Directional arrows and labels are plotted directly on the chart to indicate these events.
📊 Visual Elements Included
Sideways consolidation zones with gradient fill
Upper and lower zone boundaries
Buy and Sell arrows on breakout
Optional text labels for clear interpretation
All visuals are designed to remain lightweight and readable on any chart theme.
🔧 User Inputs
Sideways Lookback (candles): Controls how many past candles are used to define the range
Max Range % (tightness): Determines how tight the range must be to qualify as sideways
Adjusting these inputs allows users to adapt the indicator to different instruments and timeframes.
📈 Usage Guidelines
Can be applied to any market or timeframe
Works well as a context or confirmation tool
Best used alongside volume, trend, or risk management tools
Signals should be validated with proper trade planning
⚠️ Disclaimer
This indicator is provided as open-source for educational and analytical purposes only.
It does not generate trade recommendations or guarantee outcomes.
Market conditions vary, and users are responsible for their own trading decisions.
Statistics
Z-Score & StatsThis is an advanced indicator that measures price deviation from its mean using statistical z-scores, combined with multiple analytical features for trading signals.
Core Functionality-
Z-Score Calculation Engine:
The indicator uses a custom standardization function that calculates how many standard deviations the current price is from its rolling mean. Unlike simple moving averages, this provides a normalized view of price extremes. The calculation maintains a sliding window of data points, efficiently updating mean and variance values as new data arrives while removing old data points. This approach handles missing values gracefully and uses sample variance (rather than population variance) for more accurate statistical measurements.
Statistical Zones & Visual Framework:
The indicator creates a visual representation of statistical probability zones:
±1 Standard Deviation: Encompasses about 68% of normal price behavior (green zone)
±2 Standard Deviations: Covers approximately 95% of price movements (orange zone)
±3 Standard Deviations: Represents 99.7% probability range (red zone)
±3.5 and ±4 Thresholds: Extreme outlier levels that trigger special alerts
The z-score line changes color dynamically based on which zone it occupies, making it easy to identify the current market extremity at a glance.
Advanced Features:
Volume Contraction Analysis
The script monitors volume patterns to identify periods of reduced trading activity. It compares current volume against a moving average and flags when volume drops below a specified threshold (default 70%). Volume contraction often precedes significant price moves and is factored into the optimal entry detection system.
Momentum-Based Direction Model:
Rather than just showing current z-score levels, the indicator projects where the z-score is likely to move based on recent momentum. It calculates the rate of change in the z-score and extrapolates forward for a specified number of bars. This creates a directional arrow that indicates whether conditions are bullish (negative z-score with upward momentum) or bearish (positive z-score with downward momentum).
Divergence Detection System:
The script automatically identifies four types of divergences between price action and z-score behavior :-
Regular Bullish Divergence: Price makes lower lows while z-score makes higher lows, suggesting weakening downward pressure
Regular Bearish Divergence: Price makes higher highs while z-score makes lower highs, indicating exhaustion in the uptrend
Hidden Bullish Divergence: Price makes higher lows while z-score makes lower lows, confirming trend continuation in an uptrend
Hidden Bearish Divergence: Price makes lower highs while z-score makes higher highs, confirming downtrend continuation
The system uses pivot detection with configurable lookback periods and distance requirements, then draws connecting lines and labels directly on the chart when divergences occur.
Yearly Statistics Tracking:
The indicator maintains historical records of maximum z-score deviations over yearly periods (configurable bar count). This provides context by showing whether current extremes are unusual compared to typical annual ranges. The average yearly maximum helps traders understand if the current market is exhibiting normal volatility or exceptional conditions.
Mean Reversion Probability:
Based on the current z-score magnitude, the indicator calculates and displays the statistical probability that price will revert toward the mean. Higher absolute z-scores indicate stronger mean reversion probabilities, ranging from 38% at ±0.5 standard deviations to 99.7% at ±3 standard deviations.
Comprehensive Statistics Table:
A customizable on-chart table displays real-time statistics including:
Current z-score value with directional indicator
Predicted z-score based on momentum
Current year's maximum absolute z-score
Historical average yearly maximum
Mean reversion probability percentage
Zone status classification (Normal, Moderate, High, Extreme)
Directional bias (Bullish, Bearish, Neutral)
Active divergence status
Volume contraction status with ratio
Optimal setup detection (combining extreme z-scores with volume contraction)
Optimal Entry Setup Detection:
The most sophisticated feature identifies high-probability trading setups by combining multiple factors. An "Optimal Long" signal triggers when z-score reaches -3.5 or below AND volume is contracted. An "Optimal Short" signal appears when z-score exceeds +3.5 AND volume is contracted. This combination suggests extreme price deviation occurring on low volume, often preceding strong reversals.
Alert System:
The script includes a unified alert mechanism that triggers when z-score crosses specific thresholds:
Crossing above/below ±3.5 standard deviations (extreme levels)
Crossing above/below ±4 standard deviations (critical levels)
Alerts fire once per bar with confirmation (previous bar must be on opposite side of threshold) to avoid false signals.
Practical Application:
This indicator is designed for mean reversion traders who seek statistically significant price extremes. The combination of z-score measurement, volume analysis, momentum projection, and divergence detection creates a multi-layered confirmation system. Traders can use extreme z-scores as potential reversal zones, while the direction model and divergence signals help time entries more precisely. The volume contraction filter adds an additional layer of confluence, identifying moments when reduced participation may precede explosive moves back toward the mean.
Chart Attached: NSE GMR Airports, EoD 12/12/25
DISCLAIMER: This information is provided for educational purposes only and should not be considered financial, investment, or trading advice.Happy Trading
USDT Market Cap Change [Alpha Extract]A sophisticated stablecoin market analysis tool that tracks USDT market capitalization changes across daily and 60-day periods with statistical normalization and gradient intensity visualization. Utilizing z-score methodology for overbought/oversold detection and dynamic color gradients reflecting change magnitude, this indicator delivers institutional-grade market liquidity assessment through stablecoin flow analysis. The system's dual-timeframe approach combined with statistical normalization provides comprehensive market sentiment measurement based on capital inflows and outflows from the dominant stablecoin.
🔶 Advanced Market Cap Tracking Framework
Implements daily USDT market capitalization monitoring with dual-period change calculations measuring both 1-day and 60-day net capital flows. The system retrieves real-time CRYPTOCAP:USDT data on daily timeframe resolution, calculating absolute dollar changes to quantify stablecoin supply expansion or contraction as primary market liquidity indicator.
// Core Market Cap Analysis
USDT = request.security("CRYPTOCAP:USDT", "D", close)
USDT_60D_Change = USDT - USDT
USDT_1D_Change = USDT - USDT
🔶 Dynamic Gradient Intensity System
Features sophisticated color gradient engine that intensifies visual representation based on change magnitude relative to recent extremes. The system normalizes current 60-day change against configurable lookback period maximum, applying gradient strength calculation to transition colors from neutral tones through progressively intense blues (negative) or reds (positive) based on flow direction and magnitude.
🔶 Statistical Z-Score Normalization Engine
Implements comprehensive z-score calculation framework that normalizes 60-day market cap changes using rolling mean and standard deviation for objective overbought/oversold determination. The system applies statistical normalization over configurable periods, enabling cross-temporal comparison and threshold-based regime identification independent of absolute market cap levels.
// Z-Score Normalization
Change_Mean = ta.sma(USDT_60D_Change, Normalization_Length)
Change_StdDev = ta.stdev(USDT_60D_Change, Normalization_Length)
Z_Score = Change_StdDev > 0 ? (USDT_60D_Change - Change_Mean) / Change_StdDev : 0.0
🔶 Multi-Tier Threshold Detection System
Provides four-level regime classification including standard overbought (+1.5σ), standard oversold (-1.5σ), extreme overbought (+2.5σ), and extreme oversold (-2.5σ) thresholds with configurable adjustment. The system identifies market liquidity extremes when stablecoin inflows or outflows reach statistically significant levels, indicating potential market turning points or trend exhaustion.
🔶 Dual-Timeframe Flow Visualization
Features layered area plots displaying both 60-day strategic flows and 1-day tactical movements with distinct color coding for instant flow direction assessment. The system overlays short-term daily changes on longer-term 60-day trends, enabling traders to identify divergences between tactical and strategic capital flows into or out of stablecoin reserves.
🔶 Gradient Color Psychology Framework
Implements intuitive color scheme where red gradients indicate capital inflow (bullish for crypto as USDT supply expands for buying) and blue gradients show capital outflow (bearish as USDT is redeemed). The intensity progression from pale to vivid colors communicates flow magnitude, with extreme colors signaling statistically significant liquidity events requiring attention.
🔶 Background Zone Highlighting System
Provides subtle background coloring when z-score breaches overbought or oversold thresholds, creating visual alerts without obscuring primary data. The system applies translucent red backgrounds during overbought conditions and blue during oversold states, enabling instant regime recognition across chart timeframes.
🔶 Configurable Normalization Architecture
Features adjustable gradient lookback and statistical normalization periods enabling optimization across different market cycles and trading timeframes. The system allows traders to calibrate sensitivity by modifying the window used for maximum change detection (gradient) and mean/standard deviation calculation (z-score), adapting to volatile or stable market regimes.
🔶 Market Liquidity Interpretation Framework
Tracks USDT supply changes as proxy for overall cryptocurrency market liquidity conditions, where expanding market cap indicates fresh capital entering crypto markets and contracting cap suggests capital flight. The system provides leading indicator properties as large stablecoin inflows often precede major market rallies while outflows may signal distribution phases.
🔶 Why Choose USDT Market Cap Change ?
This indicator delivers sophisticated stablecoin flow analysis through statistical normalization and gradient visualization of USDT market capitalization changes. Unlike traditional market sentiment indicators that rely on price action alone, this tool measures actual capital flows through the dominant stablecoin, providing objective assessment of market liquidity conditions. The combination of dual-timeframe tracking, z-score normalization for overbought/oversold detection, and intensity-based gradient coloring makes it essential for traders seeking macro-level market assessment and regime change detection across cryptocurrency markets. The indicator excels at identifying liquidity extremes that often precede major market reversals or trend accelerations.
Index Construction Tool🙏🏻 The most natural mathematical way to construct an index || portfolio, based on contraharmonic mean || contraharmonic weighting. If you currently traded assets do not satisfy you, why not make your own ones?
Contraharmonic mean is literally a weighted mean where each value is weighted by itself.
...
Now let me explain to you why contraharmonic weighting is really so fundamental in two ways: observation how the industry (prolly unknowably) converged to this method, and the real mathematical explanation why things are this way.
How it works in the industry.
In indexes like TVC:SPX or TVC:DJI the individual components (stocks) are weighted by market capitalization. This market cap is made of two components: number of shares outstanding and the actual price of the stock. While the number of shares holds the same over really long periods of time and changes rarely by corporate actions , the prices change all the time, so market cap is in fact almost purely based on prices itself. So when they weight index legs by market cap, it really means they weight it by stock prices. That’s the observation: even tho I never dem saying they do contraharmonic weighting, that’s what happens in reality.
Natural explanation
Now the main part: how the universe works. If you build a logical sequence of how information ‘gradually’ combines, you have this:
Suppose you have the one last datapoint of each of 4 different assets;
The next logical step is to combine these datapoints somehow in pairs. Pairs are created only as ratios , this reveals relationships between components, this is the only step where these fundamental operations are meaningful, they lose meaning with 3+ components. This way we will have 16 pairs: 4 of them would be 1s, 6 real ratios, and 6 more inverted ratios of these;
Then the next logical step is to combine all the pairs (not the initial single assets) all together. Naturally this is done via matrices, by constructing a 4x4 design matrix where each cell will be one of these 16 pairs. That matrix will have ones in the main diagonal (because these would be smth like ES/ES, NQ/NQ etc). Other cells will be actual ratios, like ES/NQ, RTY/YM etc;
Then the native way to compress and summarize all this structure is to do eigendecomposition . The only eigenvector that would be meaningful in this case is the principal eigenvector, and its loadings would be what we were hunting for. We can multiply each asset datapoint by corresponding loading, sum them up and have one single index value, what we were aiming for;
Now the main catch: turns out using these principal eigenvector loadings mathematically is Exactly the same as simply calculating contraharmonic weights of those 4 initial assets. We’re done here.
For the sceptics, no other way of constructing the design matrix other than with ratios would result in another type of a defined mean. Filling that design matrix with ratios Is the only way to obtain a meaningful defined mean, that would also work with negative numbers. I’m skipping a couple of details there tbh, but they don’t really matter (we don’t need log-space, and anyways the idea holds even then). But the core idea is this: only contraharmonic mean emerges there, no other mean ever does.
Finally, how to use the thing:
Good news we don't use contraharmonic mean itself because we need an internals of it: actual weights of components that make this contraharmonic mean, (so we can follow it with our position sizes). This actually allows us to also use these weights but not for addition, but for subtraction. So, the script has 2 modes (examples would follow):
Addition: the main one, allows you to make indexes, portfolios, baskets, groups, whatever you call it. The script will simply sum the weighted legs;
Subtraction: allows you to make spreads, residual spreads etc. Important: the script will subtract all the symbols From the first one. So if the first we have 3 symbols: YM, ES, RTY, the script will do YM - ES - RTY, weights would be applied to each.
At the top tight corner of the script you will see a lil table with symbols and corresponding weights you wanna trade: these are ‘already’ adjusted for point value of each leg, you don’t need to do anything, only scale them all together to meet your risk profile.
Symbols have to be added the way the default ones are added, one line : one symbol.
Pls explore the script’s Style setting:
You can pick a visualization method you like ! including overlays on the main chart pane !
Script also outputs inferred volume delta, inferred volume and inferred tick count calculated with the same method. You can use them in further calculations.
...
Examples of how you can use it
^^ Purple dotted line: overlay from ICT script, turned on in Style settings, the contraharmonic mean itself calculated from the same assets that are on the chart: CME_MINI:RTY1! , CME_MINI:ES1! , CME_MINI:NQ1! , CBOT_MINI:YM1!
^^ precious metals residual spread ( COMEX:GC1! COMEX:SI1! NYMEX:PL1! )
^^ CBOT:ZC1! vs CBOT:ZW1! grain spread
^^ BDI (Bid Dope Index), constructed from: NYSE:MO , NYSE:TPB , NYSE:DGX , NASDAQ:JAZZ , NYSE:IIPR , NASDAQ:CRON , OTC:CURLF , OTC:TCNNF
^^ NYMEX:CL1! & ICEEUR:BRN1! basket
^^ resulting index price, inferred volume delta, inferred volume and inferred tick count of CME_MINI:NQ1! vs CME_MINI:ES1! spread
...
Synthetic assets is the whole new Universe you can jump into and never look back, if this is your way
...
∞
SigmaFlowSigmaFlow is a professional signal management connector designed to work with the SigmaFlow app. This indicator allows traders to structure trade setups (Entry, Stop Loss, TP1, TP2) on TradingView and send them into the SigmaFlow platform, where signals are managed, tracked, and delivered to Telegram.
Professional signal management — from TradingView to Telegram.
How SigmaFlow Works:
Sends trade data from TradingView to Telegram via the SigmaFlow platform.
SigmaFlow handles signal management, organization, history tracking, performance metrics, and Telegram delivery.
What It Does NOT Do:
Does not generate trading signals
Does not provide investment advice
Does not execute trades
Requirements:
TradingView plan with webhook alerts*
Active SigmaFlow account*
Disclaimer
SigmaFlow is a signal management and delivery tool only. All trade ideas are created manually by users. Trading involves risk and past performance does not guarantee future results.
Simple Candle Strategy# Candle Pattern Strategy - Pine Script V6
## Overview
A TradingView trading strategy script (Pine Script V6) that identifies candlestick patterns over a configurable lookback period and generates trading signals based on pattern recognition rules.
## Strategy Logic
The strategy analyzes the most recent N candlesticks (default: 5) and classifies their patterns into three categories, then generates buy/sell signals based on specific pattern combinations.
### Candlestick Pattern Classification
Each candlestick is classified as one of three types:
| Pattern | Definition | Formula |
|---------|-----------|---------|
| **Close at High** | Close price near the highest price of the candle | `(high - close) / (high - low) ≤ (1 - threshold)` |
| **Close at Low** | Close price near the lowest price of the candle | `(close - low) / (high - low) ≤ (1 - threshold)` |
| **Doji** | Opening and closing prices very close; long upper/lower wicks | `abs(close - open) / (high - low) ≤ threshold` |
### Trading Rules
| Condition | Action | Signal |
|-----------|--------|--------|
| Number of Doji candles ≥ 3 | **SKIP** - Market is too chaotic | No trade |
| "Close at High" count ≥ 2 + Last candle closes at high | **LONG** - Bullish confirmation | Buy Signal |
| "Close at Low" count ≥ 2 + Last candle closes at low | **SHORT** - Bearish confirmation | Sell Signal |
## Configuration Parameters
All parameters are adjustable in TradingView's "Settings/Inputs" tab:
| Parameter | Default | Range | Description |
|-----------|---------|-------|-------------|
| **K-line Lookback Period** | 5 | 3-20 | Number of candlesticks to analyze |
| **Doji Threshold** | 0.1 | 0.0-1.0 | Body size / Total range ratio for doji identification |
| **Doji Count Limit** | 3 | 1-10 | Number of dojis that triggers skip signal |
| **Close at High Proximity** | 0.9 | 0.5-1.0 | Required proximity to highest price (0.9 = 90%) |
| **Close at Low Proximity** | 0.9 | 0.5-1.0 | Required proximity to lowest price (0.9 = 90%) |
### Parameter Tuning Guide
#### Proximity Thresholds (Close at High/Low)
- **0.95 or higher**: Stricter - only very strong candles qualify
- **0.90 (default)**: Balanced - good for most market conditions
- **0.80 or lower**: Looser - catches more patterns, higher false signals
#### Doji Threshold
- **0.05-0.10**: Strict doji identification
- **0.10-0.15**: Standard doji detection
- **0.15+**: Includes near-doji patterns
#### Lookback Period
- **3-5 bars**: Fast, sensitive to recent patterns
- **5-10 bars**: Balanced approach
- **10-20 bars**: Slower, filters out noise
## Visual Indicators
### Chart Markers
- **Green Up Arrow** ▲: Long entry signal triggered
- **Red Down Arrow** ▼: Short entry signal triggered
- **Gray X**: Skip signal (too many dojis detected)
### Statistics Table
Located at top-right corner, displays real-time pattern counts:
- **Close at High**: Count of candles closing near the high
- **Close at Low**: Count of candles closing near the low
- **Doji**: Count of doji/near-doji patterns
### Signal Labels
- Green label: "✓ Long condition met" - below entry bar
- Red label: "✓ Short condition met" - above entry bar
- Gray label: "⊠ Too many dojis, skip" - trade skipped
## Risk Management
### Exit Strategy
The strategy includes built-in exit rules based on ATR (Average True Range):
- **Stop Loss**: ATR × 2
- **Take Profit**: ATR × 3
Example: If ATR is $10, stop loss is at -$20 and take profit is at +$30
### Position Sizing
Default: 100% of equity per trade (adjustable in strategy properties)
**Recommendation**: Reduce to 10-25% of equity for safer capital allocation
## How to Use
### 1. Copy the Script
1. Open TradingView
2. Go to Pine Script Editor
3. Create a new indicator
4. Copy the entire `candle_pattern_strategy.pine` content
5. Click "Add to Chart"
### 2. Apply to Chart
- Select your preferred timeframe (1m, 5m, 15m, 1h, 4h, 1d)
- Choose a trading symbol (stocks, forex, crypto, etc.)
- The strategy will generate signals on all historical bars and in real-time
### 3. Configure Parameters
1. Right-click the strategy on chart → "Settings"
2. Adjust parameters in the "Inputs" tab
3. Strategy will recalculate automatically
4. Backtest results appear in the Strategy Tester panel
### 4. Backtesting
1. Click "Strategy Tester" (bottom panel)
2. Set date range for historical testing
3. Review performance metrics:
- Win rate
- Profit factor
- Drawdown
- Total returns
## Key Features
✅ **Execution Model Compliant** - Follows official Pine Script V6 standards
✅ **Global Scope** - All historical references in global scope for consistency
✅ **Adjustable Sensitivity** - Fine-tune all pattern detection thresholds
✅ **Real-time Updates** - Works on both historical and real-time bars
✅ **Visual Feedback** - Clear signals with labels and statistics table
✅ **Risk Management** - Built-in ATR-based stop loss and take profit
✅ **No Repainting** - Signals remain consistent after bar closes
## Important Notes
### Before Trading Live
1. **Backtest thoroughly**: Test on at least 6-12 months of historical data
2. **Paper trading first**: Practice with simulated trades
3. **Optimize parameters**: Find the best settings for your trading instrument
4. **Manage risk**: Never risk more than 1-2% per trade
5. **Monitor performance**: Review trades regularly and adjust as needed
### Market Conditions
The strategy works best in:
- Trending markets with clear directional bias
- Range-bound markets with defined support/resistance
- Markets with moderate volatility
The strategy may underperform in:
- Highly choppy/noisy markets (many false signals)
- Markets with gaps or overnight gaps
- Low liquidity periods
### Limitations
- Works on chart timeframes only (not intrabar analysis)
- Requires at least 5 bars of history (configurable)
- Fixed exit rules may not suit all trading styles
- No trend filtering (will trade both directions)
## Technical Details
### Historical Buffer Management
The strategy declares maximum bars back to ensure enough historical data:
```pine
max_bars_back(close, 20)
max_bars_back(open, 20)
max_bars_back(high, 20)
max_bars_back(low, 20)
```
This prevents runtime errors when accessing historical candlestick data.
### Pattern Detection Algorithm
```
For each bar in lookback period:
1. Calculate (high - close) / (high - low) → close_to_high_ratio
2. If close_to_high_ratio ≤ (1 - threshold) → count as "Close at High"
3. Calculate (close - low) / (high - low) → close_to_low_ratio
4. If close_to_low_ratio ≤ (1 - threshold) → count as "Close at Low"
5. Calculate abs(close - open) / (high - low) → body_ratio
6. If body_ratio ≤ doji_threshold → count as "Doji"
Signal Generation:
7. If doji_count ≥ cross_count_limit → SKIP_SIGNAL
8. If close_at_high_count ≥ 2 AND last_close_at_high → LONG_SIGNAL
9. If close_at_low_count ≥ 2 AND last_close_at_low → SHORT_SIGNAL
```
## Example Scenarios
### Scenario 1: Bullish Signal
```
Last 5 bars pattern:
Bar 1: Closes at high (95%) ✓
Bar 2: Closes at high (92%) ✓
Bar 3: Closes at mid (50%)
Bar 4: Closes at low (10%)
Bar 5: Closes at high (96%) ✓ (last bar)
Result:
- Close at high count: 3 (≥ 2) ✓
- Last closes at high: ✓
- Doji count: 0 (< 3) ✓
→ LONG SIGNAL ✓
```
### Scenario 2: Skip Signal
```
Last 5 bars pattern:
Bar 1: Doji pattern ✓
Bar 2: Doji pattern ✓
Bar 3: Closes at mid
Bar 4: Doji pattern ✓
Bar 5: Closes at high
Result:
- Doji count: 3 (≥ 3)
→ SKIP SIGNAL - Market too chaotic
```
## Performance Optimization
### Tips for Better Results
1. **Use Higher Timeframes**: 15m or higher reduces false signals
2. **Combine with Indicators**: Add volume or trend filters
3. **Seasonal Adjustment**: Different parameters for different seasons
4. **Instrument Selection**: Test on liquid, high-volume instruments
5. **Regular Rebalancing**: Adjust parameters quarterly based on performance
## Troubleshooting
### No Signals Generated
- Check if lookback period is too large
- Verify proximity thresholds aren't too strict (try 0.85 instead of 0.95)
- Ensure doji limit allows for trading (try 4-5 instead of 3)
### Too Many False Signals
- Increase proximity thresholds to 0.95+
- Reduce lookback period to 3-4 bars
- Increase doji limit to 3-4
- Test on higher timeframes
### Strategy Tester Shows Losses
- Review individual trades to identify patterns
- Adjust stop loss and take profit ratios
- Change lookback period and thresholds
- Test on different market conditions
## References
- (www.tradingview.com)
- (www.tradingview.com)
- (www.investopedia.com)
- (www.investopedia.com)
## Disclaimer
**This strategy is provided for educational and research purposes only.**
- Not financial advice
- Past performance does not guarantee future results
- Always conduct thorough backtesting before live trading
- Trading involves significant risk of loss
- Use proper risk management and position sizing
## License
Created: December 15, 2025
Version: 1.0
---
**For updates and modifications, refer to the accompanying documentation files.**
Magical Thirteen Turns - The Greedy SnakeThe number 9 appears:
Meaning: Warning signal. The rise may encounter resistance and a cautious pullback is about to begin.
Operation: Consider reducing your holdings (selling a portion) to lock in profits and avoid experiencing wild fluctuations.
The number 13 appears:
Meaning: Strong sell signal. The upward momentum is likely to be exhausted, which is also known as "bull exhaustion".
Operation: It is recommended to liquidate your positions or significantly reduce them. Short sell (if you are trading contracts).
Vertical Time LinesVertical Time Lines is an indicator that draws vertical lines at specific times of each day on the price chart.
⚙️ Main Features
Up to 5 independent time lines
Precise hour and minute editing (HH:MM)
Individual enable/disable option per line
Customizable line color and style
Works on any asset and any timeframe
📝 Note
Due to Pine Script limitations, the lines are drawn using UTC time, not the time zone configured on the chart.
Lines are generated only when a candle exists exactly at the configured minute. If candles for the specified hours and minutes are not visible on the chart, the lines will not be displayed.
Pair Creation🙏🏻 The one and only pair construction tech you need, unlike others:
Applies one consistent operation to all the data features (not only prices). Then, the script outputs these, so you can apply other calculations on these outputs.
calculates a very fast and native volatility based hedge ratio, that also takes into account point value (think SPY vs ES) so you can easily use it in position sizing
Has built-in forward pricing aka cost of carry model , so you can de-drift pairs from cost of carry, discover spot price of oil based on futures, and ofc find arbitrage opportunities
Also allows to make a pair as a product of 2 series, useful for triangular arbitrage
This script can make a pair in 2 ways:
Ratio, by dividing leg 1 by leg 2
Product, by multiplying leg 1 by leg 2
The real mathematically right way to construct a pair is a ratio/product (Spreads are in fact = 2 legged portfolio, but I ain't told ya that ok). Why? Because a pair of 2 entities has a mathematically unique beauty, it allows direct comparisons and relationship analysis, smth you can't do directly with 3 and more components.
Multiplication (think inversions like (EURUSD -> USDEUR), and use cases for triangular arbitrage) is useful sometimes too.
...
Quickguide:
First, "Legs" are pair components: make a pair of related assets. Don’t be guided exclusively by clustering, cointegrations, mutual information etc. Common sense and exogenous info can easily made them all Forward pricing model: is useful when u work with spot vs futures pairs. Otherwise: put financing, storage and yield all on zeros, this way u will turn it off and have a pure ratio/product of 2 legs.
Look at the 2 numbers on the script’s status line: the first one would always be 1), and the second one is a variable.
First number (always 1) is multiplier for your position size on leg 1
The second number is the multiplier for your position size on leg 2 in the opposite direction.
If both legs are related, trading your sizes with these multipliers makes you do statistical arbitrage -> trading ~ volatility in risk free mode, while the relationship between the assets is still in place.
Also guys srsly, nobody ‘ever’ made a universal law that somewhy somehow for whatever secret conspiracy reason one shall only trade pairs in mean reverting style xd. You can do whatever you want:
Tilt hedge ratio significantly based on relative strength of legs
Trade the pair in momentum style
Ignore hedge ratio all together
And more and more, the limit is your imagination, e.g.:
Anticipate hedge ratio changes based on exogenous info and act accordingly
Scalp a pair just like any other asset
Make a pair out of 2 pairs
Like I mean it, whatever you desire
About forward pricing model:
It’s applied only to leg 2;
Direct: takes spot price and finds out implied futures price
Inverse: takes futures price and finds out implied spot price (try on oil)
Pls read online how to choose parameters, it’s open access reliable info
About the hedge ratio I use:
You prolly noticed the way I prefer to use inferred volumes vs the “real” ones. In pairs it’s especially meaningful, because real volumes lose sense in pair creation. And while volumes are closely tied to volatility, the inferred volumes ‘Are’ volatility irl (and later can be converted to currency space by using point value, allowing direct comparisons symbol vs symbol).
This hedge ratio is a good example of how discovering the real nature of entities beats making 100s of inventions, why domain knowledge and proper feature engineering beats difficult bulky models, neural networks etc. How simple data understanding & operations on it is all you need.
This script simply does this:
Takes inferred volume delta of both assets, makes a ratio, normalizes it by tick sizes and points values of both legs, calculates a typical value of this series.
That’s it, no step 2, we’re done. No Kalman filters, no TLS regression, no vine copulas, or whatever new fancy keywords you can come up with etc.
...
^^ comparing real ES prices vs theoretical ones by forward-pricing model. Financing: 0.04, yield 0.0175
^^ EURUSD, 6E futures with theoretical futures price calculated with interest rate differential 0.02 (4% USD - 2% EUR interest rates)
^^4 different pairs (RTY/ES, YM/ES, NQ/ES, ES/ZN) each with different plot style (pick one you like in script's Style settings)
^^ YM/RTY pair, each plot represents ratio of different features: ratio of prices, ratio of inferred volume deltas, ratio of inferred volumes, ratio of inferred tick counts (also can be turned on/off in Style settings)
...
How can u upgrade it and make a step forward yourself:
On tradingview missing values are automatically fixed by backfilling, and this never becomes a thing until you hit high frequency data. You can do better and use Kalman filter for filling missing values.
Script contains the functions I use everywhere to calculate inferred volume delta, inferred volume, and inferred tick count.
...
∞
Golden Volume Lines📌 Golden Volume — Lines (Golden Team)
Golden Volume — Lines is an advanced volume-based indicator that detects Ultra High Volume candles using a statistical percentile model, then automatically draws and tracks key price levels derived from those candles.
The indicator highlights where real market interest and liquidity appear and shows how price reacts when those levels are broken.
🔍 How It Works
Volume Measurement
Choose between:
Units (raw volume)
Money (Volume × Average Price)
Average price can be calculated using HL2 or OHLC4.
Percentile-Based Classification
Volume is classified into:
Medium
High
Ultra High Volume
Thresholds are calculated using a rolling percentile window.
Ultra Volume candles are colored orange.
Dynamic High & Low Levels
For every Ultra Volume candle:
A High and Low dotted line is drawn.
Lines extend to the right until price breaks them.
Smart Line Break Detection (Wick-Based)
A line is considered broken when price wicks through it.
When a break occurs:
🟧 Orange line → broken by an Ultra Volume candle
⚪ White line → broken by a normal candle
The line stops exactly at the breaking candle.
🔔 Alerts
Alert on Ultra High Volume candles
Alert when a High or Low line is broken
Separate alerts for:
Break by Ultra Volume candle
Break by Normal candle
🎯 Use Cases
Breakout & continuation confirmation
Liquidity sweep detection
Volume-validated support & resistance
Market reaction after extreme participation
⚙️ Key Inputs
Volume display mode (Units / Money)
Percentile thresholds
Lookback window size
Maximum number of active Ultra levels
Optional dynamic alerts
⚠️ Disclaimer
This indicator is a volume and market structure tool, not a standalone trading system.
Always use proper risk management and additional confirmation.
Trinity Real Move Detector DashboardRelease Notes (critical)
1. This code "will" require tweaks for different timeframes to the multiplier, do not assume the data in the table is accurate, cross check it with the Trinity Real Move Detector or another ATR tool, to validate the values in the table and ensure you have set the correct values.
2. I mention this below. But please understand that pine code has a limitation in the number of security calls (40 request.security() calls per script). This code is on the limit of that threshold and I would encourage developers to see if they can find a way around this to improve the script and release further updates.
What do we have...
The Trinity Real Move Detector Dashboard is a powerful TradingView indicator designed to scan multiple assets at once and show when each one has genuine short-term volatility "energy" — the kind that makes directional options trades (especially 0DTE or short-dated) have a high probability of follow-through, and can be used for swing trading as well. It combines a simple ATR-based volatility filter with a SuperTrend-style bias to tell you not only if the market is "awake" but also in which direction the momentum is leaning.
At its core, the indicator calculates the current ATR on your chosen timeframe and compares it to a user-defined percentage of the asset's daily ATR. When the short-term ATR spikes above that threshold, it signals "enough energy" — meaning the underlying is moving with real force rather than choppy noise. The SuperTrend logic then determines bullish or bearish bias, so the status shows "BULLISH ENERGY" (green) or "BEARISH ENERGY" (red) when energy is on, or "WAIT" when it's not. It also counts how many bars the energy has been active and shows the current ATR vs threshold for quick visual confirmation.
The dashboard displays all this in a clean table with columns for Symbol, Multiplier, Current ATR, Threshold, Status, Bars Active, and Bias (UP/DOWN). It's perfect for 3-minute charts but works on any timeframe — just adjust the multiplier based on the hints in the settings.
Editing symbols and multipliers is straightforward and user-friendly. In the indicator settings, you'll see numbered inputs like "1. Symbol - NVDA" and "1. Multiplier". To change an asset, simply type the new ticker in the symbol field (e.g., replace "NVDA" with "TSLA", "AVGO", or "ADAUSD"). You can also adjust the multiplier for each asset individually in the corresponding "Multiplier" field to make it more or less sensitive — lower numbers give more signals, higher numbers give stricter, higher-quality ones. This lets you customize the dashboard to your watchlist without any coding. For example, if you switch to a 4-hour chart or a slower-moving stock like AVGO, you may need to raise the multiplier (e.g., to 0.3–0.4) to avoid false "bullish" signals during minor bounces in a larger downtrend.
One important note about the multiplier and timeframes: the default values are optimized for fast intraday charts (like 3-minute or 5-minute). On higher timeframes (15-minute, 1-hour, 4-hour, or daily), the SuperTrend bias can be too sensitive with low multipliers (1.0 default in the code), leading to situations like the AVGO 4-hour example — where price is clearly downtrending, but the dashboard shows "BULLISH ENERGY" because the tight bands flip on small bounces. To fix this, you need to manually increase the multiplier for that asset (or all assets) in the settings. For 4-hour or daily charts, 0.25–0.35 is often better to match smoother SuperTrend indicators like Trinity. Always test on your timeframe and asset — crypto usually needs slightly lower multipliers than stocks due to higher volatility.
TradingView has a hard limit of 40 request.security() calls per script. Each asset in the dashboard requires several calls (current ATR, daily ATR, SuperTrend components, etc.), so with the full ATR-based bias, you can safely monitor about 6–8 assets before hitting the limit. Adding more symbols increases the number of calls and will trigger the "too many securities" error. This is a platform restriction to prevent excessive server load, and there's no official way around it in a single script. Some advanced coders use tricks like caching or lower-timeframe requests to squeeze in a few more, but for reliability, sticking to 6–8 assets is recommended. If you need more, the common workaround is to create two separate indicators (e.g., one for stocks, one for crypto) and add both to the same chart.
Overall, this dashboard gives you a professional-grade multi-asset scanner that filters out low-energy noise and highlights real momentum opportunities across stocks and crypto — all in one glance. It's especially valuable for options traders who want to avoid theta decay on weak moves and only strike when the market has true fuel. By tweaking the per-symbol multipliers in the settings, you can perfectly adapt it to any timeframe or asset behavior, avoiding issues like the AVGO false bullish signal on higher timeframes.
Probability-Based Adaptive Detection🙏🏻 PBAD (Probability-Based Adaptive Detection) : adaptive control tool for outliers || novelty detection, made for worst case data & processes, for the highest time complexity O(n^2) compared with the alternatives (would be explained in a sec). Thresholds are completely data driven and axiomatic, no need in provided hyperparameters, are not learned or optimized. The method accepts multiple weights, e.g. both temporal and volatility weights.
Method briefly explained (I can go deeper if any1 asks explicitly):
Performs weighted KDE on initial input data, finds KDE global maximum (mode), creates new “residuals” dataset by centering initial data around this value;
Performs weighted KDE on residuals, uses sigmoid based probability mass targets with increasing probability coverage to construct a set of non-disjoint High Density Intervals (also called HDR, HPD in Bayesian terms);
Uses these intervals to calculate analogs of centralized & standardized moments;
Uses these ^^ moments to construct a set of control thresholds. The scheme used in PBAD is not only based on a central threshold, or on neighboring ones, it utilizes all previous thresholds, gaining more information.
...
The most important part is to understand whether you really need PBAD. Because even tho it seems to be the best one given highest algocomplexity, irl it would work worse in cases when it’s not required by your data.
Here’s the menu (aka taxonomy omg) of methods you can use that would let you make the right choice:
Moment-Based Adaptive Detection (MBAD) :
Norm: L2
Time complexity: original O(n), successfully reduced to O(1) in online version
Use case: default, general purpose
Based on: method of moments (powers of residuals from mean)
Thresholds architecture: centralized
Quantile-Based Adaptive Detection (QBAD):
Norm: L1
Time complexity: O(nlogn)
Use case: either bad data Or process instability
Based on: quantile moments (dyadic percentiles of residuals from median)
Thresholds architecture: chained/recursive/sequential
Probability-Based Adaptive Detection (PBAD):
Norm: L0
Time complexity: O(n^2)
Use case: both bad data And process instability
Based on: probability moments (target probability masses of residuals from KDE mode)
Thresholds architecture: decentralized (for lack of a better name xd, the idea is that these thresholds gain information from the all other threshold and are Not exclusively based on the central or neighboring thresholds)
...
Examples of true use cases:
^^ an appropriate financial instrument to use PBAD
^^ and another one
...
Additional details about how to use it:
Keep the student5 kernel, it’s the best you can do. I added others mostly for comparisons and if you want to use the tool Not for its primary purpose (on a fine data)
“Calculate for N bars” and “Starting at bar N” options allow to reduce calculation period only on the N number of last bars or next bars from a chosen one. It's vital, because calculations here are heavy
Keep plotting offset at 1 (allows to visually compare current bar with the previous threshold values). This is the way it should be done on price data.
HLC3 is the optimal source input, unless you want to use your own better one point estimate of each datapoint (in the best case done by using PBAD itself on OHLC+ values).
In essence it should be used just like MBAD or QBAD, fade/push extensions and limit, fade/push/skip deviations & basis, or other strategies of your. Again, the only reason for 3 methods to exist is to be chosen for according data characteristics.
Btw:
This is the initial version, I don’t consider it perfected tbh, even tho it works as expected, however this method is very situational anyways.
In this script KDE function is modified to ensure the outcoming probabilities Do sum up to 1. I didn’t do this normalization in Weighted KDE Mode script , but there it’s not required since we just need a KDE global max.
see ya
∞
GC1! H1 Stats+GC1! H1 Stats - Detailed Prob & Excursion Indicator
Overview
GC1! H1 Stats - Detailed Prob & Excursion is a specialized statistical overlay indicator for TradingView, tailored for Gold futures (GC1!) on a 1-hour framework. It provides real-time insights into the probability of price returning to the hourly open after sweeping the previous hour’s high (PHH) or previous hour’s low (PHL), based on historical data segmented by hour (0–23) and 20-minute intervals. The indicator visualizes these sweeps with lines, labels, circles, background fills, and “excursion zones” (also called “Magic Boxes”) that highlight median/mean extensions post-sweep, along with percentile lines (75th / 90th / 95th) for gauging potential “pain” or extreme moves. This tool is designed for intraday Gold traders focusing on liquidity sweeps and mean-reversion behavior, helping to quantify edge using empirical probabilities and excursion statistics.
The data is hardcoded from extensive historical analysis of GC1! behavior (e.g., probabilities ranging roughly from ~7% to ~91%, with sample sizes up to 2000+ per segment), making it a backtested reference rather than a dynamic learning model. It emphasizes visual clarity during active hours, with options to filter for Regular Trading Hours (RTH: 09:00–15:59 ET) or high-probability (>70%) events only. Note: This is an educational tool for analyzing market structure; it does not predict future performance or provide trading signals/advice. Past data does not guarantee future results, and users should backtest on current conditions (as of December 2025 data availability) and use at their own risk, in compliance with TradingView’s house rules.
________________________________________
Key Features
• Sweep Detection & Probability Labels: Identifies when price breaks PHH (upside) or PHL (downside), displaying a centered label with probability of returning to the hourly open, sample size (N), time of sweep, and a checkmark (✅) if the open is retested post-sweep.
• Visual Lines & Markers: Draws hourly open (h.o.), PHH, and PHL lines with customizable styles/colors; adds small circles on sweep bars for quick spotting.
• Breakout→Open Background Fill: Shaded zone from sweep bar until price returns to open, visualizing extension duration and retracement.
• Excursion (Pain) Zone - “Magic Box”: Post-sweep box showing median/mean extension percentages, colored dynamically by probability (green high, orange mid, red low); includes dashed lines for 75th/90th/95th percentiles to mark statistical extremes.
• Time-Segmented Data: Probabilities and excursions vary by hour (0–23) and 20-min segments (0–19 min: _0, 20–39: _1, 40–59: _2), capturing intraday nuances (e.g., higher probs in early/late hours).
• Filters for Focus: RTH-only mode hides non-session elements; high-prob-only shows >70% events to reduce noise.
• Alerts: Triggers on PHH/PHL sweeps with messages for chart checks.
________________________________________
How It Works
• Data Foundation: Uses pre-computed maps for probabilities (prob_high_taken/prob_low_taken), sample sizes, and excursions (mean, median, p75/p90/p95 as percentages of open). Data is initialized on the first bar via f_init_high_data() and f_init_low_data(), covering 24 hours with 3 segments each (e.g., key "9_1" for 09:20–09:39). Probabilities represent historical likelihood of price returning to open after sweep; excursions quantify average/rare extensions (e.g., 0.156% mean = 0.156% of open price).
• Period Detection: On new 1H bars (new_period_bar), resets visuals, draws lines for open/PHH/PHL extending 1 hour forward, and labels if enabled. Uses request.security on standard ticker for real OHLC, bypassing chart transformations (e.g., Heikin Ashi).
• Sweep Logic: On each bar, checks if real high > PHH or real low < PHL. If so, fetches segment-specific data (hour + floor(minute/20)), displays probability label centered mid-hour. Skips if filtered (RTH-only or <70% prob).
• Excursion Visualization: If enabled, draws “Magic Box” from 1-min to 58-min into the hour, bounded by mean/median levels (top/bottom adjusted for high/low sweep). Adds percentile lines with labels (e.g., “75%”) at right end. Box color reflects prob strength for quick bias assessment.
• Retest Check: Monitors for open retest post-sweep (high/low cross open, or gap scenarios from prev bar). Adds ✅ to label if hit on subsequent bars (skips sweep bar to avoid false positives). Stops background fill on retest or at 58-min mark.
• Background Fill: Activates on sweep, shades until retest, using user color.
• Cleanup & Performance: Manages labels in arrays, clears on new periods; no excess drawing beyond max counts (500 lines/labels/boxes).
This setup blends statistical backtesting with real-time visualization: hardcoded data provides empirical probabilities/excursions (reducing subjectivity in breakouts), while dynamic elements (lines, fills, boxes) overlay structure on the chart. It helps Gold traders assess if a sweep is “high-edge” (e.g., >70% probability of reverting) or likely to run (low probability, high excursion), pairing historical context with current price action.
________________________________________
Settings and Customization
Inputs are grouped for ease:
1. Settings:
o Show RTH Only (9:00–15:59): Restricts to main session (default: false; tooltip: for RTH-focused stats).
o Show High Prob Only (>70%): Filters low-prob sweeps visually (default: false; tooltip: highlights confidence).
2. Visuals:
o Show Line Labels: Toggle “h.o.” / “phh” / “phl” (default: true).
o Period Open Line Color: Gray 50% (default).
o Previous High/Low Line Colors: Gray 100% (default).
o Open Line Style/Width: Dotted/1 (default; options: Solid/Dotted/Dashed).
3. Breakout→Open Background:
o Show Breakout→Open Background: Toggle fill (default: true).
o Fill Color: Teal 85% (default).
4. Breakout Circles:
o Show Breakout Circles: Toggle (default: true).
o PHH/PHL Break Circle Colors: White 20% (default).
5. Info Label Style:
o Text Size: Small (default; options: Auto/Tiny/Normal/Large/Huge).
o Label Text Color: White (default).
o Low/Mid/High Probability Colors: Red 20% / Orange 20% / Green 20% (default).
6. Excursion (Pain) Zone:
o Show Excursion Zone: Toggle Magic Box (default: true).
o Excursion Box Color: Gray 75% (default; dynamic overrides).
o 75th/90th/95th Percentile Lines: Orange 30% / Red 30% / Dark Red 100% (default).
No additional tables/plots; all elements are lines/labels/boxes for overlay focus.
________________________________________
Usage Tips
• Breakout Trading: Watch for sweeps with high probability (>70%, green label) as potential fades back to open; low probability (red) may signal runs—use the excursion box for targets (e.g., exit at 90th percentile for extremes).
• Time Awareness: Probabilities often peak in key liquidity windows and drop in quieter hours; segments capture momentum shifts (e.g., _2 often lower prob).
• RTH Focus: Enable for cleaner stats during high-liquidity session hours; disable for a 24-hour view.
• Visual Filtering: Use high-prob-only in volatile conditions to reduce noise; combine with volume or other confluence tools for confirmation.
• Alerts Integration: Set TradingView alerts on sweeps; check label for probability/N before acting.
• Chart Setup: Best on 1H or lower GC1! charts; adjust text size for readability on smaller screens.
• Backtesting: Manually review historical sweeps against data maps to validate; update hardcoded values if new data emerges (as of 2025).
________________________________________
Limitations
• Fixed Data: Hardcoded stats may not reflect recent market changes (e.g., post-2025 regime shifts); not adaptive.
• Reactive Only: Detects sweeps after they occur; no predictive signals.
• Timeframe Specific: Locked to 1H logic; may not translate to other assets/timeframes without recoding data.
• Visual Clutter: On busy charts, labels/boxes may overlap—toggle selectively.
• No Live Stats: Sample sizes are historical; real-time N/prob not updated.
• Gaps & Extremes: Handles gaps in retest logic, but rare events (e.g., macro news) may exceed the 95th percentile.
________________________________________
Disclaimer
This indicator is for informational and educational purposes only. Trading involves significant risk of loss and is not suitable for all investors. The hardcoded data represents past Gold futures (GC1!) performance and does not guarantee future outcomes. No claims of profitability are made—results depend on market conditions, user strategy, and risk management. Consult a financial advisor before trading, and backtest extensively. Abiding by TradingView rules, this tool provides no investment recommendations.
BTC - Bitcoin Strategic Dashboard by RM Title: BTC - Bitcoin Strategic Dashboard | RM
Overview & Philosophy
The Bitcoin Strategic Dashboard is a comprehensive analytics tool designed to provide deeper market context beyond simple price action.
While a standard chart displays price history, this dashboard focuses on the structural health of the market. It aims to answer clearer questions: Is the asset statistically overextended? Is the current volatility compressed or expanding? How is Bitcoin currently correlating with traditional equity markets?
This script aggregates key data points—Performance, Risk, Valuation, and Macro Correlations—into a single, organized table. It is designed to be a quiet, high-density reference tool that sits unobtrusively in the corner of your screen, helping to contextualize daily price movements without cluttering your workspace.
Methodology & Module Breakdown
The dashboard is divided into 5 strategic modules. Here is exactly how to read them, how they are calculated, and how to interpret the data.
1. PERFORMANCE
This section answers: "Is Bitcoin actually beating the traditional market, and by how much?"
BTC Return : The raw percentage growth of Bitcoin.
Timeframes: 1-Year (Tactical Trend) and 4-Year (The Halving Cycle).
Alpha (vs SPX / Gold):
Meaning : "Alpha" measures true outperformance. It tells you how much better your capital worked in Bitcoin compared to the S&P 500 (Stocks) or Gold.
Calculation : We use a Relative Growth Ratio. Instead of simple subtraction, we calculate the growth factor of BTC divided by the growth factor of the Benchmark.
Interpretation :
Green: Bitcoin is outperforming. It is the superior vehicle for capital.
Red: Bitcoin is underperforming traditional assets (Opportunity Cost is high).
2. RISK PROFILE
This section answers: "How dangerous is the market right now?"
Drawdown (DD):
Meaning : The percentage loss from the 1-Year High.
Interpretation : Deep Drawdowns (e.g., > -50%) historically signal generational buying opportunities (Deep Red). Small Drawdowns (< -5%) signal we are near "Discovery Mode" (Blue/Green).
Sharpe Ratio:
Meaning : The industry standard for "Risk-Adjusted Return." It asks: "Is the profit worth the stress?"
Timeframe : Annualized over 365 Days.
Interpretation :
> 1.0: Good. The return justifies the risk.
> 2.0: Excellent. (Dark Green).
< 0.0: Bad. You are taking risk for negative returns.
Sortino Ratio:
Meaning : Similar to Sharpe, but it only counts downside volatility as "risk." Bitcoin often rallies aggressively (Good Volatility); Sortino ignores the upside "risk" and focuses only on minimizing losses.
Volatility (Vol) & Rank:
Meaning : How violently the price is moving.
Calculation : We compare the current 30-Day Volatility against the last 4 Years of volatility history (Rank 0-100).
Interpretation (The Squeeze Strategy) :
BLUE (Cold / <25%): Volatility is historically low. The market is "compressed." Big moves often follow these periods.
RED (Hot / >75%): Volatility is extreme. High risk of mean reversion or panic.
3. VALUATION & MOMENTUM
This section answers: "Is Bitcoin cheap or expensive?"
Mayer Multiple (MM):
Meaning: A "Godfather" of Bitcoin ratios.
Calculation : Current Price divided by the 200-Day Moving Average.
Interpretation :
< 0.8 (Blue): Historically "Cheap."
1.0: Fair Value (Price = Trend).
> 2.4 (Red): Speculative Bubble territory.
RSI (Relative Strength Index):
Timeframe : 14 Days.
Interpretation : >70 suggests the market is overheated (Red). <30 suggests oversold conditions (Blue).
Trend (ADX) :
Meaning : The Average Directional Index measures the strength of a trend, not the direction.
Interpretation : Values >25 (Green) indicate a strong trend is present. Values <20 (Gray) indicate a choppy/sideways market (no trend).
vs 200W (Macro):
Meaning : The distance to the 200-Week Moving Average.
Interpretation : This line is historically the "Cycle Bottom" or "Absolute Support" for Bitcoin. Being close to it (or below it) is rare and often marks cycle lows.
4. MACRO CORRELATIONS
This section answers: "Is Bitcoin moving on its own, or just following the Stock Market?"
vs TradFi (SPX):
Timeframe : 90-Day Correlation Coefficient.
Interpretation :
High Positive (Red): BTC is just acting like a tech stock. No "Safe Haven" status.
Negative/Zero (Green): BTC is "decoupled." It is moving independently of Wall Street.
vs DXY (US Dollar):
Interpretation : Bitcoin usually moves inverse to the Dollar.
Negative (Green): Normal healthy behavior.
Positive (Red): Warning signal. If both DXY and BTC rise, something is breaking in the system.
5. HISTORICAL LEDGER
A Year-by-Year breakdown of returns.
Feature : You can toggle the comparison column in the settings to compare Bitcoin against either S&P 500 or Gold.
Usage : Helps visualize the cyclical nature of returns (e.g., the 4-year cycle pattern of Green-Green-Green-Red).
How to Read the Visuals (Heatmap)
The dashboard uses a standardized Bloomberg-style heatmap to let you assess the market state in milliseconds:
🟢 Green: Profit / Good Performance / Positive Alpha.
🔴 Red: Loss / Overheating / High Risk.
🔵 Blue: "Cold" / Cheap / Low Volatility (Potential Buy Zones).
🟠 Orange: Warning / High Drawdown.
⚫ Gray/Black: Neutral or Fair Value.
Settings & Customization
Visuals: Change the text size (Tiny, Small, Normal) to fit your screen resolution.
Modules: You can toggle individual sections on/off to save screen space.
Calculation: Switch the Historical Benchmark between "S&P 500" and "Gold" depending on your thesis.
Disclaimer
This script is for research and educational purposes only. The metrics provided (Sharpe, Sortino, Mayer Multiple) are derived from historical data and do not guarantee future performance. "Cheap" (Low Mayer Multiple) does not mean the price cannot go lower. Always manage your own risk.
Tags
bitcoin, btc, bloomberg, terminal, dashboard, onchain, mayer multiple, sharpe ratio, volatility, alpha, risk management, Rob Maths
POWER STRATEGY - Perfect for Meme Coins by OeZkAN📈 POWER STRATEGY - PRO EXTENDED FILTER (NO FIB ATR, TUNABLE)
This is a comprehensive, multi-layered trend-following strategy designed for Pine Script v5. It is built around a core EMA Re-Test entry logic, significantly enhanced by multiple, optional filters for Conviction, Volatility, Multi-Timeframe (MTF) Alignment, and Price Action Context (like FVAG, Divergence, Mobility, and LSOB), making it highly customizable and robust.
🌟 Core Logic & Trend Filtering
The strategy aims to trade pullbacks/re-tests toward a primary Exponential Moving Average (EMA).
Primary Trend Filter (EMA): An adjustable EMA (default 50) determines the dominant trend.
Long Condition: Price is above the EMA.
Short Condition: Price is below the EMA.
Re-Test Entry: An entry signal is generated when the price briefly touches or crosses the EMA (the "Re-Test") but immediately rejects it and closes back on the trend side (e.g., a candle's low hits the EMA, but it closes bullishly above it).
Confirmation (Optional): The useConfirmation setting enforces a waiting period (confirmationBars) after the initial re-test to ensure the price moves a minimum distance (confirmationThreshold, measured in multiples of ATR) away from the re-test low/high, confirming the bounce strength.
🎯 Advanced Filter Stack (The 'Extended Filter')
This strategy integrates multiple optional filters, providing a high degree of control over trade quality. All filters use the ATR (Average True Range) for dynamic, volatility-adjusted calculations.
Volatility Filter: Ensures the market is neither too calm (minVolatility) nor too excessively volatile (maxVolatility) by comparing the current ATR to a long-term SMA of the ATR.
Conviction Score & MTF Alignment:
Conviction Score: A weighted score (max 6 points) combining the primary EMA trend (2 points) and alignment across three user-defined Multi-Timeframes (MTF TF1, TF2, TF3, 1 point each).
MTF Agreement: Requires a minimum number of timeframes (minTFAgreement) to agree with the entry direction. The Entry Conviction Level (minConvictionEntry) then acts as the final quality gate.
FVAG Filter (Fair Value Area Gap): Uses an SMA and ATR-based bands to identify when the price is pulling back into a 'Fair Value Area' (similar to Mean Reversion context) to align entries with high-probability reversal zones.
Pro Mobility Score (Optional): Measures the size of the current bar range relative to the average bar range over a mobilityLength period. Used to ensure sufficient current market movement for an effective trade.
LSOB Filter (Last Stagnant Order Block - simplified): Tries to detect if the price is near a recent low-volatility consolidation zone, filtering for potential breakout/continuation trades from these areas.
Divergence Filter (Optional): Uses RSI to check for Bullish or Bearish Divergence, aiming to align entries with underlying momentum shifts.
🛡️ Risk Management & Controllers
Dynamic TP/SL: Take Profit (TP1, TP2, TP3) and Stop Loss (SL) levels are dynamically calculated as multiples of the current ATR value.
Minimum R:R Ratio: The strategy blocks entries where the calculated Risk-to-Reward ratio (based on SL to TP1) is below a user-defined threshold (minRiskReward).
Trailing Stop: When activated (useTrailing), the stop-loss is moved to Breakeven after TP1 is hit, with an additional buffer (beBuffer x ATR). The stop then trails the price by a defined trailingDistance x ATR.
Auto-Fix Controllers: A unique feature designed to increase stability. The controllers monitor for core anomalies (errorMonitor) and calculation issues (calcIntegrity). In auto_fix mode, they apply non-intrusive fixes (e.g., temporarily relaxing the minConvictionEntry or disabling trailing stop if errors are detected) and can block entries for severe issues (safetyBlock).
🛠️ Customization and Use
This strategy is highly tunable. Users can selectively enable/disable filters to adapt the logic to different market conditions or assets.
Grouped Inputs: Inputs are logically grouped for easy adjustment of Trend, Volatility, Confirmation, Entry, TP/SL, Trailing, and various Filter settings.
Debug Mode: Enables detailed on-chart labels for internal variables (Conviction Score, Volatility, etc.) to aid in backtesting and optimization.
📢 Check Out My Other Work!
If you find this strategy valuable, please take a moment to explore my profile on TradingView. I have developed several other unique and robust Pine Script strategies and indicators focused on combining multiple data layers (price action, volume, volatility, and order flow concepts) into high-probability trading models.
They are definitely worth a look for any serious trader!
Disclaimer
This script is for educational and testing purposes only. Trading involves significant risk, and past performance is not indicative of future results.
Student Wyckoff Relative StrengthSTUDENT WYCKOFF Relative Strength compares one instrument against another and plots their relative performance as a single line.
Instead of asking “is this chart going up or down?”, the script answers a more practical question: “is THIS asset doing better or worse than my benchmark?”
━━━━━━━━━━
1. Concept
━━━━━━━━━━
The indicator builds a classic relative strength (RS) line:
• Main symbol = the chart you attach the script to.
• Benchmark symbol = any symbol you choose in the settings (index, ETF, sector, another coin, etc.).
RS is calculated as:
RS = Price(main symbol) / Price(benchmark)
If RS is rising, your symbol outperforms the benchmark.
If RS is falling, your symbol underperforms the benchmark.
You can optionally normalize RS from the first bar (start at 1 or 100) to clearly see how many times the asset has outperformed or lagged behind over the visible history.
This is not a “buy/sell” indicator. It is a **context tool** for rotation, selection and Wyckoff-style comparative analysis.
━━━━━━━━━━
2. How the RS line is built
━━━━━━━━━━
Inputs:
• Source of main symbol – default is close, but you can choose any OHLC/HL2/typical price etc.
• Benchmark symbol – ticker used as reference (index, sector, futures, Bitcoin, stablecoin pair, etc.).
• Benchmark timeframe – by default the current chart timeframe is used, or you can force a different TF.
The script uses `request.security()` with `lookahead_off` and `gaps_off` to pull benchmark prices **without look-ahead**.
A small epsilon is used internally to avoid division by zero when the benchmark price is very close to 0.
Normalization options:
• Normalize RS from first bar – if enabled, the very first valid RS value becomes “1” (or 100), and all further values are expressed relative to this starting point.
• Multiply RS by 100 – purely cosmetic; makes it easier to read RS as a “percentage-like” scale.
━━━━━━━━━━
3. Smoothing and color logic
━━━━━━━━━━
To help read the trend of relative strength, the script calculates a simple moving average of the RS line:
• RS MA length – period of smoothing over the RS values.
• Show RS moving average – toggle to display or hide this line.
Color logic:
• When RS is above its own MA → the line is drawn with the “stronger” color.
• When RS is below its MA → the line uses the “weaker” color.
• When RS is close to its MA → neutral color.
Optional background shading:
• When RS > RS MA → background can be tinted softly green (phase of relative strength).
• When RS < RS MA → background can be tinted softly red (phase of relative weakness).
This makes it easy to read the **trend of strength** at a glance, without measuring every small swing.
━━━━━━━━━━
4. How to interpret it
━━━━━━━━━━
Basic reading rules:
• Rising RS line
– The main symbol is outperforming the benchmark.
– In Wyckoff terms, this can indicate a leader within its group, or a sign of accumulation relative to the market.
• Falling RS line
– The main symbol is underperforming the benchmark.
– Can point to laggards, distribution, or simply an asset that is “dead money” compared to alternatives.
• Flat or choppy RS line
– No clear edge versus the benchmark; performance is similar or rotating back and forth.
With normalization on:
• RS > 1 (or > 100) – the asset has grown more than the benchmark since the starting point.
• RS < 1 (or < 100) – it has grown less (or fallen more) than the benchmark over the same period.
The RS moving average and colored background highlight whether this outperformance/underperformance is a **temporary fluctuation** or a more sustained phase.
━━━━━━━━━━
5. Practical uses
━━━━━━━━━━
This indicator is useful for:
• **Selecting stronger assets inside a group**
– Compare individual stocks vs an index, sector, or industry ETF.
– Compare altcoins vs BTC, ETH, or a crypto index.
– Prefer charts where RS is in a sustained uptrend rather than just price going “up on its own”.
• **Monitoring sector and rotation flows**
– Attach the script to sector ETFs or major coins and switch the benchmark to a broad market index.
– See where capital is rotating: which areas are gaining or losing strength over time.
• **Supporting Wyckoff-style analysis**
– Use RS together with volume, structure, phases and trading ranges.
– A breakout or SOS with rising RS vs the market tells a different story than the same pattern with falling RS.
• **Portfolio review and risk decisions**
– When an asset shows a long period of relative weakness, it may be a candidate to reduce or replace.
– When RS turns up from a long weak phase, it can signal the start of potential leadership (not an entry by itself, but a reason to study the chart deeper).
━━━━━━━━━━
6. Notes and disclaimer
━━━━━━━━━━
• Works on any symbol and timeframe available on TradingView.
• The last bar can change in real time as new prices arrive; this is normal behaviour for all indicators that depend on current close.
• There are no built-in alerts or trading signals – this tool is meant to support your own analysis and trading plan.
This script is published for educational and analytical purposes only.
It does not constitute financial or investment advice and does not guarantee any performance. Always test your ideas, understand the logic of your tools and use proper risk management.
Seasonal Trend by LogReturn ProSeasonal Trend by LogReturn Pro
Seasonal Trend by LogReturn Pro is a seasonality indicator that analyzes historical average logarithmic returns to visualize recurring price behavior throughout the trading year.
Instead of using simple price averages, this indicator is based on log returns, making it scale-independent and mathematically consistent across different price levels and assets.
🔍 How It Works
The indicator calculates daily logarithmic returns for each trading day of the year.
These returns are aggregated and averaged over a user-defined number of past years.
Based on this historical data, a seasonal trend profile is constructed that represents the statistically expected market behavior over the year.
All calculations are aligned by trading day index, not calendar days, ensuring accurate seasonality even across different years and holidays.
📈 Display Modes
The indicator offers two complementary visualizations:
1. Absolute Seasonal Projection (Main Chart)
- Projects a price path based on historical average log returns.
- Can be displayd:
- Only for the remaining part of the current year, or
- For the entire year, starting from the beginning.
- Useful for visualizing potential seasonal price tendencies relative to the current price.
2. Relative Seasonal Performance (Indicator Pane)
Shows the cumulative seasonal return in percentage terms.
Centered around a zero line for easy interpretation.
Ideal for identifying periods with historically positive or negative seasonal bias.
💡 Use Cases
Identifying seasonal bullish or bearish phases
Timing entries and exits based on historical tendencies
Combining seasonality with technical or fundamental analysis
Gaining a long-term probabilistic market perspective
⚠️ Disclaimer
This indicator is based on historical data and does not predict future price movements.
It should be used as a statistical reference tool, not as a standalone trading signal.
Session ATR Progression Tracker📊 Session ATR Progression Tracker - SIYL Regression Trading Tool
Track how much of your instrument's 7-day Average True Range (ATR) has been covered during the current trading session. This indicator is specifically designed for regression traders who follow the "Stay In Your Lane" (SIYL) methodology, helping you identify when the probability of mean reversion significantly increases. If you are interested in more on that check out Rod Casselli and tradersdevgroup.com.
🎯 Key Features:
• Real-time ATR Coverage Percentage - See at a glance what percentage of the 7-day ATR has been covered in the current session
• SIYL-Optimized Thresholds - See at a glance when the instrument has achieved 80% and 100% ATR coverage, the proven thresholds where mean reversion probability increases (customizable)
• Flexible Session Modes:
- Daily: Resets at calendar day change
- Session: Uses exchange-defined trading sessions
- Custom Session: Set your exact session start/end times (perfect for futures traders and international markets)
• Visual Alerts - Color-coded display (gray → orange → red) and optional background highlighting
• Repositionable Display - Choose from 9 screen positions to avoid chart clutter
• Session Markers - Green triangles mark the start of each new session
• Detailed Stats - View current range, ATR value, session high/low, and session status
💡 Why Use This Indicator?
This tool is built around a proven concept: regression trading becomes significantly more effective once a session has achieved at least 80% of its 7-day ATR. At this threshold, the probability of price reverting to mean increases substantially, creating higher-probability trade setups for SIYL practitioners.
Benefits for regression traders:
- Identify optimal entry points when mean reversion probability is highest (≥80% ATR coverage)
- Avoid premature regression entries before adequate range has been established
- Recognize when daily moves have "earned their range" and are ripe for reversal
- Time fade-the-move and counter-trend strategies with statistical backing
- Improve win rates by trading only after proven probability thresholds are met
⚙️ Setup Instructions:
1. Add the indicator to your chart
2. Select your preferred "Reset Mode" (recommend "Custom Session" for futures/international markets)
3. If using Custom Session, enter your session times in 24-hour format (e.g., 0930-1600 for US stocks, 1700-1600 for CME futures)
4. Adjust alert thresholds if desired (default: 80% and 100% - proven SIYL thresholds)
5. Position the display where it's most visible on your chart
📈 Works Across All Markets:
Stocks • Futures • Forex • Indices • Crypto • Commodities
Perfect for regression traders, mean reversion specialists, and SIYL practitioners who want to trade with probability on their side by entering only after the session has "earned its range."
---
Tip: For futures contracts with overnight sessions that span calendar days (like MES, MNQ, MYM), use "Custom Session" mode with your exchange's official session times for accurate tracking.
VolatilityCone by ImpliedVolatility ProVolatilityCone by ImpliedVolatility Pro
VolatilityCone by ImpliedVolatility Pro is a forward-looking volatility projection tool that visualizes expected price ranges based on implied volatility.
It draws a volatility cone starting from a user-defined date and projects statistically expected price boundaries into the future using standard deviation theory.
🔍 What does this indicator do?
This indicator calculates and plots price ranges that represent ±1, ±2, and ±3 standard deviations from a starting price, based on implied volatility.
The result is a cone-shaped projection that shows where price is statistically likely to move over time.
In addition, the indicator calculates a Z-Score, showing how far the current price deviates from the expected mean in volatility terms.
📐 Key Features
→ Forward projection based on implied volatility
→ Supports up to 3 standard deviation levels
→ Optional display of half standard deviation levels
→ Manually enter implied volatility or automatically fetch IV from another symbol (e.g. VIX)
→ Custom Start Date
→ The cone starts exactly at the selected date
→ Ideal for earnings, events, or cycle-based analysis
→ Displays the statistical mean price
→ Z-Score indicates how extreme the current price is relative to the cone
📊 How to Use
Price inside the cone
→ Normal volatility behavior
Price near ±1σ
→ Typical volatility range
Price near ±2σ or ±3σ
→ Statistically stretched or extreme conditions
Positive Z-Score
→ Price trading above the mean
Negative Z-Score
→ Price trading below the mean
This makes the indicator useful for:
→ Volatility analysis
→ Mean reversion strategies
→ Risk assessment
→ Event-based forecasting
→ Options-related analysis
⚙️ Notes & Disclaimer
This indicator is not a prediction tool, but a statistical projection
It assumes volatility follows a square-root-of-time model
Best used as a context tool, not as a standalone trading signal
Expectativa de Juros (Fed)An indicator that measures future expectations for US interest rates, measured by the difference between the Fed's interest rate and pricing on the CME.
Unmitigated Liquidity ZonesUnmitigated Liquidity Zones
Description:
Unmitigated Liquidity Zones is a professional-grade Smart Money Concepts (SMC) tool designed to visualize potential "draws on liquidity" automatically.
Unlike standard Support & Resistance indicators, this script focuses exclusively on unmitigated price levels — Swing Highs and Swing Lows that price has not yet revisited. These levels often harbor resting liquidity (Stop Losses, Buy/Sell Stops) and act as magnets for market makers.
How it works:
Detection: The script identifies significant Pivot Points based on your customizable length settings.
Visualization: It draws a line extending forward from the pivot, labeled with the exact Price and the Volume generated at that specific swing.
Mitigation Logic: The moment price "sweeps" or touches a level, the script treats the liquidity as "collected" and automatically removes the line and label from the chart. This keeps your workspace clean and focused only on active targets.
Key Features:
Dynamic Cleanup: Old levels are removed instantly upon testing. No chart clutter.
Volume Context: Displays the volume (formatted as K/M/B) of the pivot candle. This helps you distinguish between weak structure and strong institutional levels.
High Visibility: customizable bold lines and clear labels with backgrounds, designed to be visible on any chart theme.
Performance: Optimized using Pine Script v6 arrays to handle hundreds of levels without lag.
How to trade with this:
Targets: Use the opposing liquidity pools (Green lines for shorts, Red lines for longs) as high-probability Take Profit levels.
Reversals (Turtle Soup): Wait for price to sweep a bold liquidity line. If price aggressively reverses after taking the line, it indicates a "Liquidity Grab" setup.
Magnets: Price tends to gravitate toward "old" unmitigated levels.
Settings:
Pivot Length: Sensitivity of the swing detection (default: 20). Higher values find more significant/long-term levels.
Limit: Maximum number of active lines to prevent memory overload.
Visuals: Toggle Price/Volume labels, adjust line thickness and text size.
EAP Trader NY BreakoutMy own profitable NY Breakout Playbook - backtested with statistics
by
EAP Trader
Backtest any Indicator [Target Mode] StrategyUniversal Backtester Strategy with Sequential Logic
This strategy serves as a highly versatile, universal backtesting engine designed to test virtually any indicator-based trading system without requiring custom code for every new idea. It transforms standard indicator comparisons into a robust trading strategy with advanced features like sequential entry steps, dynamic target modes, and automated webhook alerts.
The core philosophy of this script is flexibility. Whether you are testing simple crossovers (e.g., MA Cross) or complex multi-stage setups (e.g., RSI overbought followed by a MACD flip), this tool allows you to configure logic via the settings panel and immediately see backtested results with professional-grade risk management.
Core Logic: Source vs. Target Mode
The fundamental building block of this strategy is the "Comparator" engine. Instead of hard-coding specific indicators, the script allows users to define logic slots (L1-L5 for Longs, S1-S5 for Shorts).
Each slot operates on a flexible comparison logic:
Source: The primary indicator you are testing (e.g., Close Price, RSI, Volume).
Operator: The condition to check (Equal/Cross, Greater Than, Less Than).
Target Mode:
Value Mode: Compares the Source against a fixed number (e.g., RSI > 70).
Source Mode: Compares the Source against another dynamic indicator (e.g., Close > SMA 200).
This "Target Mode" switch allows the strategy to adapt to almost any technical analysis concept, from oscillator levels to moving average trends.
Advanced Entry System: Sequential Steps (1-5)
Unlike standard backtesters that usually require all conditions to happen simultaneously (AND logic), this strategy implements a State Machine for sequential execution. Each of the 5 entry slots (L1-L5 / S1-S5) is assigned a "Step" number.
The logic flows as follows:
Stage 1: The strategy waits for all conditions assigned to "Step 1" to be true.
Latch & Wait: Once Step 1 is met, the strategy "remembers" this and advances to Stage 2. It waits for a subsequent bar to satisfy Step 2 conditions.
Trigger: The actual trade entry is only executed once the highest assigned step is completed.
Example Use Case:
Step 1: Price closes below the Lower Bollinger Band (Dip).
Step 2: RSI crosses back above 30 (Confirmation).
Execution: Buy Signal triggers on the Step 2 confirmation candle.
This creates a realistic "Setup -> Trigger" workflow common in professional trading, preventing premature entries.
Exit Logic & Risk Management
The strategy employs a dual-layer exit system to maximize profit retention and protect capital.
1. Signal-Based Exits (OR Logic) There are 5 configurable exit slots (LX1-LX5 / SX1-SX5). Unlike entries, these operate on "OR" logic. If any enabled exit condition is met (e.g., RSI becomes overbought OR Price crosses below EMA), the position is closed immediately.
2. Hard Stop & Take Profit
Fixed %: Users can set a hard percentage-based Stop Loss and Take Profit.
Trailing Stop: A toggleable "Trailing?" feature allows the Stop Loss to dynamically trail the price.
Longs: The SL moves up as the price makes new highs.
Shorts: The SL moves down as the price makes new lows.
Automated Alerts & Webhooks
This script is built with automation in mind. It includes a dedicated makeJson() function that constructs a JSON payload compatible with most trading bots (e.g., 3Commas, TradersPost, Tealstreet).
Alert Modes Supported: | Alert Type | Description | | :--- | :--- | | Order Fills Only | Triggers standard TradingView strategy alerts when the broker emulator fills an order. | | Alert() Function | Triggers specific JSON payloads defined in the code ("action": "buy", "ticker": "MNQ", etc.). |
The script automatically calculates the alert quantity based on your equity percentage settings, ensuring the payload matches your backtest sizing.
Dashboard & Visuals
To aid in rapid analysis, the strategy includes visual tools directly on the chart:
Performance Table: A dashboard (top-right) displays real-time stats including Net Profit, Win Rate, Profit Factor, and Max Drawdown.
Trade Markers: Custom labels (goLong, exLong) show exactly where trades opened and closed, including the trade number and profit percentage.
SL/TP Visualization: Dynamic step-lines (Orange for SL, Lime for TP) show exactly where your protection levels are sitting, helping you visually verify if your stops are too tight or too loose.






















