Sort every candle into one of four market regimes and act only on the transitions
Institutional Trade Regime measures how strong the 200-candle move is against normal candle noise, sorts every candle on your TradingView chart into one of four model regimes and colours it: gray, orange, green or red.
- Four regimes from a trend-strength value over 200 candles, shown as gray, orange, green and red candles.
- ITRM BUY and ITRM SELL triangles on the candle where the regime changes.
- Entry at the close, a stop beyond the last 10 candles and a target at twice the risk.
- A dashboard with every model value, plus the same values in TradingView's Data Window.
- The full Pine Script source code. Paste it into the Pine Editor, save, and add “Institutional Trade Regime [AlgoFXStore]” to your chart.
- A 15-page PDF manual with installation, every setting and how to read the chart. One-time €47.

See Institutional Trade Regime on a real chart
Press play; use the full-screen button to see every detail.
The same signal means different things in a quiet market and a stretched one
Most trading mistakes are not about the entry pattern, they are about the market it appears in. A breakout in a quiet, two-sided session fails; the same breakout in a market that is building strength runs. A reversal setup in a move that is already stretched far beyond its usual noise works; in a calm drift it gets run over. Traders know this, but they judge the market state by feel, and feel changes with the last few trades.
Trend tools do not answer the question either. A moving average tells you the direction, not whether the move is strong compared with the normal noise of that market. And the moment that matters most, the change from one state into another, is exactly the moment a slow tool reports late or not at all.
Institutional Trade Regime puts a number on the market state and draws it on every candle. It measures the 200-candle move in units of normal candle noise, compares it with thresholds solved from four model parameters, and marks the candle where the regime changes. You see which state the market is in, when it switched, and a structural stop and target for the newest switch.
Everything Institutional Trade Regime draws on your chart
Read from the shipped Pine Script code.
- barcolor on every candle by regime: gray NO CAPABILITY, orange CONFLICT PRONE, lime REFORM PRONE, red NO INCENTIVE
- Optional regime background, same colours at 90 % transparency
- ITRM BUY: lime triangle-up below the bar with text 'ITRM BUY'; ITRM SELL: red triangle-down above the bar with text 'ITRM SELL'
- Newest setup only: yellow width-2 entry line + yellow label 'BUY ENTRY' / 'SELL ENTRY', red width-2 stop line + red label 'STOP LOSS', lime width-2 target line + lime label 'TAKE PROFIT (2R)'; lines from the transition bar to 30 bars right, labels at the right end
- Dashboard table top right, 2 x 11: header 'ITRM MODEL' / 'LIVE VALUES' (black, white text), then Current Regime (value cell in the regime colour), k_i, K_i, Theta, H Threshold, P43, Root Status, Latest Transition, Reference R:R, Current Setup
- Data Window values k_i, K_i, Theta, H threshold, P_win ^ (4/3)
- AlgoFXStore badge table bottom right
A strength value, four regimes and a setup at each transition
This is the shipped Pine Script logic in plain words. It uses only the chart's own candles: no other timeframes, no other symbols, no volume and no order-flow data.
- 1
k_i measures the strength of the move
The script takes the change of the close over the last 200 candles and divides it by the normal candle-to-candle change, the 200-candle standard deviation of one-candle changes times the square root of 200. The result is mapped to a value between 0 and 1 and smoothed with a 20-candle EMA. That is k_i. The change is taken without its sign: a strong fall raises k_i like a strong rise.
- 2
Thresholds come from four parameters
From t_i (0.20), C (0.30), K prime (0.70) and P win (0.40) the model computes theta, P43 as P win to the power of 4/3, and solves for a threshold H by bisection. With the defaults theta is 0.0568, P43 is 0.2947, H is 0.0158 and P43 minus H is 0.2789. The Root Status row tells you whether the solver found H inside its range.
- 3
Each candle gets a regime
Below H the candle is NO CAPABILITY, gray. From H to P43 minus H it is CONFLICT PRONE, orange, a quiet two-sided market. From there to P43 it is REFORM PRONE, green, a narrow band with the defaults. P43 and above is NO INCENTIVE, red, a stretched move. Candle colouring is on by default; a background shade in the same colours is optional.
- 4
Transitions are the signals
ITRM BUY prints when the regime becomes REFORM PRONE after a candle that was not; ITRM SELL when it becomes NO INCENTIVE. When strength keeps rising, k_i passes through the green band in a few candles, so BUY and then SELL can follow quickly. Because k_i has no direction, an ITRM BUY can print during a strong fall: the names are regime transitions, not price forecasts.
- 5
A setup for the newest transition
On the transition candle the entry is the close. For a BUY the stop is the lowest low of the 10 candles before it minus the Stop buffer (0.0); for a SELL the highest high plus the buffer. The target is the entry plus or minus 2.0 times the stop distance. Yellow entry, red STOP LOSS and lime TAKE PROFIT (2R) lines run 30 candles to the right.
Institutional Trade Regime on 12 different markets
Every chart below is a screenshot of TradingView itself with the shipped Institutional Trade Regime [AlgoFXStore] attached at its default settings. Forex, metals, indices, energy and crypto, so you can see how it reads each kind of market. They show what the indicator draws; they are not trading results. Tap or click any chart to open it full size.












Institutional Trade Regime on a real TradingView chart, frame by frame
Frames of a screen recording of the shipped indicator at its default settings, as the chart updates. Nothing is edited into the chart.




Using regime transitions with your own direction check
The indicator colours, draws and alerts. The direction check, the size and the orders are yours; this routine follows the PDF guide and is worth practising in simulation first.
- 1
Note the regime before the session
Read Current Regime in the dashboard and decide in advance which regimes you trade in. Many traders stand aside while the candles flip between colours every few bars. Make sure at least 220 candles are loaded: the first 200 plus 20 smoothing candles have no meaningful regime. Check the calendar and skip setups from about 10 minutes before to 10 minutes after high-impact releases.
- 2
Wait for the candle to close
The regime, the triangles and the setup lines are recalculated on every price update of the live candle, so a triangle can appear and vanish before the close. A transition counts only when its candle has closed with the triangle still there. Set the ITRM Buy and ITRM Sell alerts to Once Per Bar Close so they wait as well.
- 3
Check direction and the side of the stop
Because k_i has no direction, check it yourself. Take an ITRM BUY only when the red STOP LOSS line is below the entry and the last swings make higher lows; take an ITRM SELL only when the stop is above the entry and the swings point down. If the transition candle closed beyond the 10-candle range, the stop lands on the wrong side: skip that setup.
- 4
Size from the stop in ticks
The stop distance divided by the tick size gives ticks, and ticks times the tick value give the risk per contract. Divide your risk budget per trade by it and round down; if not even one micro contract fits, skip. A Stop buffer of two ticks, such as 0.50 on NQ and ES, moves the stop off the exact 10-candle low or high, where many stops sit.
- 5
Place a bracket and write the prices down
Enter with a bracket in your trading platform: a stop order at the STOP LOSS price and a target at the TAKE PROFIT price. Write both prices down, because a later transition deletes the setup's lines from the chart while your position and orders stay. Stop after two or three losing trades in a session, and be flat before your session ends.
The dashboard, row by row
- ITRM MODEL | LIVE VALUES (header)
- Current Regime: NO CAPABILITY / CONFLICT PRONE / REFORM PRONE / NO INCENTIVE (cell in the regime colour)
- k_i (4 decimals)
- K_i = (1 - t_i) x k_i
- Theta
- H Threshold
- P43 = P win ^ (4/3)
- Root Status: Bracketed / Fallback used
- Latest Transition: BUY / SELL only when the transition is on the last bar, otherwise '
- Reference R:R: e.g. 2R
- Current Setup: BUY / SELL / NONE (direction of the newest setup)
Everything Institutional Trade Regime does for you
A market state on every candle
Gray, orange, green and red candles show the model regime at a glance, so you can see at once whether the market has been quiet, two-sided, building or stretched over the last hours.
Strength measured against noise
k_i compares the 200-candle move with the normal candle-to-candle change of the same market, so the scale is always relative to the noise of the market you are looking at, whether it is a quiet forex pair or a fast index future.
Transitions marked where they happen
ITRM BUY and ITRM SELL triangles print on the candle where the regime changes. The triangles stay on the history, so you can scroll back and see how each market moved through its regimes.
A structural setup with a fixed ratio
Entry at the transition close, a stop beyond the 10 candles before it plus an optional buffer, and a target at your chosen reward-to-risk, 2.0 by default. Lookback, buffer, ratio and line length are inputs.
Every model value in the open
The dashboard lists Current Regime, k_i, K_i, Theta, H Threshold, P43, Root Status, Latest Transition, Reference R:R and Current Setup. The model values also appear in the Data Window for any candle under the cursor.
Tunable model parameters
t_i, C, K prime and P win move the thresholds, k_i Lookback and k_i Smoothing change the strength estimate, and a manual k_i lets you freeze it. The guide recommends the defaults until you know the indicator.
Three alert conditions
ITRM Buy, ITRM Sell and ITRM Regime Changed. Create them with Once Per Bar Close, after your last settings change, so they fire on the closed candle with the values you use.
Light on resources
No request.security calls, no lower-timeframe or seconds data, only the chart's own candles. It runs on every symbol and timeframe and on TradingView's free plan.
Institutional Trade Regime, feature by feature
Each picture is built from real platform screenshots of the shipped indicator at its default settings, labelled so you can see what every part does. Tap any picture to open it full size.








How traders put it to work
Index futures on 15 minutes
The guide's starting point for NQ, ES and their micro contracts: 200 candles are about two trading days, and transitions come often enough to have several setups in view. Use a Stop buffer of 0.50, two ticks, and size every setup in ticks before you place the bracket.
Gold and crude oil futures
15 minutes is also the starting point on GC, MGC, CL and MCL. Two ticks of buffer are 0.2 on gold and 0.02 on crude. Crude has a weekly inventory report that belongs in your news window along with CPI, the Fed decision and the jobs report.
Tighter or wider stops
10 candles on 15 minutes are two and a half hours of structure. A lookback of 5 to 6 gives tighter stops and more contracts for the same risk but is stopped by normal noise more often. The guide notes 1.5 as a reward-to-risk that is reached more often and 2.0 to 3.0 for trending days.
Forex, crypto and stocks
The model uses only the chart's own candles, so it runs on any symbol. Transitions are counted in candles, so a shorter timeframe gives more transitions per day and a longer one fewer. Convert the stop into pips or points of that market before sizing.
Every setting, with its default
The names are the ones in the script's Settings dialog in TradingView (Inputs tab); the defaults are what every chart on this page uses.
ITRM Model Parameters (8)
| Setting | Default | What it does |
|---|---|---|
| t_i | 0.2 | Model parameter (0.001-0.999): scales K_i = (1 - t_i) x k_i and theta = (1 / (1 - t_i)) x (C^8 / K prime)^(1/3). |
| C | 0.3 | Model parameter (0.001-0.999) in theta; raising it raises the H threshold. |
| K prime | 0.7 | Model parameter (0.001-0.999) in theta; raising it lowers theta and H. |
| P win | 0.4 | Model parameter (0.001-0.999): P43 = P win ^ (4/3) is the top of the REFORM PRONE band. An input assumption of the model, not a measured statistic of the indicator. |
| Use automatic k_i estimate | on | On = k_i from the 200-bar trend-strength estimate; off = Manual k_i. |
| Manual k_i | 0.5 | Fixed k_i when the automatic estimate is off (the regime then never changes). |
| k_i Lookback | 200 | Bars for the trend-strength estimate (min 20). |
| k_i Smoothing | 20 | EMA length that smooths the estimate (min 1). |
Chart Display (4)
| Setting | Default | What it does |
|---|---|---|
| Color candles by regime | on | Gray / orange / lime / red candles. |
| Show regime background | off | Background shading in the regime colour. |
| Show transition signals | on | ITRM BUY / ITRM SELL triangles. |
| Show model dashboard | on | The table at the top right. |
Entry / SL / TP Levels (5)
| Setting | Default | What it does |
|---|---|---|
| Show latest setup levels | on | Entry, stop and target of the newest transition; off deletes them. |
| Structural stop lookback | 10 | Bars before the transition used for the stop: lowest low (BUY) / highest high (SELL), 2-100. |
| Stop buffer (price units) | 0 | Added beyond the structural stop, in price (0.50 = 2 ticks on NQ / ES). |
| Take profit reward-to-risk | 2 | Target distance as a multiple of the stop distance. |
| Horizontal line length (candles) | 30 | Length of the setup lines to the right (5-200). |
AlgoFXStore (1)
| Setting | Default | What it does |
|---|---|---|
| Show AlgoFXStore badge | on | Small AlgoFXStore name in the chart corner. |

The alert events, one by one
In TradingView: Create alert, choose “Institutional Trade Regime [AlgoFXStore]” as the condition and pick the event. TradingView then notifies you the way you set in that dialog: a pop-up in TradingView, a sound, the TradingView app on your phone or an e-mail.
- ITRM Buy
- ITRM Sell
- ITRM Regime Changed
Institutional Trade Regime next to the usual options
Where it wins, and where it does not.
| Institutional Trade Regime | Typical free trend-strength indicator | Reading it by hand | |
|---|---|---|---|
| What it measures | The 200-candle move in units of normal candle noise, sorted into four regimes | Usually one strength line, such as ADX, in its own pane | An impression of the last few hours |
| Where you see it | On the candles themselves, plus a dashboard | A separate pane below the chart | In your head |
| Change of state | Marked on the transition candle with a triangle and an alert | You read the crossing yourself | Often noticed late |
| Direction | None: you check direction yourself before each setup | Some show direction with separate lines | You judge it yourself |
| Stop and target | Structural stop and a 2R target for the newest transition | Not included | Measured by hand |
| Simplicity | Four model parameters to understand | One or two lengths | Nothing to learn |
| Cost | A one-time purchase | Free | Free, paid for in screen time |
Honest about who this fits
A good fit if you
- You want to know what state the market is in before you trade any setup, and you like that state drawn on the candles.
- You are comfortable doing a direction check yourself, because the model measures strength, not direction.
- You trade intraday futures, gold, crude or forex and size every stop in ticks or pips before you enter.
- You like to see every number behind a signal, from k_i to the solved threshold, instead of a black box.
- You place your own bracket orders and want an alert when the regime changes on a closed candle.
Not for you if you
- You want a BUY that always means price will rise: here BUY and SELL are names of regime transitions.
- You need a signal that is final while the candle is still forming: only the close decides.
- You want a tool that tracks stops and targets or manages trades: it draws the newest setup and alerts.
- You want order-flow or volume data: despite the name, the model reads only the chart's own prices.
The full code, one manual, installed in two minutes
- 1Pine Script source codeInstitutional_Trade_Regime_TradingView_Code.txt (16 KB): the full code. Paste it into the Pine Editor and it appears as “Institutional Trade Regime [AlgoFXStore]”.
- 15Page PDF manualInstallation, every setting with its default and how to read the chart.
- 18SettingsEvery one explained above, with the defaults the charts use.
- ✓Alert eventsYou choose which ones are on in the settings.
- 60Day money-back guaranteeIf it is not for you, request a full refund within 60 days through your Digistore24 order e-mail.
Install in five steps
- Download the zip from the page Digistore24 sends you to after checkout and unzip it.
- Open Institutional_Trade_Regime_TradingView_Code.txt in a text editor, select all and copy the whole code.
- In TradingView, open the Pine Editor, paste the code over everything that is there and click Save.
- Click Add to chart: “Institutional Trade Regime [AlgoFXStore]” appears on your chart.
- Read the PDF manual; the defaults are the settings shown on this page.

Kestutis Balciunas
AlgoFXStore · chart indicators
Kestutis Balciunas builds and publishes chart indicators under the AlgoFXStore name. Every product page shows what the indicator draws on real charts, and every number on it comes from the shipped build.
The charts on this page were captured in TradingView from the shipped Institutional Trade Regime [AlgoFXStore] at its default settings and are shown unedited.
No get-rich claims and no quoted win rates. Every trade is uncertain, and no indicator changes that. If you want to know whether it suits the way you trade before you buy, e-mail [email protected] and you will get a straight answer.
One price, one payment
- The full Pine Script source code of Institutional Trade Regime and the 15-page PDF manual
- Delivered as a digital download: one zip with the code file and the PDF manual on your download page
- Return period: 60 days, with a full refund if it is not for you
- Free updates to the current version on the same download page
60-day money-back guarantee. Install it, run it on your own charts and read the manual. If Institutional Trade Regime is not for you within 60 days of purchase, request a full refund from Digistore24, no questions asked: use the refund link in your Digistore24 order e-mail or Digistore24's order page digistore24.com/en/cancel-revoke-contract. Digistore24 refunds to your original payment method. It is a digital download: right after checkout you land on your download page, and the link to it is also in your Digistore24 order e-mail.
About the signals
Does Institutional Trade Regime repaint its signals?
Closed candles keep their values: there is no request.security, no lookahead and no future reference. The live candle is different. The script does not wait for barstate.isconfirmed, so the regime colour, an ITRM BUY or SELL triangle and the setup lines are recalculated on every price update and can appear and disappear before the candle closes. Read the signal after the close and set alerts to Once Per Bar Close.
Does ITRM BUY mean price will go up?
No. It means the model's regime turned REFORM PRONE on that candle. The strength value k_i is taken without its sign, so an ITRM BUY can print during a strong fall and an ITRM SELL during a strong rise. Check the chart's direction yourself, for example with the side of the stop and the last swings.
Why do BUY and SELL sometimes follow each other within a few candles?
With the default parameters the REFORM PRONE band is narrow, from 0.2789 to 0.2947. When the strength of the move keeps rising, k_i passes through it quickly: ITRM BUY prints as it enters the band and ITRM SELL as it leaves upward into NO INCENTIVE. When strength fades back into the band, ITRM BUY prints again.
Why does the chart show no meaningful regime at the start?
The strength estimate needs 200 candles of history plus a 20-candle EMA, about 220 candles in all. Before that k_i has no valid value. Scroll right or load more history; on most timeframes the loaded history is far longer than that.
Levels and the dashboard
Why is the stop sometimes on the wrong side of the entry?
The stop comes from the 10 candles before the transition candle. If the transition candle itself closed beyond that range, below the 10-candle low on an ITRM BUY or above the 10-candle high on an ITRM SELL, the STOP LOSS line lands on the wrong side and the target on the other. Transitions often come with strong candles, so this happens. Skip such setups.
Why did the previous setup's lines disappear?
Only the newest setup is drawn. A new transition deletes the old lines and labels, so earlier setups remain visible only through their triangles. The lines also do not track whether the stop or the target was reached, so write your prices down when you enter.
What is P win?
One of the four model parameters. P43, P win to the power of 4/3, sets the top of the REFORM PRONE band. It is an assumption of the model that you can change, not a measured result of the indicator or a probability of anything.
What does Root Status mean?
It reads Bracketed when the solver found the threshold H inside its search range, and Fallback used when it did not; then the nearer end of the range is used. With the default parameters it reads Bracketed. It matters only when you experiment with the model parameters.
Setup and alerts
Which timeframe should I use?
15 minutes is the guide's starting point on index futures, gold and crude oil. The indicator runs on every timeframe; because transitions are counted in candles, shorter timeframes give more transitions per day and longer ones fewer.
Which alerts can I create?
Three: ITRM Buy, ITRM Sell and ITRM Regime Changed. In Create alert, pick the indicator, the condition and Once Per Bar Close. Re-create alerts after you change settings, so they use the new values.
Should I change the model parameters?
Leave them at the defaults until you know how the regimes behave on your market. If you experiment, the dashboard shows theta, H, P43 and the root status for every change, so you can see exactly how the bands moved. Manual k_i freezes the strength value, and then the regime never changes.
Does it work on forex, crypto and stocks?
Yes. It uses only the chart's own candles, with no session logic and no request calls, so it runs on any TradingView symbol and on the free plan. Convert the stop distance into that market's pips or points before you size a trade.
How it works
Will it place trades for me?
No. Institutional Trade Regime is an indicator: it draws on the chart and can alert you. It never sends an order.
Which markets and timeframes does it work on?
Any TradingView symbol and timeframe (no request.* calls, no session logic). Warm-up about 220 bars (200 lookback + 20 EMA). Transitions are counted in bars, so a shorter timeframe gives more transitions per day.
Do I need a paid TradingView plan?
No. It reads only the chart's own bars, so the free TradingView plan runs it. Alerts count against your plan's alert limit.
After you buy
How do I get it after paying?
Digistore24 runs the checkout. Right after payment it takes you to your download page with one zip holding the Pine Script source code file and the PDF guide; the link to that page is also in your Digistore24 order e-mail, so you can download again at any time.
How do I install it?
Open the code file, open the Pine Editor in TradingView, paste the whole code, click Save and then Add to chart: “Institutional Trade Regime [AlgoFXStore]” appears on your chart. The guide walks through it step by step.
Who is Digistore24?
Digistore24 is the reseller that sells Institutional Trade Regime for Kestutis Balciunas (AlgoFXStore): it runs the checkout, charges your card or PayPal, collects the VAT for your country and delivers the download. Its name is the one on your statement, and its order e-mail holds your download link and the refund link.
What is the refund policy?
A 60-day money-back guarantee, handled by Digistore24. If Institutional Trade Regime is not for you within 60 days of purchase, use the refund link in your Digistore24 order e-mail or Digistore24's order page (digistore24.com/en/cancel-revoke-contract) for a full refund, no questions asked. Digistore24 makes the refund to your original payment method.
Do I get the source code?
Yes. You get the full Pine Script source code as a text file for your own use; the licence line at the top of the code does not allow resale, sharing or republishing.
Institutional Trade Regime for TradingView.
Put the market's regime on every candle and a structural stop on every transition, and decide the direction with your own eyes. The full code, the manual and every setting explained. Instant download for €47, one payment.
Get instant access