double diferenc2 = NormalizeDouble(diferenc,MarketInfo(simbol,MODE_DIGITS)); Alert ("after conversion... ", diferenc2);
Thank you so much deVries...
jugivi:
Please edit your post . . . please use the SRC button to post code: How to use the SRC button.
Please i need help with a conversion, I have the following code
<CODE REMOVED>
Excuse me, what's the difference between using MODE_DIGITS or Digits?
jugivi: what's the difference between using MODE_DIGITS or Digits?
MODE_DIGITS or Digits?
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
Please i need help with a conversion, I have the following code
string simbol = "AUDJPY";
double diferenc;double alto = 102.913;
double bajo = 101.311;
int resul = 70;
double diferenc_H_L;
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
diferenc_H_L = alto - bajo;
diferenc = (diferenc_H_L * resul) / 100;
Alert ("before conversion... ", diferenc);
diferenc = NormalizeDouble(diferenc,MarketInfo(simbol,Digits));
Alert ("after conversion... ", diferenc);
return(0);
}
value of diferenc before the conversion = 1.1214
value of diferenc after the conversion = 1
I need that the value is 3 decimal places (1.121), are those AUDJPY on my shelf, but it does not work properly can anyone help?. Thank you.