- You are potentially incrementing your count for non-sell orders. Move your test inside the type=sell.
- There is no order position OrdersTotal(). Remove the equals.
- Using OrdersTotal/OrdersHistoryTotal (MT4) or PositionsTotal (MT5), directly and/or no Magic
number filtering on your OrderSelect/Position select loop
means your code is incompatible with every EA (including itself on other charts and manual trading.)
Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum
MagicNumber: "Magic" Identifier of the Order - MQL4 Articles - Use ++X instead of X=X+1.
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
Hi guys and girls,
I m trying to count how many sell orders i have at a certain distance from a Buy order.
This is the code i got but it gives me wrong results.
Thanks a lot.