MQL4 or MQL5 ?
Keith Watford:
MQL4 or MQL5 ?
MT4
MQL4 or MQL5 ?
shaikh_shafique:
MT4
MT4
In future please post in the correct section.
I will move your topic to the MQL4 and Metatrader 4 section.
Please edit your post and
use the code button (Alt+S) when pasting code
if( OrderTotal() <=4) { //here goes code }
What is OrderTotal() ??
Keith Watford:
Do you mean OrdersTotal() ??
YEP
-
Don't double post! You already had this thread open.
General rules and best pratices of the Forum. - General - MQL5 programming forum 2017.07.19 - shaikh_shafique: YEPDon't post code that won't even compile. If you want help with your code, post your code.
shaikh_shafique:
Do not double post!
I have deleted your duplicate topic.
if( OrdersTotal() <=4) { //If there are 5 or more orders currently open this block of code will not be executed //So if new orders are opened and there are already 5 orders currently open, the new orders are not being opened in this block of code. }
If you want to limit it to no more than 4 currently open orders you should use
if( OrdersTotal() <4)
Thanks will try this :-)

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
Hello,
Currently i am trying to limit number of order to 4, opened by EA using OrderTotal() but still EA opens more then 4 orders
here is snippet
if( OrderTotal() <=4)
{
//here goes code
}
Please help