deathforlife:
As far as I am aware . . . OrdersTotal() is the number of open and pending orders . . . if your OrderSend() fails it is not an open or placed pending order . . .
My EA sent order message 3 times. (each 10 lots, buy-position)
But I have no buy-position yet. (Three order messages have already been sent, but no position in my account yet because of delay time)
Then, what is the OrdersTotal() in EA's viewpoint?
Zero.. ? (EA counts how many times the position-openning has been finished...?)
Or....Three....? (EA counts how many times the ordermessage has been sent, even though the position-openning not finished yet...?)
deathforlife:
What are Function return values ? How do I use them ? - MQL4 forum Check and find out WHY
My EA sent order message 3 times. (each 10 lots, buy-position)
But I have no buy-position yet.

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
My EA sent order message 3 times. (each 10 lots, buy-position)
But I have no buy-position yet. (Three order messages have already been sent, but no position in my account yet because of delay time)
Then, what is the OrdersTotal() in EA's viewpoint?
Zero.. ? (EA counts how many times the position-openning has been finished...?)
Or....Three....? (EA counts how many times the ordermessage has been sent, even though the position-openning not finished yet...?)