Indicator · Pine Script v6 · On the chart

Regime Game Probability Forest

by veibae37

This overlay indicator scores a bull, bear, or neutral game state from an auditable decision-forest probability rather than a fitted machine-learning model or live API.

View on GitHub

Repaints

GitHub stars6on the repository
Pine versionv6current
Lines of code283
Settings29inputs
LicenceNone stated
Last update6 days ago22 Oct 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above. It reads the file straight from GitHub.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

The code stays on GitHub. The author has not published this script under an open licence, so ForexR does not show its code. Copy script reads the file straight from GitHub into your clipboard, so you can still try it on your own chart. Ask the author before reusing the code anywhere else.

Overview

Regime Game Probability Forest compares the smoothed probability with bull and bear thresholds, then shifts it when a strong intervention-flow regime is active. Regime data come from manual flow inputs or a four-ETF basket proxy. It colors candles, highlights the regime, labels state changes, and shows a dashboard. It does not place trades.

Details

Published by

veibae37 on GitHub

Type

Indicator, Pine Script v6

Draws

On the price chart

Category

Screeners & dashboards, AI / machine learning

Markets

Stocks

Timeframes

Any timeframe

Risk Notes

  • Reads higher-timeframe data with lookahead on, so the history can show signals that were not there in real time

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Bull game thresholdfloat0.60bullThreshold
Bear game thresholdfloat0.40bearThreshold
Probability EMA smoothingint3probabilitySmoothing
Intervention flow probability shiftfloat0.08flowProbabilityShift
Walk-forward training windowint400trainingWindow
Calibration refresh barsint20retrainEveryBars
Minimum samples per probability binint6minimumBinSamples
Walk-forward calibration weightfloat0.60calibrationWeight
Regime sourcestringManual API valuesregimeSource
API net flow, CNY bnfloat0.0manualNetFlowBn
API basket AUM, CNY bnfloat1000.0manualBasketAumBn
API historical flow z-scorefloat0.0manualFlowZ
Show all 29 settings
SettingTypeDefaultVariable
API strong-event flagboolfalsemanualVendorStrong
API value effective fromtimetimestamp("01 Jan 2024 00:00 +0800")manualEffectiveTime
Strong absolute flow, CNY bnfloat5.0absoluteFlowThresholdBn
Strong flow/AUM ratio, bpsfloat20.0flowRatioThresholdBps
Strong flow z-scorefloat2.0flowZThreshold
ETF 1symbolSSE:510300etf1
ETF 2symbolSSE:510050etf2
ETF 3symbolSSE:510500etf3
ETF 4symbolSZSE:159919etf4
Proxy intervention thresholdfloat2.0proxyZThreshold
Color candles by game statebooltrueshowBarColors
Highlight intervention regimebooltrueshowRegimeBackground
Show probability on state changesbooltrueshowTransitionLabels
Show periodic probability labelsboolfalseshowPeriodicLabels
Periodic label intervalint20periodicLabelBars
Labels only after candle closebooltrueconfirmedLabelsOnly
Show dashboardbooltrueshowDashboard
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

46 stars

This indicator uses a Hidden Markov Model (HMM) framework combined with an adaptive dual moving average engine and Directional Movement Index (DMI) features to identify market regimes (bullish, bearish, or ranging/chop). It calculates regime probabilities on e

Indicator v5 AI / machine learningTrend
Updated 7 weeks ago · None stated GitHub repository of HMM Enhanced: Regime Probability

This overlay indicator plots a SuperTrend-style band on the price chart using ATR length, a selectable source, and a base factor. Optional settings enable an adaptive factor driven by rate of change, a volatility filter, K-means clustering, and an LSTM layer w

Indicator v6 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of ML SuperTrend (Ultimate) - Auto-Optimized AI with LSTM

Ensemble ML Predictor

by haydarkadioglu
1 stars

This indicator overlays a weighted ensemble of three models on the price chart. It compares the current bar with historical bars using RSI, volume ratio, price change and range position, then blends that KNN vote with a linear-regression projection and an EMA-

Indicator v5 AI / machine learningOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Ensemble ML Predictor

Live Tick Counter

by morindok
1 stars

This indicator calculates and plots a multi-factor order-flow analysis using tick counts, volume ratios, big player volume, recent delta momentum, and a K-nearest neighbors pattern matching algorithm. It evaluates bull and bear thresholds across multiple weigh

Indicator v5 VolumeScreeners & dashboards Repaints
Updated 7 weeks ago · None stated GitHub repository of Live Tick Counter

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers