Questions from Beginners MQL5 MT5 MetaTrader 5 - page 695

 
Vitaly Muzichenko:

Thanks, but this solution is not suitable in the sense that I'm testing on more than one template, but that's half the problem, but the fact that this indicator is not only working for me, people will just get tired of filling labels in the tester.

It turns out that there is no way to determine programmatically that the chart runs in the tester? Where are you developers?

.

Well, yes, if not for themselves, then it is quite inconvenient.
 
Vitaly Muzichenko:

Thanks, but this solution is not suitable in the sense that I'm testing on more than one template, but that's half the problem, but the fact that this indicator is not only working for me, people will just get tired of filling labels in the tester.

It turns out that there is no way to determine programmatically that the chart runs in the tester? Where are you developers?

.

Have you writtenan application to the SD?
 
Artyom Trishkin:
Have you written an application to the BOD?

No, I haven't. Always been in contact with the developer on the forum until they were awarded"best forex platform was MetaTrader 4" at an exhibition, since then they no longer respond on the forum, probably still celebrating the case)

It can't be the case that you can't determine programmatically that a chart is running in tester mode, but how to determine that is a mystery?

 
Vitaly Muzichenko:

No, I haven't. Always been in contact with the developer on the forum until they were awarded"best forex platform was MetaTrader 4" at an exhibition, since then they no longer respond on the forum, probably still celebrating the case)

It can't be the case that you can't determine programmatically that a chart is running in tester mode, but how to determine that is a mystery?

I don't get it...

IsTesting() == true

appears to be

 
Renat Akhtyamov:

failed to understand

IsTesting() == true

appears to be

What truing), and what testing =)

The indicator is set on a completely different chart, not in the tester.

 
Vitaly Muzichenko:

No, I haven't. Always been in contact with the developer on the forum until they were awarded"best forex platform was MetaTrader 4" at an exhibition, since then they no longer respond on the forum, probably still celebrating the case)

It can't be the case that you can't determine programmatically that a chart is running in tester mode, but how to determine that is a mystery?

You can dig into winapi and read the window title. It seems to start with tester .
When I was digging into this topic a long time ago

 

Here's a question:

How to handle an event (if any), when the "Auto-trade" button is disabled in mt5.

For example, I need the EA to close positions when Auto-Trade is disabled!

 
Dmitry Melnichenko:

Here's a question:

How to handle an event (if any), when the "Auto-trade" button is disabled in mt5.

For example, I need the EA to close positions when auto-trading is disabled!

And how it will close them if the button is pressed (:

Only by hand, by hand, the one who squeezed - let him do it.

 
Vitalie Postolache:

How will he close them if the button is pressed (:

Only by hand, by hand, the one who pushed it, let him take care of it.

Thank you!
 
Dmitry Melnichenko:
thank you!

And the event is...

if (!TerminalInfoInteger(TERMINAL_TRADE_ALLOWED))  
   Alert("Проверьте в настройках терминала разрешение на автоматическую торговлю!");
Reason: