![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
Only if you don't use strict, which you always should.
Yup, I learned this the hard way... Always initialize your variables and class members!
By summing "+=", just as suggested!
Obviously, this is only a simplistic outlook, because the rest of your code would have to be changed to accommodate looking at all the trades and not just the last one.
You need to first learn the basics of coding (eg. by learning about "+=", otherwise you will never get it)!
Also, learn to make your code well spaced out and indented so as to make it more readable and detect possible problematic areas!
the only thing I needed. appreciated