...........
And still got a crazy long answer either way. Print( "highTCprev=",DoubleToStr(highTCprev,16)); // highTCprev gives 1.3075000000000001
I can't seem to get a clean number without some junk on the end of it. Hmmm.
Why use 16?
DoubleToStr(highTCprev,16)
Why not
DoubleToStr(highTCprev,4)
??
I have noticed that the result of calculations with normalized double values return insanely lengthy answers since build 574.
An example is: Print("profit/loss=",result); // result gives -16.0000000000049
I know that DoubleToStr can be used to shorten it up, but I wondered if better(shorter) input was the answer.
So, I tried this: double highTCprev=NormalizeDouble(MathRound(High[b+1]*MathPow(10,Digits))/MathPow(10,Digits),Digits);
And this: double highTCprev=MathRound(High[b+1]*MathPow(10,Digits))/MathPow(10,Digits);
And still got a crazy long answer either way. Print( "highTCprev=",DoubleToStr(highTCprev,16)); // highTCprev gives 1.3075000000000001
I can't seem to get a clean number without some junk on the end of it. Hmmm.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have noticed that the result of calculations with normalized double values return insanely lengthy answers since build 574.
An example is: Print("profit/loss=",result); // result gives -16.0000000000049
I know that DoubleToStr can be used to shorten it up, but I wondered if better(shorter) input was the answer.
So, I tried this: double highTCprev=NormalizeDouble(MathRound(High[b+1]*MathPow(10,Digits))/MathPow(10,Digits),Digits);
And this: double highTCprev=MathRound(High[b+1]*MathPow(10,Digits))/MathPow(10,Digits);
And still got a crazy long answer either way. Print( "highTCprev=",DoubleToStr(highTCprev,16)); // highTCprev gives 1.3075000000000001
I can't seem to get a clean number without some junk on the end of it. Hmmm.