hknight:
What is wrong here?
The result should be 0.55 however I get 0.
Lack of decimal infers int I think. Simply add a decimal like the following:
Alert( 1100.0 / 2000.0 ); Alert( NormalizeDouble((1100.0 / 2000.0),2) );
Thanks!
How can I do that with numbers that are pre-defined?
Alert( MathFloor(AccountEquity()/AccountBalance()) );
Paul_B:
Correct, it's Type casting.
Lack of decimal infers int I think. Simply add a decimal like the following:
hknight:
Thanks!
How can I do that with numbers that are pre-defined?
Alert( MathFloor(AccountEquity()/AccountBalance()) );
AccountEquity() and AccountBalance() are functions that return values which are double data type, so you shouldn't see the same typecasting issue as you did in your original post.
Great, thanks!
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
What is wrong here?
The result should be 0.55 however I get 0.