1 (edited by Candelabra 2022-04-12 13:25:59)

Re: EA behavior after connection outage

I have ~300 EAs running in around 12 portfolio EAs on demo for the past month. I'm trying to gather enough trading history to use them with Strategy Samurai in a couple weeks.

However, I was dumb and failed to notice that the my MT4 got disconnected from the broker last Thursday, so the EAs weren't able to manage approximately 20 open trades over the past couple days.

I've reconnected it today (Tuesday), and I'm wondering how the open trades will be managed.

I assume that since EA Studio works with indicators, if any of the exit indicators were triggered on Friday or Monday, those trades will remain open indefinitely since they "missed" their exit indicators. Is this correct?

Should I just manually close all open trades?

2 (edited by ViniQ 2022-05-17 20:01:19)

Re: EA behavior after connection outage

Hi you're right and sorry for the late response! Trades will remain open indefinitely until the exit indicators are triggered by the expert advisor attached to a chart. Close all open trades and charts and start it over.

Vinicius Pereira, Portuguese Support. Olá se precisar de ajuda entre em contato segunda à sexta: 09:00-18:00; via direct MP ou acesse (Pt) Grupo TelegramMQL5 Profile

Re: EA behavior after connection outage

if you attach the strategies and portfolio experts with the same magic numbers, they will load the current position state from MT and will continue trading properly.

Re: EA behavior after connection outage

Thank you ViniQ and Popov for your replies!

So I think what the both of you are saying is:

If I use the exact same Portfolio Expert (which have the same magic numbers), the trades will close when the exit indicator is triggered again.

But I should close all the open positions because those positions might have missed their first (and appropriate) exit indicator. The subsequent exit indicators are meant for new entries, not the old positions that missed their own exit indicators.

What happens normally:
Entry Indicator 1 Triggered (open position 1)  ---> Exit Indicator 1 Triggered (close position 1)
Entry Indicator 2 Triggered (open position 2)  ---> Exit Indicator 2 Triggered (close position 2)
Entry Indicator 2 Triggered (open position 3)  ---> Exit Indicator 3 Triggered (close position 3)


My understanding of what happens during a disconnection:
Entry Indicator 1 Triggered (open position 1)  ---> Exit Indicator 1 Triggered (close position 1)
Entry Indicator 2 Triggered (open position 2)  ---> [disconnection occurs]
                                                                  ---> Exit Indicator 2 should have been triggered but missed (position 2 still open)

[I restart MT4 and reattach the same portfolio experts]

Entry Indicator 3 Triggered (position 3 not opened because position 2 still open?)  --> Exit Indicator 3 Triggered (close position 2)

Re: EA behavior after connection outage

When there is an interruption of the Algo trading process, we cannot do anything to recover it.

Therefore we have two options:
- close all positions and start from a flat position.
- run the experts (or portfolios) with the same magic numbers and continue from the current account state.

What option to choose depends on how long the trading was interrupted. I would choose the second option in most cases.