Yes, it's called typecasting. 2 is an integer. 10 is an integer. So 2/10 is pushed into an integer value(0, i guess) - and then saved in a double variable (as 0.0). Try using 2 / 10.0 or 2.0/10 I can't test it at the moment but also try double (double)2/10;
If in fact the line didn't appear at all (check Ctrl+B), then it's a different problem. As far as I remember, every object needs Price1, Time1, Price2 and Time2
I found out the hard (and long) way too
thanks guys, you are awesome!
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
have a stupid question. Why this is working:
but something like that is not:
or
? Is there a special trick for dividing two numbers? Sorry for that dumb question, just learning... :) Thanks