Question to Formula Results and digits output
-
Hi there,
at the moment I am working on an EA where I do many formulas, like Object_1 Price Level 1 - Object2_ Price level 2 or whatever....
The result in the Formula is a digit number. So like 0.0015
Now its all working fine and I normally take this number and multiply it with 1000 or 10000 or whatever needed to get the right pip count here. This solution is not really good as if I multiply it to work with EUR/USD 5 Digit, this will not work on a yen pair on the same broker.So until now I helped myself by printing values on the cart for each pair to define them in the settings if necessary.
For sure, you know a better way for me to do this, right ?

So it will adapt itself to all pairs. Not sure how to involve the point format here....Thanks
Andy -
If you are aware of MQL4
http://fxdreema.com/documentation/colle ... 4/pipvalue - this function is to make the EA to work the same way on 4 digits and 5 digits broker. Search the forum for more info.
http://fxdreema.com/documentation/colle ... ql4/topips - this converts something like 0.0010 to 10.
http://fxdreema.com/documentation/colle ... 4/todigits - this converts 10 to something like 0.0010. -
Not really aware but the information you posted should be enough to get it done.
Thanks as always, cheers