已更新
[TP] Regime - Mentor

Built on J. Welles Wilder's directional movement and ADX, plus a choppiness-style overlap measure. Unlike those classics on their own, it names the regime in plain words and counts what past regime changes on your chart did next, with the other way always shown beside any lean.
WHAT STAYS THE SAME
The maths is the standard kind, at the usual settings. Strength is Wilder's ADX and direction is +DI against -DI, both on length 14 and smoothing 14. Overlap is the Choppiness Index formula over 14 candles. It reads finished candles only. The counts are history, not promises.
QUICK ANSWERS
What is a regime? The mode the market is in. Trending means price has been moving one way with strength and the candles cover new ground. Ranging means weak direction and candles that overlap, so price goes back and forth.
Does it repaint? No. The regime, the counts, the marks and the alerts all wait for the candle to close. A past change is only counted once the 10 candles after it have closed.
What does "Leans up" mean? The chart is trending up now, and on this chart, past changes into a trend mostly held for the next 10 candles. It is a count of what happened here, not a promise about what comes next.
Why do I see "No lean yet"? A lean needs at least 12 past changes on this chart. Fewer than that can line up by chance.
Will it tell me what to do? No. It explains which mode the market is in and what past changes did. Decisions stay with you.
WHAT YOU SEE ON THE CHART
1. Held mark (circle): a past change into a new regime that held for 10 candles.
2. Switched back (square): a past change that went back once within 10 candles.
3. Flipped twice (ring): a past change that flipped two or more times. Choppy.
4. Header and lean: the answer first, in its colour.
5. Panel rows: the regime now, the count as n of m, the other way, the limit.
The numbers match the list above.

It sits on the price chart. The panel starts at the top left and moves to the bottom left when the highest candle on screen is in the left third, so recent price stays clear. It explains. It never tells you what to do.
THE REGIME IN PLAIN WORDS
The panel's second row always names the regime on the last finished candle:
"Trending up now."
"Trending down now."
"Ranging now."
"No clear regime now."
Two checks decide it. Strength is Wilder's ADX, with +DI and -DI for the direction. Overlap is how much the candles cover the same ground, the idea behind the Choppiness Index. A trend needs clear strength (25 or more by default) and low overlap (50 or less). A range needs weak strength (under 25) and high overlap (55 or more). Anything in between, or equal pushes both ways, is "No clear regime". It never forces a call. With no clear regime, the next row reads "No regime to count right now." and no marks show.
Another market. When the checks disagree, it says so.

PAST CHANGES, MARKED
A regime change is a finished candle where the read moves into trending up, trending down or ranging from a different read, including from "No clear regime". After each change the indicator watches the next 10 finished candles and sorts it by whether the read crossed between trending and ranging (candles with no clear regime are ignored):
A filled circle: held regime. It never crossed over in those 10 candles.
A square: switched back. It crossed over once.
A hollow ring: flipped twice. It crossed over two or more times.
Each mark sits at the close of the candle where the change began, and appears only after its 10 candles have closed, so it never moves. The chart shows marks for past changes like the current regime: changes into a trend on a trending chart, changes into a range on a ranging chart. "Past marks to show" sets how many (12 by default); marks older than the newest 6 are lighter. Hover over a mark for its name. "Show still-open event" (off by default) adds one faint ring at a change that is still being watched: "Still open, not counted yet".
Past changes into a trend on this chart, each marked by how it turned out.

THE LEAN, AS A COUNT
The panel counts past changes like the current regime, from the last 500 finished candles, and shows the result as n of m. A real read, NAS100 15 minutes at the 16 Oct 2026 close:
"[TP] REGIME | Leans down"
"Trending down now."
"Leans down: trends held 12 of 13 here."
"Other way: 1 of 13 switched back."
"0 of 13 flipped twice or more."
"Trends" means changes into either trend, up or down. A lean needs four tests to pass: at least 12 past changes; a smoothed share for "held" of at least 60 in 100, with one imaginary change added to each outcome so a small sample cannot look perfect; a lead of at least 3 over the next outcome; and the same leader in the older and the newer half of the changes. The three counts always add up to the total. The panel never prints a percentage.
Under 8 changes it says "Too few here to count yet (n)." From 8 to 11 it says "No lean yet: n here, need 12." and shows both sides, for example "Held 6 of 9; switched 2 of 9." When enough changes give no clear leader, it says "No clear lean here." When neither held nor flipped twice leads in both halves, the last count reads "Mixed halves; n of m flipped twice."
SIDEWAYS: MORE CAUTION
The sideways read is ranked first, ahead of up and down. It shows when the chart is ranging now and past changes into a range here held, or when past changes here flipped twice so often that chop leads in both halves. Then the header reads "Sideways: more caution" in gold and the lean row reads "Sideways: more caution here." The regime row still says what the chart is doing now, so a trending chart with a choppy history shows both.
A sideways read, with both sides counted.

THE HIGHER TIMEFRAME
With "Panel detail" on Full, one row compares this chart with the same regime read on the next higher timeframe, from its last finished candle (Weekly on a daily chart, Daily on a 4-hour chart, 4 hours on a 1-hour chart, 1 hour on a 15-minute chart):
"Agrees: higher timeframe matches."
"Neutral: higher timeframe is unclear."
"Conflicts: higher timeframe differs."
Full also says what would change the read, "Changes if: trend and range switch.", and adds the legend "● held ■ switched ○ flipped twice" when the marks are on.
Panel detail on Full: the higher timeframe, what would change the read, and the legend.

HOW IT WORKS (PROTECTED SOURCE)
Inputs used: the high, low and close of each finished candle. Strength and direction come from Wilder's ADX, +DI and -DI (length 14, smoothing 14). Overlap comes from the Choppiness Index formula (14 candles). The regime rule is the one above: trend at strength 25 or more with overlap 50 or less, range at strength under 25 with overlap 55 or more, otherwise no clear regime.
The event rule: a change starts on a finished candle whose read is trending up, trending down or ranging and differs from the candle before. The outcome window is the next 10 finished candles: no crossing between trending and ranging is held, one is switched back, two or more is flipped twice. A change that starts while another is still being watched is not counted, so the same stretch is never counted twice.
The count uses settled changes like the current regime from the last 500 finished candles. The minimum sample for any lean is 12. Nothing reads the candle that is still open, and the higher timeframe uses its last finished candle.
WHY EACH PART IS IN THE BUNDLE
Strength (ADX with +DI and -DI): says whether one side has been pushing clearly, and which side. On its own it cannot tell a clean move from a choppy one.
Overlap (the Choppiness Index formula): says whether the candles keep covering the same ground. It fills the gap strength leaves, so a trend needs both checks and a range needs both checks the other way.
The past-change count and the marks: turn the regime name into evidence from this chart, with the other way shown, so a read is never just a label.
The higher timeframe row: shows whether the bigger picture agrees, using the same two checks, so nothing new has to be learned.
HOW TO READ THE PANEL
Read it top to bottom: the header gives the answer, the next row names the regime now, then the lean or the count, then both sides, then a limit line and the footer. NAS100 15 minutes at the 16 Oct 2026 close, Compact (the default):
"[TP] REGIME | Leans down"
"Trending down now."
"Leans down: trends held 12 of 13 here."
"Other way: 1 of 13 switched back."
"0 of 13 flipped twice or more."
"Ten candles settle each past change."
"Closed candles, last 500. Not advice."
The NAS100 daily at the same close is the quiet case: "[TP] REGIME | No clear lean", "No clear regime now." and "No regime to count right now."
"Too few here to count yet (n)." means fewer than 8 past changes like this one: there is nothing to count yet. "Sideways: more caution" means chop or a holding range leads here, so give the read more caution. Full adds the higher timeframe line, the change condition and the legend. Before there is enough history, the panel reads "Not ready yet", "Not enough history yet." and "The read starts when its measures are ready." If the trend overlap ceiling is not below the range overlap floor, it reads "Settings need a fix" and "Lower the ceiling or raise the floor."
WHAT THE COLOURS MEAN
Only the lean carries colour: green for "Leans up", orange-red for "Leans down", gold for "Sideways: more caution", muted for "No lean yet" and "No clear lean". Every other row is neutral, so colour always means the answer. The marks are neutral grey shapes, so their meaning lives in the shape and reads in black and white. "Show chart tint" (off by default) adds a faint wash of the regime colour behind the chart. There are no free colour pickers. "Theme" on Auto matches your chart background: Paper on a light chart, Ink on a dark one.
A dark chart. Theme on Auto picks the dark look by itself.

SETTINGS
Reading: Direction and strength length (14), Strength smoothing (14), Range check length (14), Clear trend strength (25), Trend overlap ceiling (50), Range overlap floor (55).
Display: Show chart tint (off), Tint strength (80 to 100; 94), Mark past events (on), Past marks to show (0 to 30; 12), Show still-open event (off).
Mentor panel: Show Mentor (on), Panel position (Auto, Top Left, Bottom Left; Auto), Panel text size (Tiny, Small, Normal, Large; Tiny), Panel detail (Compact, Full; Compact).
Theme: Theme (Auto, Light, Dark; Auto).
Every setting has an (i) tooltip that explains it in plain English.
ALERTS
Alerts say what changed, and only after a candle closes. Four conditions are in the alert dialog:
"State changed to trending up" and "State changed to trending down".
"State changed to ranging" and "State changed to no clear regime".
Each message describes the closed candle, for example "Regime Mentor changed to ranging on a closed bar." No message tells you what to do or where price will go.
LIMITATIONS
Both checks are built from past candles, so every regime is named late: a trend after it has started, a range after it has formed. One of three limit lines closes every panel:
"Regimes describe the last stretch only."
"Ten candles settle each past change."
"Choppy changes can hide a clean regime."
The counts come from one chart, one timeframe and the last 500 candles. Small samples, changing markets and the rolling window all move them. That is why no lean appears under 12 changes and why the other way is always shown. "No clear regime" is a common and honest answer. A lean can sit beside a change that goes the other way. The higher timeframe adds context, not certainty. Different settings give different reads on the same chart, and none is the right one.
WHY THE CODE IS PROTECTED
The classic parts are public and explained above: Wilder's ADX and directional movement, the Choppiness Index formula, and one higher timeframe. What is protected is our teaching work: the panel wording engine that turns the two checks and the counts into plain sentences, and the counting rules (the event rule, the 10-candle outcome window, the four lean tests and the sideways ranking).
CREDITS
J. Welles Wilder Jr. for directional movement, +DI, -DI and ADX (New Concepts in Technical Trading Systems, 1978). E. W. Dreiss for the Choppiness Index. The regime rules, counts and wording are ours.
ONE CONCEPT, READ WELL
[TP] RSI - Mentor, [TP] Volume - Mentor, [TP] Market Structure - Mentor, [TP] Trend - Mentor, [TP] VWAP - Mentor, [TP] Fibonacci - Mentor, [TP] MACD - Mentor, [TP] Bollinger Bands - Mentor and [TP] Regime - Mentor each read one thing deeply, for free. Markets rarely move on one thing. The full Titan suite reads them together: momentum, volume, trend structure and flow, combined into one plain-English read.
SHARE YOUR CHART
Add it to a market you follow and share your chart in the comments. Tell us which regime the panel named and whether you read it the same way. We read every one.
This script is for education and interpretation only. It is not financial advice and does not make performance claims.
Educational interpretation only. Not financial advice.
WHAT STAYS THE SAME
The maths is the standard kind, at the usual settings. Strength is Wilder's ADX and direction is +DI against -DI, both on length 14 and smoothing 14. Overlap is the Choppiness Index formula over 14 candles. It reads finished candles only. The counts are history, not promises.
QUICK ANSWERS
What is a regime? The mode the market is in. Trending means price has been moving one way with strength and the candles cover new ground. Ranging means weak direction and candles that overlap, so price goes back and forth.
Does it repaint? No. The regime, the counts, the marks and the alerts all wait for the candle to close. A past change is only counted once the 10 candles after it have closed.
What does "Leans up" mean? The chart is trending up now, and on this chart, past changes into a trend mostly held for the next 10 candles. It is a count of what happened here, not a promise about what comes next.
Why do I see "No lean yet"? A lean needs at least 12 past changes on this chart. Fewer than that can line up by chance.
Will it tell me what to do? No. It explains which mode the market is in and what past changes did. Decisions stay with you.
WHAT YOU SEE ON THE CHART
1. Held mark (circle): a past change into a new regime that held for 10 candles.
2. Switched back (square): a past change that went back once within 10 candles.
3. Flipped twice (ring): a past change that flipped two or more times. Choppy.
4. Header and lean: the answer first, in its colour.
5. Panel rows: the regime now, the count as n of m, the other way, the limit.
The numbers match the list above.
It sits on the price chart. The panel starts at the top left and moves to the bottom left when the highest candle on screen is in the left third, so recent price stays clear. It explains. It never tells you what to do.
THE REGIME IN PLAIN WORDS
The panel's second row always names the regime on the last finished candle:
"Trending up now."
"Trending down now."
"Ranging now."
"No clear regime now."
Two checks decide it. Strength is Wilder's ADX, with +DI and -DI for the direction. Overlap is how much the candles cover the same ground, the idea behind the Choppiness Index. A trend needs clear strength (25 or more by default) and low overlap (50 or less). A range needs weak strength (under 25) and high overlap (55 or more). Anything in between, or equal pushes both ways, is "No clear regime". It never forces a call. With no clear regime, the next row reads "No regime to count right now." and no marks show.
Another market. When the checks disagree, it says so.
PAST CHANGES, MARKED
A regime change is a finished candle where the read moves into trending up, trending down or ranging from a different read, including from "No clear regime". After each change the indicator watches the next 10 finished candles and sorts it by whether the read crossed between trending and ranging (candles with no clear regime are ignored):
A filled circle: held regime. It never crossed over in those 10 candles.
A square: switched back. It crossed over once.
A hollow ring: flipped twice. It crossed over two or more times.
Each mark sits at the close of the candle where the change began, and appears only after its 10 candles have closed, so it never moves. The chart shows marks for past changes like the current regime: changes into a trend on a trending chart, changes into a range on a ranging chart. "Past marks to show" sets how many (12 by default); marks older than the newest 6 are lighter. Hover over a mark for its name. "Show still-open event" (off by default) adds one faint ring at a change that is still being watched: "Still open, not counted yet".
Past changes into a trend on this chart, each marked by how it turned out.
THE LEAN, AS A COUNT
The panel counts past changes like the current regime, from the last 500 finished candles, and shows the result as n of m. A real read, NAS100 15 minutes at the 16 Oct 2026 close:
"[TP] REGIME | Leans down"
"Trending down now."
"Leans down: trends held 12 of 13 here."
"Other way: 1 of 13 switched back."
"0 of 13 flipped twice or more."
"Trends" means changes into either trend, up or down. A lean needs four tests to pass: at least 12 past changes; a smoothed share for "held" of at least 60 in 100, with one imaginary change added to each outcome so a small sample cannot look perfect; a lead of at least 3 over the next outcome; and the same leader in the older and the newer half of the changes. The three counts always add up to the total. The panel never prints a percentage.
Under 8 changes it says "Too few here to count yet (n)." From 8 to 11 it says "No lean yet: n here, need 12." and shows both sides, for example "Held 6 of 9; switched 2 of 9." When enough changes give no clear leader, it says "No clear lean here." When neither held nor flipped twice leads in both halves, the last count reads "Mixed halves; n of m flipped twice."
SIDEWAYS: MORE CAUTION
The sideways read is ranked first, ahead of up and down. It shows when the chart is ranging now and past changes into a range here held, or when past changes here flipped twice so often that chop leads in both halves. Then the header reads "Sideways: more caution" in gold and the lean row reads "Sideways: more caution here." The regime row still says what the chart is doing now, so a trending chart with a choppy history shows both.
A sideways read, with both sides counted.
THE HIGHER TIMEFRAME
With "Panel detail" on Full, one row compares this chart with the same regime read on the next higher timeframe, from its last finished candle (Weekly on a daily chart, Daily on a 4-hour chart, 4 hours on a 1-hour chart, 1 hour on a 15-minute chart):
"Agrees: higher timeframe matches."
"Neutral: higher timeframe is unclear."
"Conflicts: higher timeframe differs."
Full also says what would change the read, "Changes if: trend and range switch.", and adds the legend "● held ■ switched ○ flipped twice" when the marks are on.
Panel detail on Full: the higher timeframe, what would change the read, and the legend.
HOW IT WORKS (PROTECTED SOURCE)
Inputs used: the high, low and close of each finished candle. Strength and direction come from Wilder's ADX, +DI and -DI (length 14, smoothing 14). Overlap comes from the Choppiness Index formula (14 candles). The regime rule is the one above: trend at strength 25 or more with overlap 50 or less, range at strength under 25 with overlap 55 or more, otherwise no clear regime.
The event rule: a change starts on a finished candle whose read is trending up, trending down or ranging and differs from the candle before. The outcome window is the next 10 finished candles: no crossing between trending and ranging is held, one is switched back, two or more is flipped twice. A change that starts while another is still being watched is not counted, so the same stretch is never counted twice.
The count uses settled changes like the current regime from the last 500 finished candles. The minimum sample for any lean is 12. Nothing reads the candle that is still open, and the higher timeframe uses its last finished candle.
WHY EACH PART IS IN THE BUNDLE
Strength (ADX with +DI and -DI): says whether one side has been pushing clearly, and which side. On its own it cannot tell a clean move from a choppy one.
Overlap (the Choppiness Index formula): says whether the candles keep covering the same ground. It fills the gap strength leaves, so a trend needs both checks and a range needs both checks the other way.
The past-change count and the marks: turn the regime name into evidence from this chart, with the other way shown, so a read is never just a label.
The higher timeframe row: shows whether the bigger picture agrees, using the same two checks, so nothing new has to be learned.
HOW TO READ THE PANEL
Read it top to bottom: the header gives the answer, the next row names the regime now, then the lean or the count, then both sides, then a limit line and the footer. NAS100 15 minutes at the 16 Oct 2026 close, Compact (the default):
"[TP] REGIME | Leans down"
"Trending down now."
"Leans down: trends held 12 of 13 here."
"Other way: 1 of 13 switched back."
"0 of 13 flipped twice or more."
"Ten candles settle each past change."
"Closed candles, last 500. Not advice."
The NAS100 daily at the same close is the quiet case: "[TP] REGIME | No clear lean", "No clear regime now." and "No regime to count right now."
"Too few here to count yet (n)." means fewer than 8 past changes like this one: there is nothing to count yet. "Sideways: more caution" means chop or a holding range leads here, so give the read more caution. Full adds the higher timeframe line, the change condition and the legend. Before there is enough history, the panel reads "Not ready yet", "Not enough history yet." and "The read starts when its measures are ready." If the trend overlap ceiling is not below the range overlap floor, it reads "Settings need a fix" and "Lower the ceiling or raise the floor."
WHAT THE COLOURS MEAN
Only the lean carries colour: green for "Leans up", orange-red for "Leans down", gold for "Sideways: more caution", muted for "No lean yet" and "No clear lean". Every other row is neutral, so colour always means the answer. The marks are neutral grey shapes, so their meaning lives in the shape and reads in black and white. "Show chart tint" (off by default) adds a faint wash of the regime colour behind the chart. There are no free colour pickers. "Theme" on Auto matches your chart background: Paper on a light chart, Ink on a dark one.
A dark chart. Theme on Auto picks the dark look by itself.
SETTINGS
Reading: Direction and strength length (14), Strength smoothing (14), Range check length (14), Clear trend strength (25), Trend overlap ceiling (50), Range overlap floor (55).
Display: Show chart tint (off), Tint strength (80 to 100; 94), Mark past events (on), Past marks to show (0 to 30; 12), Show still-open event (off).
Mentor panel: Show Mentor (on), Panel position (Auto, Top Left, Bottom Left; Auto), Panel text size (Tiny, Small, Normal, Large; Tiny), Panel detail (Compact, Full; Compact).
Theme: Theme (Auto, Light, Dark; Auto).
Every setting has an (i) tooltip that explains it in plain English.
ALERTS
Alerts say what changed, and only after a candle closes. Four conditions are in the alert dialog:
"State changed to trending up" and "State changed to trending down".
"State changed to ranging" and "State changed to no clear regime".
Each message describes the closed candle, for example "Regime Mentor changed to ranging on a closed bar." No message tells you what to do or where price will go.
LIMITATIONS
Both checks are built from past candles, so every regime is named late: a trend after it has started, a range after it has formed. One of three limit lines closes every panel:
"Regimes describe the last stretch only."
"Ten candles settle each past change."
"Choppy changes can hide a clean regime."
The counts come from one chart, one timeframe and the last 500 candles. Small samples, changing markets and the rolling window all move them. That is why no lean appears under 12 changes and why the other way is always shown. "No clear regime" is a common and honest answer. A lean can sit beside a change that goes the other way. The higher timeframe adds context, not certainty. Different settings give different reads on the same chart, and none is the right one.
WHY THE CODE IS PROTECTED
The classic parts are public and explained above: Wilder's ADX and directional movement, the Choppiness Index formula, and one higher timeframe. What is protected is our teaching work: the panel wording engine that turns the two checks and the counts into plain sentences, and the counting rules (the event rule, the 10-candle outcome window, the four lean tests and the sideways ranking).
CREDITS
J. Welles Wilder Jr. for directional movement, +DI, -DI and ADX (New Concepts in Technical Trading Systems, 1978). E. W. Dreiss for the Choppiness Index. The regime rules, counts and wording are ours.
ONE CONCEPT, READ WELL
[TP] RSI - Mentor, [TP] Volume - Mentor, [TP] Market Structure - Mentor, [TP] Trend - Mentor, [TP] VWAP - Mentor, [TP] Fibonacci - Mentor, [TP] MACD - Mentor, [TP] Bollinger Bands - Mentor and [TP] Regime - Mentor each read one thing deeply, for free. Markets rarely move on one thing. The full Titan suite reads them together: momentum, volume, trend structure and flow, combined into one plain-English read.
SHARE YOUR CHART
Add it to a market you follow and share your chart in the comments. Tell us which regime the panel named and whether you read it the same way. We read every one.
This script is for education and interpretation only. It is not financial advice and does not make performance claims.
Educational interpretation only. Not financial advice.
發行說明
The lean line now uses this pattern's history across about 200 markets, with this chart's own count beside it. Where the history splits evenly, the panel says so.發行說明
Daily-chart history numbers recalculated on cleaned price data (198 markets). Hourly numbers unchanged.發行說明
Daily numbers corrected. A fault in our price history moved some daily highs and lows, so we re-ran every daily count on clean prices across 198 markets. Daily charts now read: trends held 85 of 100 (random candles 87) and ranges held 86 of 100 (random 86). Before it was 83 and 89 across 192 markets. Hourly numbers are unchanged: 92 and 75. The panel still says No clear lean, because random candles in the same regime did about the same. The per-chart lean and the four tests in the description were replaced by this count in October. Also: bigger marks, a gold ring for a change still being counted, and Auto no longer puts the panel bottom left.發行說明
Removed the cross-market line from the panel. Every number shown now comes from this chart.發行說明
Panel is now see-through by default (Solid still available) and can be placed in any of the 9 positions.發行說明
Panel is now see-through by default (Solid still available) and can be placed in any of the 9 positions. Auto placement now keeps clear of the price tags.發行說明
The panel now always gives a read: up, down or sideways, how strong, why, and the price where the read is wrong. New alerts for read changes.發行說明
Read now moves on cleanly after its Wrong-if level is passed.發行說明
Read strength now holds steady instead of switching between strong and moderate.發行說明
Auto placement now keeps the panel clear of the latest candles.發行說明
Sideways reads now treat a close outside the range as a break, so the range no longer stretches over a breakout.🛡️ Take profits, not chances. Manage risk to accumulate. 🛡️
Free Mentor indicators, guides and lessons 🌐 TitanProtect.trade/indicators/
Daily market research 🌐 TitanProtect.trade/alpha-insights/
Free Mentor indicators, guides and lessons 🌐 TitanProtect.trade/indicators/
Daily market research 🌐 TitanProtect.trade/alpha-insights/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
🛡️ Take profits, not chances. Manage risk to accumulate. 🛡️
Free Mentor indicators, guides and lessons 🌐 TitanProtect.trade/indicators/
Daily market research 🌐 TitanProtect.trade/alpha-insights/
Free Mentor indicators, guides and lessons 🌐 TitanProtect.trade/indicators/
Daily market research 🌐 TitanProtect.trade/alpha-insights/
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。