SuperTrend Take-Profit Dimensions [AlgoAlpha]🟠 OVERVIEW
A multi-dimensional take-profit aid that scores how typical the current bar looks compared to past SuperTrend pivots, so you can tell when a trend has reached favorable exit conditions.
The indicator runs a standard SuperTrend and records every confirmed zigzag pivot that occurs during a matching-direction run. Tops go into a bull pool , bottoms into a bear pool . Each pivot is stored as a set of readings across several independent axes, such as relative volume , time of day , and price position inside the recent range .
On every bar, the current reading on each axis is compared to that historical pool. A blended score from 0 to 100 tells you how closely the current conditions resemble where past pivots in the same direction have clustered. The idea is to give trend followers a data-backed sense of when to start tightening up, rather than guessing an exit or using a fixed R-multiple.
The three built-in axes were chosen deliberately to be as uncorrelated as possible , each describing a different dimension of market context: volume (relative volume percentile), time (time of day), and price (position in recent range). Correlated inputs would double-count the same information and distort the blended score; picking axes that describe genuinely different aspects of the market means each one contributes independent evidence, and the score reflects how many distinct dimensions are currently in agreement.
🟠 CONCEPTS
SuperTrend — An ATR-based trailing stop that flips between bullish and bearish states. Controls which pool of historical pivots the script reads from.
Pivot pool — A rolling store of confirmed zigzag pivots, split by direction. Bull pool holds pivot highs that printed during bullish SuperTrend runs; bear pool holds pivot lows from bearish runs. Capped at 2000 entries per side .
Context axis — A 0–100 value measured at the pivot bar. The script ships with three built-ins ( relative volume percentile , time of day , position in recent range ) and one optional user-plugged signal.
Axis independence — The three built-in axes cover volume , time , and price respectively, chosen so each describes a structurally different part of the market. Low correlation between axes keeps the blended score from being dominated by any single factor.
Conditional histogram — For each active axis, the script walks its pool and keeps only pivots whose bins on every other active axis match the current bar. The survivors are binned to form a histogram.
Axis score — For one axis, the count of pivots in the current bar's bin divided by the count in the histogram's tallest bin, scaled to 0–100 . 100 means the current context sits in the densest part of past pivots.
Blended favourability score — Arithmetic mean of the active per-axis scores. This is what the gauge and table display.
Density-match scoring — The score measures how common the current context is among past pivots. It is not a forward probability and makes no claim about what happens next.
🟠 FEATURES
Right-side context profiles — Stacked mini histograms render to the right of price, one per active axis.
• Bar heights show how pivots in each axis's conditional pool distribute across bins.
• A dashed vertical line marks the current bar's bin on that axis, so you can see at a glance where today sits against history.
• Bar hue tracks the active SuperTrend direction.
Favourability gauge — A vertical gradient table in the bottom-right showing the blended score, with a chevron marking the current level. Green at the top, red at the bottom.
Favourability breakdown table — A two-column readout of each active axis's individual score out of 100, plus a final row that classifies the blended score as Good , Neutral , or Bad . Position and text size are configurable.
Bar coloring — Bars fade from neutral grey toward the opposing trend colour as the blended score rises toward 100, so the chart itself signals when the context is stretched.
Take-profit markers — Small orange markers print above or below the bar when the blended score hits 100 for the active SuperTrend direction.
Timeframe guard — The time-of-day axis disables automatically on daily and higher timeframes, where the reading has no meaning, and a banner explains this so the blended score stays honest.
Multi-dimensional scoring engine — Four independent axes feed into a single score, each conditioned on all the others.
• Three built-in axes can be toggled on or off individually.
• A fourth axis accepts any plot via source input , provided the series stays within 0–100 on all loaded bars.
• An on-chart warning prints if the custom signal leaves that range, and the axis is ignored until it is corrected.
Deliberately uncorrelated built-in axes — Volume ( relative volume percentile ), time ( time of day ), and price ( position in recent range ) cover three structurally different facets of market context. Keeping the axes independent means each one adds new information to the blend rather than reinforcing the others.
Alert conditions — Six alerts are included: SuperTrend bullish flip, SuperTrend bearish flip, score peak match, and crossovers into the Good , Neutral , and Bad bands.
🟠 HOW TO USE
Add the script to an intraday chart on a liquid instrument and let it run long enough to populate the pools. More history means more stable conditional histograms.
Let SuperTrend define the active regime. The script only scores in the direction of the current trend; bar coloring and take-profit markers respect that regime.
Read the gauge and breakdown table together. The gauge shows the blended level; the table shows which individual axes are pulling it up or down.
Use the right-side profiles as a sanity check. If the dashed current-bin marker is sitting on or near the tallest bar across most axes, the current context closely resembles past pivot contexts in that direction.
Treat high scores as a cue to tighten management, not as reversal signals. A reading of 100 means conditions match where pivots have historically clustered, not that the trend is guaranteed to end.
Adjust the zigzag pivot length to control how strict the pool is. Lower values admit more pivots ( bigger, noisier sample ); higher values keep only firmer pivots ( smaller, cleaner sample ).
Plug your own signal into the custom axis to test whether an existing 0–100 oscillator adds useful conditioning, such as an RSI or a normalised momentum reading. For best results, pick a signal that is not strongly correlated with the three built-ins, so the custom axis adds a new dimension rather than re-stating an existing one.
Enable only the alerts that fit your workflow. The band-crossover alerts fire once per transition , not on every bar inside a band.
🟠 LIMITATIONS
The pool holds every confirmed pivot during a matching-direction run, not only pivots that ended the trend. Intermediate pullbacks sit alongside genuine terminal pivots. Raising the zigzag pivot length filters the pool further if you want a cleaner sample.
On strongly trending symbols the pool is dominated by pullback pivots rather than true terminal exits, because strong trends have many small pullbacks and only one final top or bottom. On choppy symbols the ratio is more balanced. Read the score with this in mind.
The blended score is a density-match measure, not a forward probability . A high reading means today's context is common among past pivots of this direction. It does not predict that the trend is about to end.
The time-of-day axis has no meaning on daily and higher timeframes and is disabled automatically on those timeframes. A warning banner confirms when this is active.
The custom axis requires a source already scaled to 0–100 on every loaded bar. Values outside that range disable the axis and surface a warning. Toggling the custom axis on a live chart starts the range check from the current bar; reload the chart to validate against full loaded history .
Pools are capped at 2000 entries per direction , with the oldest entries dropped first. On very long intraday histories the effective lookback is symbol- and timeframe-dependent.
All scoring uses data up to and including the confirmation bar of each pivot; pivots themselves are detected with the standard zigzag confirmation lag, meaning the scoring population on any given bar reflects pivots confirmed at least zzLen bars earlier.
🟠 CONCLUSION
SuperTrend Take-Profit Dimensions combines a standard SuperTrend with a rolling pool of historical pivot contexts and scores the current bar against that pool across up to four independent axes spanning volume, time, and price. The output is a blended 0–100 favourability reading , a per-axis breakdown, and a set of context profiles that show where past pivots have clustered. It gives trend followers a structured, data-backed way to judge when the current context matches where trends have historically given back profit, without pretending to predict the next bar.
Indicador Pine Script®






















