Yes, a couple of leading zero's and a semi colon,
double var2 = 0.0054;
double var3 = var1 -(0.5*var2);
V
![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
I have a very simple formula that is returning strange results.
double var1 = 1.27943;
double var2 = .0054
double var3 = var1 -(.5*var2);
The result is that var3 is set to -2.05777. I don't understand how that number is being calculated. Am I missing something?