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!
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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