Errors, bugs, questions - page 1592

 
Vladislav Andruschenko:

Variable bug

Build 1340 MT5.

If you put in variables:

The compiler will not give an error, but in the EA parameters on the chart - these parameters will disappear.


So it's like two different variables, although they are the same.

Good day!


Thank you for the feedback. We have reproduced the problem.

 
Alexander:
How did you manage? Write to servicedesk, please.
One geek got banned, couldn't reply. I'll try to localise and provide in the branch (I don't believe in Servicedesk) the short code causing the crash.
 

Optimisation report data do not match real data

 
Vladimir Pastushak:

Optimisation report data do not match real data

Is this related to the currency of the deposit or does the currency have no effect?
 

I create a button


int OnInit()
  {
//---
   ObjectCreate(0,"Buy",OBJ_BUTTON,0,0,0);
   ObjectSetInteger(0,"Buy",OBJPROP_CORNER,3);
   ObjectSetInteger(0,"Buy",OBJPROP_XDISTANCE,110);
   ObjectSetInteger(0,"Buy",OBJPROP_YDISTANCE,40);
   ObjectSetInteger(0,"Buy",OBJPROP_XSIZE,100);
   ObjectSetInteger(0,"Buy",OBJPROP_YSIZE,25);
   ObjectSetString(0,"Buy",OBJPROP_TEXT,"Close All");

   ObjectSetInteger(0,"Buy",OBJPROP_STATE,false);
   ObjectSetInteger(0,"Buy",OBJPROP_FONTSIZE,10);
   

   return(INIT_SUCCEEDED);

  }


Adding a handler


void OnChartEvent(const int id,
                  const long &lparam,
                  const double &dparam,
                  const string &sparam)
  {
   if (id == CHARTEVENT_OBJECT_CLICK)
   {
   if(sparam == "Buy") // button has been pressed
     {    
       ObjectSetInteger(0,"Buy",OBJPROP_FONTSIZE,5);
      OrderSend(Symbol(),OP_BUY,0.01,Ask,0,0,0);
      ObjectSetInteger(0,"Buy",OBJPROP_FONTSIZE,10);
     }
    }

  }


Button press does not work in strategy tester, in demo/real - apparently an error (replay from 2016.05.25)
 

Looks like it was left unnoticed by the developers

Forum on trading, automated trading systems and strategy tester

Error cannot refresh history [4073] MT4

Anton Zverev, 2016.06.01 19:24

I've seen many EAs fail (MT4 build 950) on real account.

Here is terminal log after which it has happened

1       10:45:16.704    'xxx': ping failed
1       10:45:16.707    'xxx': datacenter connecting failed [6]
0       10:45:17.352    'xxx': login on FXOpen-ECN Live Server through ECN Live DC1 (ping: 128.24 ms)

0       10:46:22.799    'xxx': login datacenter on FXOpen-ECN Live Server
0       10:46:31.671    'xxx': login on FXOpen-ECN Live Server through ECN Live DC9 (ping: 129.21 ms)
0       10:47:17.461    'xxx': login datacenter on FXOpen-ECN Live Server through ECN Live DC9 (ping: 129.21 ms)
0       10:47:17.941    'xxx': previous successful authorization performed from xxx

Log

3       10:46:19.439    cannot refresh history [4073]
.................
3       10:46:37.002    cannot refresh history [4073]
0       10:46:37.077    ArrayCopyRates(MqlRates, EURUSD, 1) - error 4073

MarketInfo was giving out in log cannot refresh history [4073], it returns zero!

SymbolInfoDouble returned zero!

ArrayCopyRates returned -1!

Normally (even when not logged) SymbolInfoDouble and ArrayCopyRates returns correct data. So when I requested price for an existing symbol, I thought I'd get exactly what's in the Market Watch. But no! A zero value right on the real account during a long terminal operation is just because the connection with the trade server was interrupted (for whatever reason).

Is it normal?


 
Aliaksandr Kryvanos:

I create a button



Adding a handler



Button press doesn't work in strategy tester, it works in demo/real - error apparently (replay from 2016.05.25)

In the testerOnChartEvent doesn't work... It's been like this for a long time and it's written in the help...

 
Anton Zverev:

Seems to have gone unnoticed by the developers


Have you contacted your broker for an explanation as to why there was no communication with his trading server?
 
Anton Zverev:
One wacko got banned, couldn't reply.

Easy on the bends.

PS You were warned once before not to publicly discuss the actions of moderators.

 
Slawa:
Have you contacted your broker for an explanation as to why there was no connection to his trading server?
Answered in that thread.
Reason: