Tuesday 27 November 2012

the Broker is 4 digits or 5 digits pricing

Here is a code which you can use in an Expert Advisors to automatically adjust variables depending on if the Broker is 4 digits or 5 digits pricing. 

following code should be inside the int Init() function

Code:
if(Digits==5 || Digits==3){ 
            StopLoss= Stoploss * 10;   // this adjusts Stoploss variable for 5digit broker
}

1 comment:

  1. Dear Sir, I got an EA in 5dogot but i plan to use it in the 4 digit broker also, pls assits on how to insert your code. Thanks

    ReplyDelete