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

Uniformity Factor Indicator - MetaTrader 5 Script | Forex Indicator Download - MT4/MT5 Resources

author EAcpu | 7 reads | 0 comments |

Uniformity Factor Indicator - indicator for MetaTrader 5

Uniformity Factor Indicator - indicator for MetaTrader 5

Uniformity Factor Indicator - indicator for MetaTrader 5

This is a simple analytical (non-signaling, one-time calculation) indicator that allows you to test the hypothesis that price time series represent a "random walk" (specifically a Gaussian "random walk"). This facilitates parametric transformations that structure price increments into uniformly distributed, more stable and predictable time series, at least in terms of volatility.

As you probably know, the distance a Random Walk variable is expected to cover after N steps is estimated by its standard deviation times sqrt(N), or N^0.5.

The indicator calculates statistics of the "average" price change (per bar) for a predefined range of bars. "Averaging" is performed over distances (number of bars up to the given N) raised to the power F, where F is a factor enumerated from 0.1 to 1 in steps of 0.1.

All available bars on the current chart are used to collect statistics in a sliding window of up to N bars.

The indicator then finds the most "regular" uniform distribution of statistics between different F's and displays a histogram of that factor (which is considered optimal), usually 0.5 or 0.6. Each column of the histogram is the "average" increment of points per bar for the corresponding trading duration (number of bars), where "averaging" is performed by N^F (when F=1 you get the standard average).

The indicator can automatically detect the "regularity" (flatness) of statistical curves using different methods:

Learn about optimal factors for:

The indicator displays a blue histogram of the average price change per bar for each distance and selected uniformity factor within the distance range (1..period).

Additionally, the increasing number of bars (distance) is shown as a second histogram (orange) for reference only.

A complete table of test factors and corresponding indicators for the current time series is printed in the log.

XAGUSD.c D1, max distance: 500 , bars: 2641 factors: 0.4 , results: var( 0.4 ) um( 0.4 ) Gini coefficient( 0.4 )*
    [factor] [mean] [variance] [skewness] [kurtosis] [median] [mode] [mmmse] [gini]
[ 0 ] 0.10000 1.85217 0.21976  - 0.87694 0.07751 1.95822 2.30853 0.33811 0.13930 [ 1 ] 0.20000 1.07575 0.04083  - 1.12699 0.96219 1.12715 1.25786 0.13285 0.10093 [ 2 ] 0.30000 0.62887 0.00525  - 1.54472 3.00927 0.64878 0.68616 0.04114 0.05943 [ 3 ] 0.40000 0.37043 0.00021  - 2.90499 13.36923 0.37546 0.37502 0.00394 0.01753 [ 4 ] 0.50000 0.22015 0.00028 1.53459 1.38333 0.21532 0.21461 0.00426 0.03779 [ 5 ] 0.60000 0.13222 0.00064 1.98696 4.05157 0.12372 0.10902 0.01661 0.09162 [ 6 ] 0.70000 0.08041 0.00072 2.60714 8.60950 0.07122 0.05862 0.01551 0.15135 [ 7 ] 0.80000 0.04964 0.00065 3.39070 15.85717 0.04099 0.03149 0.01289 0.21637 [ 8 ] 0.90000 0.03119 0.00054 4.37643 27.17457 0.02359 0.01692 0.01018 0.28652 [ 9 ] 1.00000 0.02002 0.00044 5.57319 43.86448 0.01358 0.00909 0.00787 0.36126

screenshot

The following screenshot shows the indicator on 3 timeframes: D1, H1, M1.

Each chart contains 2 instances of this indicator:

Uniformity Factor Indicator - indicator for MetaTrader 5

XAGUSD, 2 index uniformity factors of D1

Uniformity Factor Indicator - indicator for MetaTrader 5

XAGUSD, 2 index uniformity factors of H1

Uniformity Factor Indicator - indicator for MetaTrader 5

XAGUSD, 2 index uniformity factors of M1


Attachment download

📎UniformityFactor.mq5 (11.38 KB)

Source: MQL5 #57975

Verification code Refresh