INVITE-ONLY SCRIPT

REGIME SHIFT

13
is designed to identify market regimes based on price position relative to a linear regression line. Here's what it does:

Calculates a linear regression line (reg)
Identifies three possible states:

"Above regime": When the current close price AND previous close price are both above the regression line
"Below regime": When the current close price AND previous close price are both below the regression line
"Flat regime": When neither of the above conditions are true (transitioning between regimes)


The indicator visualizes these states with:

Green background when price is in the "Above regime"
Red background when price is in the "Below regime"
Yellow "FLAT" arrow markers displayed when in the "Flat regime"
The regression line itself (which can be turned off via user input), colored green when above price and red when below price



This indicator helps traders identify whether the market is in an uptrend regime (price consistently above regression line), downtrend regime (price consistently below regression line), or transitioning between regimes (flat). The regression line provides a statistical reference point for price action, helping to filter out noise and identify the underlying trend direction.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.