OPEN-SOURCE SCRIPT
Daily Candle Bias Backtesting Stats @MaxMaserati

This indicator, is a powerful backtesting and probability tool designed to quantify the "follow-through" of specific candle types across different market sessions.
It identifies specific price action setups and tracks whether price hits a "Target" (continuation) or an "Invalidation" (reversal) first, providing real-time win rates for your favorite sessions.
The Candle Bias Stats indicator automatically categorizes every candle based on the MMM candle bias and tracks their historical success rate. It calculates how often a candle's high/low is broken before its opposite end is touched. By breaking this data down into sessions (Asian, London, NY), it identifies high-probability "time-of-day" windows where specific price action setups are most reliable.
MMM CANDLE LOGIC
Bullish Expansion & Breakout Signatures
Bullish Body Close Plus (BuBC Plus): Represents strong bullish momentum where price closes above the previous high and near its own top, signaling that buyers are in complete control.
Bullish Body Close Minus (BuBC Minus): Indicates weak bullish momentum; while the price closes above the previous high, a long top wick shows sellers pushed back, suggesting a potential retest of the previous high.
Bearish Expansion & Breakout Signatures
Bearish Body Close Plus (BeBC Plus): A very strong bearish signal where price closes below the previous low and near its own bottom, indicating sellers are dominant.
Bearish Body Close Minus (BeBC Minus): Signifies weak bearish momentum; the price breaks the previous low but finishes with a long bottom wick as buyers push back, often leading to a retest of the old ceiling.
Bullish Reversal & Trap Signatures (Affinity)
Bullish Affinity Plus (BuAF Plus): A strong bullish reversal where a new low is made, but sellers hit a wall and get trapped, causing price to finish near its top with a long bottom wick.
Bullish Affinity Minus (BuAF Minus): A weak bullish bounce where a new low is made and price finishes back inside the previous range, but buyers lack the energy for a significant move.
Bearish Reversal & Trap Signatures (Affinity)
Bearish Affinity Plus (BeAF Plus): A strong bearish reversal; buyers are trapped after making a new high, and price finishes near its bottom with a long top wick.
Bearish Affinity Minus (BeAF Minus): A weak bearish drop where sellers stop the rise but lack the energy to push price significantly lower.
Neutral & Volatility Signatures
Close Inside Bullish (CI•BuAF): Bullish neutral state where price stays inside the previous candle’s range but finishes in the top half, indicating buyers are slightly more active.
Close Inside Bearish (CI•BeAF): Bearish neutral state where price remains inside the previous box and finishes in the bottom half.
Seek & Destroy Bullish (S&D•BuAF): Bullish volatility characterized by price moving above and below the previous candle before buyers win the battle and close price near the top.
Seek & Destroy Bearish (S&D•BeAF): Bearish volatility where sellers win a high-chaos battle, closing price near the bottom after sweeping both sides of the previous candle.
H4 CANDLE EXAMPLE

Deep Dive: Analysis of the 4H Statistics
The image presents a comprehensive backtest of 4,999 total candles from September 2022 to December 2025. Here is the breakdown of what the interface is telling us:
1. The Strategy: Target vs. Invalidation
The indicator tracks BuBC (Bullish Body Close) and BeBC (Bearish Body Close).
The Target: For a Bullish candle, the target is the High. For a Bearish candle, it is the Low.
The Invalidation: The opposite end of the candle (the Low for Bullish, the High for Bearish).
The Goal: To see which level is touched first in the subsequent bars.
2. Global Performance (The Top Right Table)
Looking at the BuBC (1402 samples) section:
Target First (67.8%): In nearly 7 out of 10 cases, once a 4H candle closes "bullish" (breaking the previous high), the price continues higher to break its own high before it ever returns to take out its own low.
Both Hit (17.7%): This is a critical metric. It represents "Stop Runs" or "Wicks" where price hits the target but also hits the invalidation within the same tracking period.
Efficiency (1.3 Bars): This tells us the "follow-through" is almost immediate. If the trade doesn't work within 1 or 2 candles, the statistical edge drops off significantly.
3. The Session Breakdown (The Bottom Left Table)
This is where the "Edge" is found. Not all hours of the day are created equal.
Asian Late (02:00-06:00) – The "Star" Performer: With a 72.9% Target rate, this is labeled "BEST." It has the lowest "Both%" (6.5%), meaning moves during these hours are incredibly "clean." If a setup forms here, price usually moves directly to the target without looking back.
London Open & Overlap (06:00-14:00): These sessions maintain a high win rate (approx. 70%). This suggests that the European session provides reliable trend continuation for the S&P 500.
NY Session (14:00-18:00) – The "Trap" Zone: This is labeled "WORST" for a reason. While the win rate is basically a coin flip (49.6%), the Both% spikes to 36.7%. This means that even if you are right about the direction, the market is highly likely to "sweep" your stop loss before going to the target. It is the most volatile and "fake-out" prone time for this specific setup.
Summary of the Data
The statistics show that the S&P 500 4H Candle Bias is a highly reliable trend-following indicator, provided you trade it at the right time.
The data suggests a clear three-step logic:
Directional Edge: Both Bullish and Bearish body closes have a natural ~67% probability of continuation.
Timing is Everything: Trading during the Late Asian and London sessions increases your probability of success to over 70% with very low risk of a "fake-out."
Risk Warning: Avoid "Body Close" breakout strategies during the NY Mid-day (14:00-18:00). The statistics prove that this window is dominated by "Seek and Destroy" price action, where price is mathematically likely to hit both your target and your stop, usually hitting the stop first.
It identifies specific price action setups and tracks whether price hits a "Target" (continuation) or an "Invalidation" (reversal) first, providing real-time win rates for your favorite sessions.
The Candle Bias Stats indicator automatically categorizes every candle based on the MMM candle bias and tracks their historical success rate. It calculates how often a candle's high/low is broken before its opposite end is touched. By breaking this data down into sessions (Asian, London, NY), it identifies high-probability "time-of-day" windows where specific price action setups are most reliable.
MMM CANDLE LOGIC
Bullish Expansion & Breakout Signatures
Bullish Body Close Plus (BuBC Plus): Represents strong bullish momentum where price closes above the previous high and near its own top, signaling that buyers are in complete control.
Bullish Body Close Minus (BuBC Minus): Indicates weak bullish momentum; while the price closes above the previous high, a long top wick shows sellers pushed back, suggesting a potential retest of the previous high.
Bearish Expansion & Breakout Signatures
Bearish Body Close Plus (BeBC Plus): A very strong bearish signal where price closes below the previous low and near its own bottom, indicating sellers are dominant.
Bearish Body Close Minus (BeBC Minus): Signifies weak bearish momentum; the price breaks the previous low but finishes with a long bottom wick as buyers push back, often leading to a retest of the old ceiling.
Bullish Reversal & Trap Signatures (Affinity)
Bullish Affinity Plus (BuAF Plus): A strong bullish reversal where a new low is made, but sellers hit a wall and get trapped, causing price to finish near its top with a long bottom wick.
Bullish Affinity Minus (BuAF Minus): A weak bullish bounce where a new low is made and price finishes back inside the previous range, but buyers lack the energy for a significant move.
Bearish Reversal & Trap Signatures (Affinity)
Bearish Affinity Plus (BeAF Plus): A strong bearish reversal; buyers are trapped after making a new high, and price finishes near its bottom with a long top wick.
Bearish Affinity Minus (BeAF Minus): A weak bearish drop where sellers stop the rise but lack the energy to push price significantly lower.
Neutral & Volatility Signatures
Close Inside Bullish (CI•BuAF): Bullish neutral state where price stays inside the previous candle’s range but finishes in the top half, indicating buyers are slightly more active.
Close Inside Bearish (CI•BeAF): Bearish neutral state where price remains inside the previous box and finishes in the bottom half.
Seek & Destroy Bullish (S&D•BuAF): Bullish volatility characterized by price moving above and below the previous candle before buyers win the battle and close price near the top.
Seek & Destroy Bearish (S&D•BeAF): Bearish volatility where sellers win a high-chaos battle, closing price near the bottom after sweeping both sides of the previous candle.
H4 CANDLE EXAMPLE
Deep Dive: Analysis of the 4H Statistics
The image presents a comprehensive backtest of 4,999 total candles from September 2022 to December 2025. Here is the breakdown of what the interface is telling us:
1. The Strategy: Target vs. Invalidation
The indicator tracks BuBC (Bullish Body Close) and BeBC (Bearish Body Close).
The Target: For a Bullish candle, the target is the High. For a Bearish candle, it is the Low.
The Invalidation: The opposite end of the candle (the Low for Bullish, the High for Bearish).
The Goal: To see which level is touched first in the subsequent bars.
2. Global Performance (The Top Right Table)
Looking at the BuBC (1402 samples) section:
Target First (67.8%): In nearly 7 out of 10 cases, once a 4H candle closes "bullish" (breaking the previous high), the price continues higher to break its own high before it ever returns to take out its own low.
Both Hit (17.7%): This is a critical metric. It represents "Stop Runs" or "Wicks" where price hits the target but also hits the invalidation within the same tracking period.
Efficiency (1.3 Bars): This tells us the "follow-through" is almost immediate. If the trade doesn't work within 1 or 2 candles, the statistical edge drops off significantly.
3. The Session Breakdown (The Bottom Left Table)
This is where the "Edge" is found. Not all hours of the day are created equal.
Asian Late (02:00-06:00) – The "Star" Performer: With a 72.9% Target rate, this is labeled "BEST." It has the lowest "Both%" (6.5%), meaning moves during these hours are incredibly "clean." If a setup forms here, price usually moves directly to the target without looking back.
London Open & Overlap (06:00-14:00): These sessions maintain a high win rate (approx. 70%). This suggests that the European session provides reliable trend continuation for the S&P 500.
NY Session (14:00-18:00) – The "Trap" Zone: This is labeled "WORST" for a reason. While the win rate is basically a coin flip (49.6%), the Both% spikes to 36.7%. This means that even if you are right about the direction, the market is highly likely to "sweep" your stop loss before going to the target. It is the most volatile and "fake-out" prone time for this specific setup.
Summary of the Data
The statistics show that the S&P 500 4H Candle Bias is a highly reliable trend-following indicator, provided you trade it at the right time.
The data suggests a clear three-step logic:
Directional Edge: Both Bullish and Bearish body closes have a natural ~67% probability of continuation.
Timing is Everything: Trading during the Late Asian and London sessions increases your probability of success to over 70% with very low risk of a "fake-out."
Risk Warning: Avoid "Body Close" breakout strategies during the NY Mid-day (14:00-18:00). The statistics prove that this window is dominated by "Seek and Destroy" price action, where price is mathematically likely to hit both your target and your stop, usually hitting the stop first.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
MMM : No body close (PO4), No Trade.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
MMM : No body close (PO4), No Trade.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.