How to open one order at a time? - page 2

 
meikel:

that would be like i buy a VW Golf and try to make a Mercedes from it.

without knowing how to weld, how a combustion engine works and so on...

Ah. That was "alongside" in the sense of "running both at the same time", not in a sense such as "writing an EA which interacts with another third-party EA". And, personally, I think it's very likely that anyone writing their first EA is going to try running it on more than symbol at once, and a check for OrdersTotal()==0 therefore may well not be appropriate.

 
jjc:

Ah. That was "alongside" in the sense of "running both at the same time", not in a sense such as "writing an EA which interacts with another third-party EA". And, personally, I think it's very likely that anyone writing their first EA is going to try running it on more than symbol at once, and a check for OrdersTotal()==0 therefore may well not be appropriate.

ok, i understand.

i am programming since 1981 (Sinclair ZX81 if you know) and started with MQL4 in September 2009. i never have had the feeling to be so ingenious, that my first EAs handle more than one trade, or, more difficult, the same time on more than one chart.

i started to programm a more-than-one-order-EA in the middle of Nov2009, and til now not think of an EA dealing on multiple charts.

only an absolute .... would try to modify an EA from another programmer with no skills, simply placing dumb question in forums.

sorry, my speech is getting clearer every day.

my speech is in an absolute relationship to the amount of ... post i read.

 
meikel:

i never have had the feeling to be so ingenious, that my first EAs handle more than one trade, or, more difficult, the same time on more than one chart.

As far as I can tell, many people start out with MQL and start out on this forum because they have a manual system which they want to automate. And, in my experience, most manual systems are supposed to work on more than just one symbol. Therefore, I guess that a lot of people writing their first EA are intending to run it on both e.g. EURUSD and GBPUSD, or both AUDNZD and USDCAD, at the same time. They don't approach the subject with your level of caution because they don't have your existing programming knowledge.


In short, my personal guess would be the opposite of yours: if a newbie says "one order at a time", it is not most likely to mean "OrdersTotal()==0".

 
meikel:

ok, i understand.

i am programming since 1981 (Sinclair ZX81 if you know) and started with MQL4 in September 2009. i never have had the feeling to be so ingenious, that my first EAs handle more than one trade, or, more difficult, the same time on more than one chart.

i started to programm a more-than-one-order-EA in the middle of Nov2009, and til now not think of an EA dealing on multiple charts.

only an absolute .... would try to modify an EA from another programmer with no skills, simply placing dumb question in forums.

sorry, my speech is getting clearer every day.

my speech is in an absolute relationship to the amount of ... post i read.

Every one starts somewhere. You too started programming at 1981. I've started yesterday and i will continue programming and trading. I can assure you that in no time i will program well and not bother you in your kingdom. You can be kind and help, or you can just ignore the question, there is no need to behave this way.

 
msbusinessil:

Every one starts somewhere. You too started programming at 1981. I've started yesterday and i will continue programming and trading. I can assure you that in no time i will program well and not bother you in your kingdom. You can be kind and help, or you can just ignore the question, there is no need to behave this way.

LOL, you started programming yesterday and i bet you have NOT read the manual and docs.

even for a genius it would take more than one day to read the manual and make some attempts of coding.

why should i be kind to such lazy peoples like you, who try to get rich without own effort.

i should think about an EA which i deliver for free and which blow your account if i give a remote signal.

 

Hey hey msbusinessil, take it easy. That's no way to get help. You've got to understand that most new posters ask the same old questions ad nauseam, without bothering to search first, or to fully consider their own requirements.


Can you clearly articulate your requirements and we'll tell you the approach you'll need to take.


Here are some fundamental questions to help me understand what you need. If you haven't already thought these through, then please take some time to consider, before getting back to us:

1. Do you need the same EA (the same code unchanged) to run against multiple currency pairs?

2. Do you need the same EA (the same code unchanged) to run against currency pairs with differing decimals such as USDJPY? And across different brokers who may use 4 v s5 decimals and micro vs. standard lots?

2. Will you have a situation where more than one chart (each with an EA) will run against the same account?

3. If the answer to 2 is correct, do you require each EA to manage only its own (1 only?) orders, not interfering with any trades by your other EAs or with manual trades or trades managed by EAs which you didn't write?


CB

 
cloudbreaker:

Hey hey msbusinessil, take it easy. That's no way to get help. You've got to understand that most new posters ask the same old questions ad nauseam, without bothering to search first, or to fully consider their own requirements.


Can you clearly articulate your requirements and we'll tell you the approach you'll need to take.


Here are some fundamental questions to help me understand what you need. If you haven't already thought these through, then please take some time to consider, before getting back to us:

1. Do you need the same EA (the same code unchanged) to run against multiple currency pairs?

2. Do you need the same EA (the same code unchanged) to run against currency pairs with differing decimals such as USDJPY? And across different brokers who may use 4 v s5 decimals and micro vs. standard lots?

2. Will you have a situation where more than one chart (each with an EA) will run against the same account?

3. If the answer to 2 is correct, do you require each EA to manage only its own (1 only?) orders, not interfering with any trades by your other EAs or with manual trades or trades managed by EAs which you didn't write?


CB

Thanks for your patience, i went trough the book and couldn't find the right function for it.
The openorder() function which Phy gave me at the beginning of this thread helped me and the code working great.


Sorry i really forgot to search the forum first, i promise i will next time.


Thanks again,

Mike

 

No worries.

If you need any help altering your EA to give it some of the flexibility I mentioned above, let us know and we can point you in the right direction.

BTW: Phy gave you OrdersTotal() - not openorder().

Note that OrdersTotal() returns ALL current orders in the context of the account. Not just orders that your EA has placed. And not just for a particular chart/symbol etc. etc.


CB