Nate - Opening Playbook - Regime DetectorDetermines what kind of market you are in by looking at the amount of touches on key EMAs.
This indicator classifies the market into one of three regimes—Bull Trend, Bear Trend, or Range—by looking at how consistently price has been closing above or below key moving averages over a recent window.
You choose a lookback period (X candles) and three EMA lengths (Fast/Middle/Slow). For each EMA, the indicator calculates the percentage of the last X candles that closed above it (for Bull) or below it (for Bear).
Bull Trend = over the last X candles, price has closed above the Fast, Middle, and Slow EMAs at least as often as your Bull thresholds require.
Bear Trend = over the last X candles, price has closed below the Fast, Middle, and Slow EMAs at least as often as your Bear thresholds require.
Range = anything that doesn’t meet the Bull or Bear trend requirements.
Pine Script®指標






















