you can check if there is a connection
Could the most expert coders tell me if my ea flow structure (pseudocode) could be problematic if a mt4 disconnection
I manage/update the position (exit or update SL) when new bar appears. I detect that situation with lastTradeTime != Time[0].
The time it took to write that post you could have tested it yourself and already know the answer.
You can write a simple test code;
static datetime TestLastTime = Time[0]; Print("test = ",TestLastTime," Time[0] = ",Time[0]);
Attach EA to a 1 minute chart, then disconnect the internet, reconnect it a minute later and see what it prints.
coiler: But, what if a disconnection occurs and ea reconnects when the next new bar has ticks yet, no update until the next new one? or am i wrong?. | When the terminal reconnects, you'll get a new tick and Time[0] will be different if the disconnection was through end of bar. |
Hi guys,
maybe I´m wrong.... but MT4 I need aproximately 30sec than determine situation disconnected. For fast trade - scalp, arbitrage - very very bad!!! Can you test it...
endy5: . but MT4 I need aproximately 30sec than determine situation disconnected. For fast trade - scalp, arbitrage - very very bad!!! Can you test it...
| But so does every Internet application. If you want fast access, pay your broker a $million for co-located machine. |
maybe I´m wrong.... but MT4 I need aproximately 30sec than determine situation disconnected. For fast trade - scalp, arbitrage - very very bad!!! Can you test it...
If you are disconnected, then there is nothing you can do anyway. Know it or don't know it, you can't trade.
If you can't pay high end solution, at least get a backup internet lines via several mobile phone connections. These are not expensive and setup is not hard.
drazen64: If you can't pay high end solution, at least get a backup internet lines via several mobile phone connections. |
|
Thank you all,
very clear the solution.
Regards.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I manage/update the position (exit or update SL) when new bar appears. I detect that situation with lastTradeTime != Time[0].