two EA simultaneous

 

Hi boys and girls,

I am not sure, but it seems that if I start two EA on different charts, then one of them is not working, only the one in the active chart is working.

I left them to work online for two days and I have got messages from the first, and none from the second, but then I ran back testing for the last couple of days an both of them have performed trades.

anyone to help a bit?

thank you in advance

 

If they both have a smiley face, they are both working.

If they don't use magic number and pair filters and TF filters, then they are incompatible with every other EA including themselves and manual trading.

    for(int iPos = OrdersTotal()-1; iPos >= 0 ; iPos--) if (
        OrderSelect(iPos, SELECT_BY_POS)                    // Only my orders w/
    &&  OrderMagicNumber() == Magic.Number                  // my magic number
    &&  OrderSymbol()      == chart.symbol                  // and my pair,
Post the code.
 
adinchi:

Hi boys and girls,

I am not sure, but it seems that if I start two EA on different charts, then one of them is not working, only the one in the active chart is working.

I left them to work online for two days and I have got messages from the first, and none from the second, but then I ran back testing for the last couple of days an both of them have performed trades.

anyone to help a bit?

thank you in advance

Hi adinchi,

Your EA probably "blocking" the other EA. Read this case carefully please https://www.mql5.com/en/forum/139090/page2#624546

:D

 
onewithzachy:

Hi adinchi,

Your EA probably "blocking" the other EA. Read this case carefully please https://www.mql5.com/en/forum/139090/page2#624546

:D


thank's so far. I will check. both have a smiley face. and both use magic number, but it is the same - so i should experience problems when one of them places orders, then the other probably will assume they are his orders. i will check.

thank you very much so far. will keep in touch.

 
adinchi:


both use magic number, but it is the same -

So change one. That's the purpose.

It's also why I recommend EA's filter by magic number AND pair (AND TF if necessary) in case the human forgets to change it when attaching to another chart. Close all open trades at once - MQL4 forum



 
WHRoeder:

So change one. That's the purpose.

It's also why I recommend EA's filter by magic number AND pair (AND TF if necessary) in case the human forgets to change it when attaching to another chart. Close all open trades at once - MQL4 forum



I still have this problem. It can't be because of that I do not filter by magic number - because I do not have any open positions. the problem is that none of the two EA started did not generate trade signal online. I just ran a simulation for the past week and one of them made one long and then short trades on SP500 on 10-th of July, but did not said anything then. it seems to me that EA is working only on active chart - the one that is on top of the screen.
 
onewithzachy:

Hi adinchi,

Your EA probably "blocking" the other EA. Read this case carefully please https://www.mql5.com/en/forum/139090/page2#624546

:D

Can anybody say what is the best way to debug that. maybe to generate some messages every 15 minutes to see if EA's are working properly? where to lg or display these messages?

thank's!

 
adinchi:

Can anybody say what is the best way to debug that. maybe to generate some messages every 15 minutes to see if EA's are working properly? where to lg or display these messages?

thank's!

Hi adinchi,

1. It's Prints () (https://docs.mql4.com/common/Print) and you can see it on MT 4 Terminal's expert tab (Ctrl + T > expert tab).

2. Are you sure that your EA only run on active chart - I mean really really sure ?. If that so you may want to run your EA under tight loop like this :

int start()
  {
   while (!IsStopped())
     {
     
     // your codes goes here ...
     
     }
   return(0);
  }

:D

 

I tried with Print and also with Alert ... like this

if( Mnow < Minute() )

Print( "TimeCurrent=",TimeToStr(TimeCurrent()), ...

and both EA printed every 1 minute... some times with about 10 sec. delay ( according to print info)

So they are working, but I still missed that signal the day before yesterday.

I will observe them next couple of days.

Thank's so far !

 
adinchi:

I tried with Print and also with Alert ... like this

if( Mnow < Minute() )

Print( "TimeCurrent=",TimeToStr(TimeCurrent()), ...

and both EA printed every 1 minute... some times with about 10 sec. delay ( according to print info)

So they are working, but I still missed that signal the day before yesterday.

I will observe them next couple of days.

Thank's so far !

Hi adinchi;

Print everything !,

Print if there is signal, print before sending order, print if order send success or fail. Just print everything that you may think a problem,

Just don't print on every tick, coz you may have Mega Bytes of them and notepad won't open it.

:D

 

Help! I have the pack of ‘Dragtrade Library’ the new way of trading by drag+drop but there are lots of errors when compile and the pack has so complicated files to place… you can visit the page for details by this link: https://www.mql5.com/en/articles/mt4/ 1034 and download the ‘Pack’ @ the bottom of the page (I can’t put it here!)

I use 5 dijits Acc. I think it’s no problem!! Anyone can tell me how to place all files correctly,clearly and all steps perfectly? All big thanks to all help!+all new modify will be very useful to many people too! Keep watch I’ m gonna’ offer lots of excellent EA’s (but need bit change!)to get modified!!

(anyone want any free EA!..anyone want free daily signal to catch 300 pips/day I am here to give away!!,mail me: kenmakaz@gmail.com) Big thanks!!

Reason: