BUG in MT4 Bridge

Posted By: Grat

BUG in MT4 Bridge - 07/22/16 17:38

Hi,

i found BUG in the MT4 Bridge. This can be reproduce every time:

a) Load MT4 bridge into MT4 scrap - OK, without problem
b) switch the MT4 button Auto Trading .> OFF

MT bridge wrote error:
Quote:
Access violation write to 0x000001C8


So, this error get every time, if is "Auto Trading" disabled. Zorro expert in the MT4 look without problem.
But connect is possible only if remove expert and load expert again.

Before loading the Zorro expert must be "Auto Trading" ON

version: Zorro Bridge 1.9.
Zorro S 1.46.3 Trading Automaton
Made with Gamestudio by oP group 2015



regards,
Milan


Description: After switch to another acount
Attached picture Sni?mek obrazovky 2016-07-22 v 23.27.04.png
Posted By: jcl

Re: BUG in MT4 Bridge - 07/25/16 10:59

Normally it crashes already when you move the Zorro EA in the chart window and have not set "Allow automated trading" in the options or with the Auto Trading button. You see then the message "Error - see log" in the chart window. Since this happens in the bowels of MT4, we have no easy workaround. So always set EA options according to the instructions in the manual for installing the bridge.
Posted By: MIGI

Re: BUG in MT4 Bridge - 07/26/16 17:13

if you want to make it a bit more user friendly, you can add some lines of code in the EA:

if ( !IsConnected() ) { Alert( "Not connected" ); return; }
if ( !IsDllsAllowed() ) { Alert( "DLLs not allowed" ); return; }
if ( !IsExpertEnabled() ) { Alert( "Expert not enabled" ); return; }
...
Posted By: Grat

Re: BUG in MT4 Bridge - 08/05/16 15:59

hi,

i found better solution.


void OnDeinit(const int reason)
{
if(UninitializeReason() == REASON_REMOVE) { //!= REASON_CHARTCHANGE) {
ObjectsDeleteAll();
g_Running = false;
ZorroExit();
}
}
Posted By: jrath

Re: BUG in MT4 Bridge - 03/08/17 01:39

thanks for this
© 2024 lite-C Forums