Quant Math By Kalam
What it does
QUANT MATH + 4-EMA MTF + N-CANDLE S/R SUITE
An all-in-one overlay that combines trend, support/resistance and statistical regime analysis in a single dashboard.
WHAT IT DOES
1) 4-EMA Trend Engine
Four fully customizable EMAs (default 9/21/50/200). Trend can be read three ways: Fast vs Slow crossover, all 4 EMAs aligned, or price vs a selected EMA. Candles are colored by the trend (or by the Quant Bias).
2) Multi-Timeframe Trend
The dashboard shows the EMA trend of two higher/other timeframes (default 1H and 30m). Calculated with lookahead off, so no future data leaks in.
3) N-Candle Support & Resistance Zones
Resistance = highest high to highest close of the last N candles. Support = lowest close to lowest low. Choose between Rolling N Candles or Exact Peak/Bottom Candle mode. Zones are drawn on the latest bar only.
4) Quant Math Engine
Hurst exponent (R/S analysis) to classify the regime: Trending, Mean-Reverting or Random
Z-score with ±σ bands around a rolling mean
GBM drift and expected move over a chosen horizon
Order-flow proxy (OFI) estimated from candle close position and volume
5) Quant BUY/SELL Signals
Signals adapt to the regime: trend-following in trending markets, mean-reversion at Z-score extremes, and a 2-way logic when bias is neutral. Each signal plots an ATR/volatility-based SL and a TP (1.5R–2R). Optional filters: chart EMA trend and 1H/30m MTF trend.
6) Dashboard
Bias, active trade, EMA trend per timeframe, S/R levels, Hurst, drift, Z-score, expected move, OFI, plus running win rate, expectancy (R) and a capped half-Kelly figure. Text size is adjustable (Tiny for mobile).
HOW TO USE
Check the regime first (Hurst row). Trust trend signals in TREND, fade extremes in MEAN REV.
Use the MTF rows and S/R zones for context before acting on a signal.
Turn on the EMA/MTF filters for fewer, more selective signals.
ALERTS
Quant Buy, Quant Sell, Bullish EMA Cross, Bearish EMA Cross.
How to use it
- Open the charts and go to Indicators › My scripts › Shared with me (or search the Community library) and press Add to chart.
- The code is protected by the author: the script runs on the chart with the source hidden.
- Invite-only: only members the author authorised can run it.
Version history
- v2 — 27 Nov, 08:58 pm · compiler 0.3.70
- v1 — 27 Nov, 08:56 pm · compiler 0.3.70