Aurix Exchange

how can i 4 digit expert to 5 digit one?

Capella

Active member
VIP Member
thanks for advise

The mq4-code must be changed accordingly. generally speaking, if the EA has been made for a 4-digit broker and you want to use it for both 4 and 5-digit brokers, the values for StopLoss, TakeProfit, MaxSpread, Slippage must be multiplied with 10. Just a few lines like this...

if (Digits == 3 || Digits == 5)
multiplier = 10;​
else
multiplier = 1;​

...since the predefined variable Digits contains how have digits after the decimal point the broker uses. Then multiply SL, TP, etc. with the variable "multiplier".
 

Aurix Exchange
Top