|
Try this. I did not come up with the code, I forgot who did but I use it in my EA and it works flawlessly.
double Poin;
//The following code was also included to solve the 6 digit broker quoting
if (Point == 0.00001) Poin = 0.0001; //6 digits
else if (Point == 0.001) Poin = 0.01; //3 digits (for Yen based pairs)
else Poin = Point; //Normal
You can modify it for your own broker digits.
|