quotes are 2 digits on my pc, 3 on vps

 

Hi,

I ran 2 MT4s. One is on my personal pc, and the other is on a vps.

I used the same MT4 provided by ibfx. I also opened 2 demo accounts using ibfx.

how come the quotes on my pc are of 2 digits, while it is 3 on the vps?

how do we handle this in our ea?

[Deleted]  

Not sure why it's different but as far as the EA is concerned you can use Digits and Point to figure out how to handle your calculations. For example:

extern double StopLossInPIPs = 50;

if(Digits == 3 || Digits == 5) StopLossInPIPs *= 10;

OR

if(Point == 0.001 || Point == 0.00001) StopLossInPIPs *= 10;

What I also like to do is add a point_compat variable. I start it off with 1 and if the above is true, I change it to 10. This way I can use point_compat with every other calculation to make sure it's going to work across 4-5 digit brokers. For example:

int point_compat = 1;

if(Digits == 3 || Digits == 5) point_compat = 10;

double SpreadInPoints = MarketInfo(Symbol(), MODE_SPREAD);

double SpreadInPIPs = SpreadInPoints / point_compat; //if it's a 4 digit broker, it will divide by 1 and remain the same

Jon

 
Archael wrote >>

Not sure why it's different but as far as the EA is concerned you can use Digits and Point to figure out how to handle your calculations. For example:

extern double StopLossInPIPs = 50;

if(Digits == 3 || Digits == 5) StopLossInPIPs *= 10;

OR

if(Point == 0.001 || Point == 0.00001) StopLossInPIPs *= 10;

What I also like to do is add a point_compat variable. I start it off with 1 and if the above is true, I change it to 10. This way I can use point_compat with every other calculation to make sure it's going to work across 4-5 digit brokers. For example:

int point_compat = 1;

if(Digits == 3 || Digits == 5) point_compat = 10;

double SpreadInPoints = MarketInfo(Symbol(), MODE_SPREAD);

double SpreadInPIPs = SpreadInPoints / point_compat; //if it's a 4 digit broker, it will divide by 1 and remain the same

Jon

Thanks Jon.

I will let it go for now as IBFX said that although the demo servers are of 2 types (2 and 3 digit quote servers), their production (real) servers are of fixed 2 digit quotes. I appreciate it. I didnt think about this till I deployed to an apparently 3 digit demo server, and my EA acted abnormally.