Free: indicator teardowns, a repaint checker and open-source scripts. No buy/sell signals, ever.

Taught to TradeSystems over signals.

Explainers / Breakout Probability (Expo)

Breakout Probability (Expo), explained from the source

Breakout Probability (Expo) is an open-source TradingView script by Zeiierman (about 32,700 boosts). On the latest bar it draws five price levels above the previous bar's high and five below its low, each with a percentage, and a small table headed Win, Loss and Profitability. This page walks through what the published code counts, what each setting changes, and where it fails. It does not say what price does next.

The surprise: the percentages are not a forecast, and the high and low numbers are not a pair

Each percentage is a frequency from the bars already loaded on your chart: of the bars that followed a green candle, the share whose high went at least this far above the previous high. The low side is counted separately, so it is a second, independent share. They are not two halves of one probability. In the author's own example the high reads 72.82 percent and the low 28.29 percent, which add to more than 100 because one bar can break both the high and the low. Reading the larger number as a direction misreads what is being counted.

Step 1: the previous candle sorts every bar into one of two groups

For each bar the script looks at the bar before it. If that bar closed above its open it is green; below its open, red. A bar after a candle that closed exactly at its open is in neither group and is ignored. Two sets of counts are kept, one for bars that follow a green candle and one for bars that follow a red one. The colour is the previous candle's body only, not a trend.

Step 2: the levels are the previous bar's high and low plus a step

The step is a percentage of the current bar's close: the Percentage Step setting (1.0 by default) divided by 100, times the close. Level 0 is the previous bar's high and its low. The next levels sit one, two, three and four steps beyond. Number of Lines (up to 5) chooses how many are shown. Because the step uses the current bar's close, on a finished bar the levels are fixed, and on the live bar the outer levels move whenever the close moves.

Step 3: what gets counted

On every bar and for every level, two yes/no questions are asked: did this bar's high reach the previous high plus that many steps, and did its low reach the previous low minus that many steps. A "yes" adds one to that level's count for the group the previous candle put it in. Level 0 counts any bar whose high equals or exceeds the previous high, so a tie counts as a new high. The percentage is the count divided by the number of bars in that group so far.

Step 4: the percentage text only updates when a level is hit

The stored percentage is rewritten only on bars where that level is hit. On bars where it is missed, the group total grows but the displayed number is not recalculated. A level that has not been hit for a long time therefore shows the percentage from its last hit, which is higher than the true ratio. In the synthetic test the gap was under half a point at 5,000 bars, but on one 500-bar run a rarely hit outer level was 33 points stale. The nearest levels are hit often enough that this is small; the outer ones are where it shows.

Step 5: which levels are shown

With "Disable 0.00%" ticked (the default) a level is drawn only if both its high-side and low-side percentages are above zero. If either is zero, both lines for that level are removed. Each bar deletes the previous bar's lines and draws a new set, so only the latest bar carries levels; scrolling back shows no history of them.

Step 6: the table called Win, Loss and Profitability

Each bar the script picks the side whose first-level percentage is higher (the high side wins a tie) and treats the previous bar's high, or low, as the test level. If the current bar reached it, one is added to Win; otherwise one is added to Loss. The table shows the totals and Win divided by Win plus Loss, labelled Profitability. That is a count of how often the larger of two frequencies was followed by a bar that went past the previous high or low. There is no entry price, no stop, no target and no costs, so it is not a profit figure. On random prices with no structure it read 68.5 to 72.5 percent across the test runs, because most bars simply extend past the previous bar's high or low on one side. The side choice also uses the percentages after the current bar has been added; leaving it out changed the table by under a point.

Step 7: the alert text

The alert, sent once per bar through alert(), can include the ticker, the previous high and low, a "BIAS" word and a percentage line. BIAS says BULLISH when the high-side percentage is at least the low-side one, else BEARISH; it is a label for which frequency is larger. In the percentage line, "High" is filled with the larger of the two numbers when the previous candle was green and the smaller when it was red, so the word High does not always sit on the high-side figure. Check the alert text against the chart before reading it.

What the settings change (synthetic prices, seeds 1 to 3)

Percentage Step sets how far apart the levels sit and therefore how often each is hit. Number of Lines only changes how many are shown. BG Color only fills between lines. Show Statistic Panel turns the table on. The alert checkboxes choose which lines go in the alert text. Nothing in the settings changes how the counts are made. These figures come from invented prices: they show how the code behaves, not whether any number means anything.

Where it fails

Also explained: [Liquidity Swings [LuxAlgo]](/liquidity-swings-luxalgo) · Support and Resistance Levels with Breaks · Trendlines with Breaks · Order Block Finder · Market Structure Break & Order Block

Educational only. Not financial advice. Nothing here is a recommendation to buy or sell anything. Breakout Probability (Expo) is by Zeiierman on TradingView, published under CC BY-NC-SA 4.0; this page describes its published open-source code in our own words and is not affiliated with the author. Simulation figures come from synthetic random-walk prices and say nothing about how the script trades.

Also explained: Repaint checker, VWAP, Supertrend, RSI, UT Bot Alerts, Nadaraya-Watson Envelope, Squeeze Momentum, What is repainting on TradingView?, Is TradingView backtesting accurate?, Chandelier Exit, WaveTrend Oscillator, QQE MOD, Pivot highs and lows, Hull Suite, Range Filter, Twin Range Filter, HalfTrend, ZigZag++, SSL Hybrid, CM MacD Ultimate MTF, Volume Profile / Fixed Range, ADX and DI, Support Resistance Channels, Market Structure Break & Order Block, Order Block Finder, Pivot Point SuperTrend, Trendlines with Breaks [LuxAlgo], Divergence for Many Indicators, TradingView script selling terms, Support and Resistance Levels with Break, Liquidity Swings [LuxAlgo], Pine Script errors, Did ChatGPT or Claude write your Pine Sc, Lorentzian Classification, SuperTrend AI (Clustering), Machine Learning Adaptive SuperTrend, Dynamic Swing Anchored VWAP, Support and Resistance Power Channel by , Support and Resistance (High Volume Boxe, Trendline Breakouts With Targets by Char, Breakout Finder by LonesomeTheBlue

Next steps

  • Get a script fixed. Compiles but behaves differently live, or changes after a reload? In a Pine Script Audit, an AI model reads every line and writes a report on what to fix for $49, or also fixes those problems for $149. It cannot prove a script is safe.
  • Check your own script. Paste its source into the free repaint checker. It runs in your browser and flags known patterns.
Subscribe to the Teardown Letter: $19/moBack to Taught to Trade

No TradingView account yet? This affiliate link gives you a $15 coupon toward a paid plan, and we earn a commission if you buy one. The free plan is enough to follow this page.