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 5 Indicator | ComparePrices

Indicator Compare Prices uses a non-standard price with a logarithmic calculation.

It displays two lines: the initial Close price (green) and the one calculated based on the algorithm (red).

It has one input parameter:

  • Prices shift - price shift for logarithm calculation.

Calculations:

MainPrice = Close
LogPrice = Close / (1.0+LOG10(ShiftClose / Close)

where:

LOG10 - logarithm to base 10
ShiftClose - Close Prices shift bars back

MetaTrader Experts, Indicators, Scripts and Libraries

Fig1. Compare Price, Prices shift = 1

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 2. Compare Price, Prices shift = 5

22797