Download MetaTrader 5
To add comments, please log in or register
Sell your CPU capacity and earn money!
BB2013
120
BB2013 2016.09.30 11:02 

Hi,


I developed an expert.
As far as I know, the expert starts running when the price change.
However, if the price change again, and my expert does not get to finish, the expert do not continues and another expert run starts.
This happens when the market is under strong variations.
So, under this case, my expert never comes to the end.
Is possible to avoid expert interruption by a new change in the price ?


Thanks

Bernhard Schweigert
5622
Bernhard Schweigert 2016.10.01 13:25  
BB2013:

Hi,


I developed an expert.
As far as I know, the expert starts running when the price change.
However, if the price change again, and my expert does not get to finish, the expert do not continues and another expert run starts.
This happens when the market is under strong variations.
So, under this case, my expert never comes to the end.
Is possible to avoid expert interruption by a new change in the price ?


Thanks

we need to see a code to know why
BB2013
120
BB2013 2016.10.01 16:54  
Bernhard Schweigert:
we need to see a code to know why

Thanks for your reply.

Can you confirm this:

1) An expert starts running when the envolved pair changes cotation.

2) If the expert takes a bit time to finish and the pair cotation changes before the expert ends, the expert re-starts again.


Perhaps I am confusing something, but this is what I thought it is how MT4 works

Bernhard Schweigert
5622
Bernhard Schweigert 2016.10.02 20:34  
BB2013:

Thanks for your reply.

Can you confirm this:

1) An expert starts running when the envolved pair changes cotation.

2) If the expert takes a bit time to finish and the pair cotation changes before the expert ends, the expert re-starts again.


Perhaps I am confusing something, but this is what I thought it is how MT4 works

you can use

OnTimer();
EventSetTimer(1);

Stanislav Korotky
17857
Stanislav Korotky 2016.10.02 21:36  
BB2013:

Can you confirm this:

1) An expert starts running when the envolved pair changes cotation.

2) If the expert takes a bit time to finish and the pair cotation changes before the expert ends, the expert re-starts again.


Perhaps I am confusing something, but this is what I thought it is how MT4 works

You're wrong. Any event handler - either processing new price tick or timer - is executed uninterrupted until it exits. All successive events (price ticks or timer) are waiting until your EA finishes processing of the previous event.

If you see other behaviour, this can be a bug either in your code or in the platform. We need more information.

/
To add comments, please log in or register