How to add pips to a price level for both JPY and non-JPY prices?
-
Hi all,
I want to add 10 pips to a price level so that it will work for both JPY pairs (2 digits) and non-JPY pairs (4/5) digit prices. Can anyone suggest an easy way to do this without having to manually perform the calculation twice in different blocks?
For example, to add 10 pips to a non-JPY pairs I can "Adjust" a price level in a Condition or Formula block with "+0.001". But this doesn't work for JPY pairs where the adjustment would need to be "+0.1"
Thanks Drew
-
Try +10pips. In this, the keyword "pips" is replaced with some function that will take the symbol (market) from above and after some calculations it will produce the value that means 10 pips for this pair. Better put "pips" right after the number, without empty space in between. This keyword is not part of MQL4/MQL5, it's something that I added long time ago.
Also, if you use %, this will be converted to /%.
pips and % work only in Adjust fields... but I'm not completely sure

-
you can use fxdreema function in adjust field:
- PipValue(Symbol())
or adjust with MQL4 function: - MarketInfo(Symbol(), MODE_POINT)) (but here you need know if you are quoted in 5 digits or 4 (3 or 2))

or MarketInfo(Symbol(), MODE_TICKSIZE) ... I am not sure now what will be better, you can try both

- PipValue(Symbol())