probably becaure you are using default number of decimal places to print see DoubleToStr() for alternate decimal place number printing.
probably becaure you are using default number of decimal places to print see DoubleToStr() for alternate decimal place number printing.
this is the code I have
double SARba = iSAR(NULL,0,0.02,0.2,0);
string SARa = DoubleToStr(iSAR(NULL,0,0.02,0.2,0),5);
how do I get a value to 5 decimal places (double) from iSAR(NULL,0,0.02,0.2,0) ?
u want extract 5 dec. from the string ?
What code are you using to display your variables - using the Print function, the Alert or comment?
ObjectCreate()
this is the code I have
double SARba = iSAR(NULL,0,0.02,0.2,0);
string SARa = DoubleToStr(iSAR(NULL,0,0.02,0.2,0),5);
how do I get a value to 5 decimal places (double) from iSAR(NULL,0,0.02,0.2,0) ?
double SARba = NormnalizeDouble(iSAR(NULL,0,0.02,0.2,0),5);
What code are you using to display your variables - using the Print function, the Alert or comment?
Comment, but I know want the number itself for an internal calculation
double SARba1 = NormalizeDouble(iSAR(NULL,0,0.02,0.2,0),5); returns 0
u want extract 5 dec. from the string ?
no I want to get the value of iSAR to 5 decimal places instead of 4 (to point value rather than pip)
double SARba1 = NormalizeDouble(iSAR(NULL,0,0.02,0.2,0),5); returns 0
The only way that is possible is if "double SARba = iSAR(NULL,0,0.02,0.2,0);" itself returns zero or a number smaller than 0.000005.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
how do I get a value to 5 decimal places (double) from iSAR(NULL,0,0.02,0.2,0) ?
.
If I use double SARba = iSAR(NULL,0,0.02,0.2,0);
I only get it to 4 decimal places