Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Timeframe Quality Analyzer - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resource

author EAcpu | 2 reads | 0 comments |

Timeframe Quality Analyzer - indicator for MetaTrader 5

Timeframe Quality Analyzer - indicator for MetaTrader 5

Timeframe Quality Analyzer - indicator for MetaTrader 5

The indicator tests whether the timeframe is tradable by checking

1. Signal-to-noise ratio (SNR)

Fits a linear regression on a rolling window of N bars.

Explained variance (trend component)

Residual variance (noise component)

SNR = explained variance/residual variance

2. Autocorrelation (memory test)

Computes return autocorrelation for lag=1 over a rolling window.

Green if > 0.1 (persistent)

red if close to 0 (noise)

3. Hurst index (fractal memory)

H ≈ 0.5 → random walk

H > 0.55 → trend

H < 0.45 → mean regression

4. Volatility clustering (variance stability)

Displayed as an oscillator between 0 and 1.

5.Shannon entropy (randomness test)

Discretize returns into bins.

Compute Shannon entropy:

H = - Σ p(x) log(p(x))

Normalized between 0 and 1.

Higher entropy = more randomness.

 InpWindow = 120 InpEntropyBins = 25 InpWeightSNR = 0.30 InpWeightAC = 0.10 InpWeightHurst = 0.25 InpWeightDER = 0.20 Inp Weight Entropy = 0.15

Bigger windows → less noise

Higher SNR weighting → trend detection

AC is low → autocorrelation is unstable

 InpWindow = 150 InpEntropyBins = 30 InpWeightSNR = 0.35 InpWeightAC = 0.05 InpWeightHurst = 0.30 InpWeightDER = 0.20 Inp Weight Entropy = 0.10

Market trends are strong

Trading Breakouts/Momentum

Focus: Trend + Persistence

 InpWindow = 80 InpEntropyBins = 20 InpWeightSNR = 0.20 InpWeightAC = 0.20 InpWeightHurst = 0.20 InpWeightDER = 0.25 Inp Weight Entropy = 0.15

M1–M15 transactions

Need to adapt quickly

Focus: Structure + Efficiency

 InpWindow = 100 InpEntropyBins = 25 InpWeightSNR = 0.25 InpWeightAC = 0.10 InpWeightHurst = 0.20 InpWeightDER = 0.15 Inp Weight Entropy = 0.30

You want to avoid adverse market conditions

High entropy weight = avoid noise


Attachment download

📎 TimeFrame_Quality_Analyzer.mq5 (19.19 KB)

Source: MQL5 #69537

MT5 MQL5 CodeBase Time range quality analyzer script
Verification code Refresh