Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Indicator | Quantile Price Analysis

Calculation is:

----------------------

Calculation is current close price minus the close price of the last N(default 30) period's defined X(default 60) upper quantile &

current close price minus the close price of the last N(default 30) period's defined X(default 40) lower quantile.

If both of these value(which are displayed in histograms) are above 0 then it is uptrend, vice versa for down trend, if one of them is > 0 and one of them is < 0, then it is ranging.

-----------------------

There is also a high low mode in the inputs, Calculation is current High price minus the close price of the last N(default 30) period's defined X(default 60) upper quantile & current Low price minus the close price of the last N(default 30) period's defined X(default 40) lower quantile.

If both of these value(which are displayed in histograms) are above 0 then it is uptrend, vice versa for down trend, if one of them is > 0 and one of them is < 0, then it is ranging.

This method filters more ranging bars but also produces more lag.

-----------------------

Green Block at the 0 level means uptrend, Orange Block at the 0 level means downtrend, Gray Block at the 0 level means Ranging.

MetaTrader Experts, Indicators, Scripts and Libraries

37844