CustomTicksAdd stores data with wrong decimal point.

 

Hello all, I get two different tick formats when using CustomTicksAdd and CustomTicksReplace with the same tick array input.

The funcion CustomTicksAdd for some reason does not show the decimal point at the correct position in the tick history and Market watch in MT5.

For example:

FUNCTION <BID>
 <ASK>
CustomTicksAdd
 25.87
 25.93
CustomTicksReplace
 25869.84
 25935.94


This does not happen when the custom symbol digits = 5. The above example was generated with digits = 2.


It also seems that there is no user error handling in the CustomTicksAdd function. When using this function

in combination with the above example data ( 25869.84  /  25935.94 ) in the tick array and symbol digits=7 it completely

crashes MT5 terminal (fully frozen) without any error/warning message.


Does anybody have the same issue as me and any suggestion what is going on and how to fix it?


Many thanks for help.

Creating and testing custom symbols in MetaTrader 5
Creating and testing custom symbols in MetaTrader 5
  • www.mql5.com
Creating custom symbols pushes the boundaries in the development of trading systems and financial market analysis. Now traders are able to plot charts and test trading strategies on an unlimited number of financial instruments.