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 Libraries | NormalizePrice | Source Code Included

New free code from MQL5: indicators, EAs, and scripts for traders.

Image for NormalizePrice

The function of adduction of the price to the correct form for the given symbol by means of rounding or discarding the excess.

I.e. if one tick is equal to 5 points then we need TakeProfit and StopLoss divisible by 5 for the order.

The NormalizePrice function allows to solve this problem.

Trade the powerful Traders Dynamic Index strategy automatically with this dedicated TDI Expert Advisor. More details.

It takes the following parameters:

  • price - the price that you need to normalize;
  • round - the method of normalization, if it is true then we adduce the prcie to the closest correct value (round), if it is false then we discard the excessive part (truncate). The true value is the default one.

Complement community code with advanced automation from RobotFX.

8575

Best MetaTrader Indicators + Profitable Expert Advisors