You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
for the currency that have 5 digits
i use this:
dif = (OrderOpenPrice() - vbid) / 100;
and i can see the diference between openprice and market to calculate the stoploss,
for example: stoploss = vbid - dif;
this work fine for 5 digits the stoploss is ok because the digits number are the same.
The problem is for the 3 digits currency
that sometimes i receive from the market: 83.111 and other time 83.1100012111 etc
i have tried to use NormalizeDouble ( market , vdigits ) but the diference from the
openprice and market is not ok to calculate the stoploss because the value digits is always changing.
How can i fix the problem of the 3 digits currency for calculate the diference and then calculate
the stoploss ?
thank you for your help.