Trade Queue for Multiple Simultaneous Trade Signals Generated by commercial Indicator?

 

I have a retail manual trading system that has numerous (custom) indicator modules to it. It has one 'master indicator' that uses other indicators and generates trading signals and paints these as Objects on the chart and generates alerts if I have them turned on. The problem is that it often generates numerous trade signals at once. Some at the EXACT same time stamp, including duplicates )< 8( I have 6 iCustom functions in my EA for these 6 objects. The problem arise with MT4 having only one trading thread. So it can only place one at a time. It misses trading actions erratically including not closing any orders at all so it is to unreliable to use. I've got: while(IsTradeContextBusy) sleep(10) in it before the attempts to contact the trade server and subsequently increased it to 25 with no avail. But this hasn't resolved my problem. The only documentation that I can find of this problem are errors message when the Trade Context is busy. But by the time it is open, the other order signals have disappeared to ???? The Trading Arrow Objects remain on the chart permanently.

This must be a fairly common occurrence and programming problem with MQL4? How is this normally dealt with?

I’ve thought of putting all the trade signals into a queue and then looping through it with the server. But I’m not sure what or how I would use to create and store the queue? Arrays only store one type of information, so …?

There must be an easier way than a queue anyway as this must be a common problem? My experience in MQL4 isn’t much, but I’ve never seen it handled this way. What is the effective de facto method for handling this problem?

Thanks for any and all assistance (< 8)

// while(IsTradeContextBusy()) Sleep(10);
while(IsTradeContextBusy()) Sleep(25)
 

ok, this definitely looks like a fun mess.

it looks like you do have some ea source code.. right? or not?

i see that you are saying that you have six indicators being executed via the icustom function...

are you running a single ea? or do you run more than one ea?

perhaps we can disassemble your ea or ea's and then make modifications to them?

let me know.

 
smoknfx:

ok, this definitely looks like a fun mess.

it looks like you do have some ea source code.. right? or not?

i see that you are saying that you have six indicators being executed via the icustom function...

are you running a single ea? or do you run more than one ea?

perhaps we can disassemble your ea or ea's and then make modifications to them?

let me know.


Yes I have one EA of my own completed that is supposed to be making all of the trading actions. It compiles or works OK except for this problem.

It uses a large number of functions from an include file, though this isn't really relevant. Unless of course I'm doing and using these wrong. But then it wouldn't compile properly nor run. This doesn't mean the logic is completely correct though I've had ones that compile OK that won't attach to a chart and I can't back test and I have taken this to be faulty logic? Is this accurate or ???

Which part of the EA do you wish to see? I can copy and paste the functions from the include file directly into the EA and I've been thinking of trying this anyway to take this factor out of the loop for now. Especially as I am so inexperienced.

 

the first suggestion that i want to make to you, fourx, is that you not post your ea here in public, lol..

of course, tho, that is your decision..

also, when i suggest that you NOT post your code here in public, i mean to say that you should not pm it to me or anything like that... if you wish to send your ea or anything else, do it via private email. it is just my thinking that we dont need the software license gestapo mucking things up and whatnot...

i would first like to see your primary ea.

if you would like to send it to me: mql4@hush.com

B52s: dirty back road

 
FourX: Is a Thief and Troll
Please do not feed the troll.
When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.
smoknfx: Is a troll
Please do not feed the troll.
When you respond, you give the troll power. When you ignore the troll, he starves for attention and eventually dies.
 

WHR: Do you realize how much you are proving and continuing to illustrate just what an infantile little snot covered troll that you are. Just digging around in the baby Trolls sandbox with nothing more than eat the cat droppings and the lacking of ability to do anything more, intelligent, useful and productive? You just keep spewing out the same old verbal + diarrhea and then eating it yourself and regurgitating and recycling it endlessly. How can u stand the stench of yourself?

Do you realize what a moronic idiot that you are constantly making yourself look like? You've been starting at the Troll in the mirror for so long now that you are transfixed by it and that is all you are or can do.

Get real, TRY and get a life and actually DO SOMETHING and get out of here moron.

 

i am waiting to see that code, mr fourx.

zero/,.

 
smoknfx:

i am waiting to see that code, mr fourx.

zero/,.


coming at u soon
 

i got your email.

do you have that disassembler in your possession?

i am looking for the docs that show me how to write a disassembler.

anyways, lets get back to your issues...

describe for me again what it is that you are trying to do?

regards,

zero/.

Video: The Transporter Soundtrack

 

describe for me again what it is that you are trying to do?

I may have it resolved. I will post further info as it is available.

Regards

Reason: