Skip to content
OSS SOURCE CODES

Xhmaster | Formula Indicator

The gray neutral zone is not noise—it's a warning. Forcing trades during neutral conditions is the #1 cause of drawdowns with this indicator.

[ Upper\ Envelope = EMA_20 + (ATR_10 \times 1.5) ] [ Lower\ Envelope = EMA_20 - (ATR_10 \times 1.5) ]

When used correctly, the Xhmaster eliminates the need for a messy dashboard of 10 separate indicators. One chart, one formula, one decision.

// Normalized Momentum Oscillator (NMO) period_mom = 14 price_change = close - close[period_mom] mean_change = ta.sma(price_change, period_mom) std_change = ta.stdev(price_change, period_mom) nmo_raw = (price_change - mean_change) / std_change nmo = (nmo_raw + 3) / 6 * 100 Xhmaster Formula Indicator

//@version=6 indicator("Xhmaster Formula Indicator", overlay=true) // Parameters length = input.int(22, "ATR Length") multiplier_base = input.float(1.5, "Base Multiplier")

Disclaimer: Past performance does not guarantee future results. Always backtest any indicator on historical data before live deployment.

The Xhmaster scans for hidden and regular divergences between the NMO and price action, flagging them as "exhaustion" warnings. 3. Volatility Envelope (Keltner Hybrid) The final filter compares the current close to a volatility-adjusted band: The gray neutral zone is not noise—it's a warning

The Xhmaster performs optimally on 1H, 4H, and Daily charts. On lower timeframes (1m, 5m), the volatility envelope becomes too reactive, producing false strong signals. Final Verdict The Xhmaster Formula Indicator is not a "set and forget" black box. It is a logical framework that forces traders to wait for trend, momentum, and volatility to align. Its mathematical elegance lies in the dynamic ATR multiplier and the z-score normalization of momentum—two features that standard indicators lack.

// Plotting plotshape(strong_buy, title="Strong Buy", location=location.belowbar, style=shape.triangleup, size=size.small, color=color.new(color.green, 0)) plotshape(strong_sell, title="Strong Sell", location=location.abovebar, style=shape.triangledown, size=size.small, color=color.new(color.red, 0))

// Trend Direction trend_up = close > atl trend_down = close < atl One chart, one formula, one decision

The "Formula" aspect comes from the weighted scoring: each layer contributes a specific point value (Trend = 40 points, Momentum = 35 points, Volatility = 25 points). A score above 85 triggers the . Implementation (Pine Script v5 Example) Here is a working implementation of the core Xhmaster logic for TradingView:

Where μ is the mean of 14-period price changes and σ is the standard deviation. The output is then clamped to a range of -3 to +3 and converted to a percentage:

[ NMO = \frac(Close - Close_t-14) - \mu_14\sigma_14 ]

[ Signal = \fracNMO + 36 \times 100 ]