Edit Your Comment
Allow only one order at one time
Aug 31, 2019 at 02:59
तबसे मेंबर है Aug 13, 2019
5 पोस्टों
Is it possible in either or both of MT4 and MT5 for an EA to recognise that an order is open in terminal (toolbox MT5)?
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Sep 01, 2019 at 20:40
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
here you go....
int OrdersTotal();
Check out the API and DOCS on the MT4 website. They're very helpful and there are numerous examples.
If it looks too good to be true, it's probably a scam! Let the buyer beware.
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Sep 02, 2019 at 07:28
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Keltrem posted:
I was really looking for answer with MT5, a bit different to MT4
Well now... At least I know you didn't even bother to try.
It's the same for BOTH.
https://www.mql5.com/en/docs/trading/orderstotal
If it looks too good to be true, it's probably a scam! Let the buyer beware.
Sep 02, 2019 at 21:18
तबसे मेंबर है Aug 13, 2019
5 पोस्टों
I had read the link you provided previously. As MT5 addresses positions, deals and orders the terminology is confusing to me . Does int OrdersTotal refer to a single chart say eurusd with one or more posiitons each posiiton containing a number of orders, that is int OrdersTotal calculates/limits the total number of orders on that currency pair? If so that is not what I want.
In Toolbox I want only one position (which may contain one or more orders) for a single currency pair open at one time during the chart timeframe H1, H4 etc. No other cuurency pair positions can be opened during that timeframe.
It is my understanding that the user needs to have a defined list of pairs that cannot open positions concurrently. Is that correct?
In Toolbox I want only one position (which may contain one or more orders) for a single currency pair open at one time during the chart timeframe H1, H4 etc. No other cuurency pair positions can be opened during that timeframe.
It is my understanding that the user needs to have a defined list of pairs that cannot open positions concurrently. Is that correct?
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Sep 02, 2019 at 21:45
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Keltrem posted:
I had read the link you provided previously. As MT5 addresses positions, deals and orders the terminology is confusing to me . Does int OrdersTotal refer to a single chart say eurusd with one or more posiitons each posiiton containing a number of orders, that is int OrdersTotal calculates/limits the total number of orders on that currency pair? If so that is not what I want.
In Toolbox I want only one position (which may contain one or more orders) for a single currency pair open at one time during the chart timeframe H1, H4 etc. No other cuurency pair positions can be opened during that timeframe.
It is my understanding that the user needs to have a defined list of pairs that cannot open positions concurrently. Is that correct?
OrdersTotal() returns the total number of orders in your basket.
Returns the number of current orders.
int OrdersTotal();
Return Value
Value of the int type.
if the orders total is greater than 0, the you have orders in your baskets.
Then you need to query your basket to determine the specific information to each of those tickets.
The code I provided as an example could be written several different ways, but a simple index loop as shown should work just fine for your intended use based upon the information given.
int basket=OrdersTotal(); //this is where your orders total value comes from, follow it up with a loop
for(int x=0;x<basket;x++)
{
if(OrderSelect(x,SELECT_BY_POS)==false) continue;
//Do some stuff here
//You need to check for OrderSymbol() in this loop.
}
If it looks too good to be true, it's probably a scam! Let the buyer beware.
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Sep 02, 2019 at 21:54
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
It is my understanding that the user needs to have a defined list of pairs that cannot open positions concurrently. Is that correct?
That is entirely up to how you want to do it.
In my own systems, I will typically just have an input of currency pair symbol values that I store in an array, then I validate the pairs from the array.
The input of these currency pairs typically are loaded from a simple text configuration file or user input from EA or Indicator.
If it looks too good to be true, it's probably a scam! Let the buyer beware.
Sep 03, 2019 at 06:40
तबसे मेंबर है Aug 13, 2019
5 पोस्टों
Hi Professional4X,
Many thanks for your help, I was positive it could be done biy my developer was saying it is very difficult to do. My background years ago was fortran coding not quite the query languages of today. Your assistance is greatly appreciated particularly taking the time to write an example of the code that may suit.
Again thanks you have been most helpful
Many thanks for your help, I was positive it could be done biy my developer was saying it is very difficult to do. My background years ago was fortran coding not quite the query languages of today. Your assistance is greatly appreciated particularly taking the time to write an example of the code that may suit.
Again thanks you have been most helpful
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Sep 03, 2019 at 07:06
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Keltrem posted:
Hi Professional4X,
Many thanks for your help, I was positive it could be done biy my developer was saying it is very difficult to do. My background years ago was fortran coding not quite the query languages of today. Your assistance is greatly appreciated particularly taking the time to write an example of the code that may suit.
Again thanks you have been most helpful
You're welcome.
If it looks too good to be true, it's probably a scam! Let the buyer beware.
तबसे मेंबर है Oct 16, 2019
1 पोस्टों
Oct 16, 2019 at 07:14
तबसे मेंबर है Oct 16, 2019
1 पोस्टों
Keltrem posted:
Is it possible in either or both of MT4 and MT5 for an EA to recognise that an order is open in terminal (toolbox MT5)?
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Oct 16, 2019 at 12:53
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
zhangshapzen posted:Keltrem posted:
Is it possible in either or both of MT4 and MT5 for an EA to recognise that an order is open in terminal (toolbox MT5)?
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
I already provided the answer to this question. Please read the first page of this thread. Thank you,
If it looks too good to be true, it's probably a scam! Let the buyer beware.
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
Oct 16, 2019 at 12:53
तबसे मेंबर है Jan 05, 2016
1189 पोस्टों
also see Metatrader Magic Number.
If it looks too good to be true, it's probably a scam! Let the buyer beware.
Dec 23, 2022 at 13:17
तबसे मेंबर है Oct 26, 2022
1 पोस्टों
Hi,
Im also wanting exactly this...
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
Im not a coder, if anyone could do this for me im quiet happy to pay for this
Im also wanting exactly this...
What I am hoping to achieve is this. EA is on 8 charts if an order is opened on one chart I do not want the EAs on the other seven charts opening new orders until the current open order is closed. Is this achievable in an EA?
Im not a coder, if anyone could do this for me im quiet happy to pay for this
*व्यवसायिक इस्तेमाल और स्पैम को ब्रदाश नहीं किया जाएगा, और इसका परिणाम खाता को बन्द करना भी हो सकता है.
टिप: किसी चित्र या यूट्यूब या URL को पोस्ट करने से वे अपने आप आपके पोस्ट में आजाएगा!
टिप: @ चिन्ह को टाइप करें उपभोगता के नाम को अपने आप करने के लिए जो इस चर्चा में भाग ले रहा है.