Errors, bugs, questions - page 367

 
Yedelkin:
The problem is most likely in something else. I have the exact same array decl aration in OnInit() worked fine and still works. You have an omitted Latin letter m in the name of the ArrSybols array. Maybe this is a programmer's problem?

It may be missing, but does it make any difference?

And if I write it in native (which is not forbidden, as I understand it) the whole terminal should crash?

The code works exactly without such array declaration, even if you just specify the dimensionality everything works.

//Вот так работает
string ArrSybols[10];

The original array declaration was like this

//List of symbols for trade on the Championship 2010
string ArrSymbolsChampionship2010[10] = {"EURUSD","GBPUSD","USDJPY","USDCHF","USDCAD",
                                        "AUDUSD","EURJPY","EURCHF","GBPJPY","GBPCHF"};
 

The question is still valid.

I have managed to attach the indicator in a separate window to OBJ_CHART, but when I change the size of the indicator window, it is not very nice, because if the height of OBJ_CHART is 500, then the height of the indicator window has been set to maximum 493. As a result, it leaves you with an ugly top. How to get rid of it?

Code:

   if(ObjectFind(0,"MW_chart")!=0)
     {
      ObjectCreate(0,"MW_chart",OBJ_CHART,0,time[0],close[0]);
      ObjectSetString(0,"MW_chart",OBJPROP_SYMBOL,_Symbol);
      ObjectSetInteger(0,"MW_chart",OBJPROP_PERIOD,_Period);
      ObjectSetInteger(0,"MW_chart",OBJPROP_CORNER,CORNER_LEFT_UPPER);
      ObjectSetInteger(0,"MW_chart",OBJPROP_XSIZE,1000);

      ObjectSetInteger(0,"MW_chart",OBJPROP_DATE_SCALE,false);
      ObjectSetInteger(0,"MW_chart",OBJPROP_PRICE_SCALE,false);
      ObjectSetInteger(0,"MW_chart",OBJPROP_SELECTABLE,1);
      ObjectSetInteger(0,"MW_chart",OBJPROP_CHART_SCALE,2);
      ObjectSetInteger(0,"MW_chart",OBJPROP_YSIZE,500);
     }
   int h=iCCI(Symbol(),Period(),14,PRICE_TYPICAL);
   long id=ObjectGetInteger(0,"MW_chart",OBJPROP_CHART_ID);
   ChartIndicatorAdd(id,1,h);
   ChartSetInteger(id,CHART_HEIGHT_IN_PIXELS,1,493);
 
Interesting:

It may have been missed, but does it make a difference?

Of course it does. I don't have to explain it to you :) If an array is defined with one name, but the elements of this array are called with a different array name, then... :)

If everything works without initialization of the array manually, you should look at the code, as you yourself understand. After all, the absence of explicit string-array initialization doesn't prevent the client terminal from initializing this array by itself.

I repeat: such a string worked and still works out "to the best of its ability".

 
Yedelkin:

Of course it does. I don't have to explain it to you :) If an array is declared with one name, but the elements of this array are accessed with a different array name, then ... :)

If everything works without initialization of the array manually, you should look at the code, as you yourself understand. After all, the absence of explicit string-array initialization doesn't prevent the client terminal from initializing this array by itself.

I repeat: such a string worked and still works.

No, no, the problem is not in the name, it's that the array is filled with an enumeration during declaration.

It works well with all the types except for strings. With strings it really crashes any program (expert or script is not important).

This is an obvious bug write to servicedesk.

This is how it works:

// string a[2]={"a","b"};
long   b[2]={2,3};
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
  Print("Работает");   
  }
//+------------------------------------------------------------------+

but if you uncomment the string array declaration, it doesn't work.

Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
 
Renat:
Check the maximum number of bars in the window in the settings
Changed from 100000 to 1000000. Helped, but only after restarting the terminal (help says about the effect of changes after pressing OK).
 

Renat, another wild taffy, are you sure you found the error?


 
The traffic problem is solved, but the thing is that we haven't released the server components in liveupdate yet. So far the client terminal updates have been released and the servers will be in the next update. They have not been tested yet.
 
Renat:
The traffic problem is solved, but the thing is that we haven't released the server components in liveupdate yet. So far the client terminal updates have been released and the servers will be in the next update. They have not been tested yet.
I see. Thank you for your reply. For my part, I will also keep you informed.
 

Last build (430) when testing with Forward period and Custom Max - hangs (seems to be at the moment of switching to Forward testing). At first I blamed it on my Expert Advisor, but then I checked the following code:

input int a1;
input int a2;
input int a3;
int OnInit(){return(0);}
void OnDeinit(const int reason){}
void OnTick(){}
double OnTester() {
   return(rand());
}

I have set parameters to optimize from 1 to 1000, all ticks, USDCAD, M4 from 01.01.2011 to today (with Forward - any period). Freeze. Disabled remote agents - I restarted the terminal - it hangs too. Removed the forward period - it works. Whether Custom Max is to blame - didn't check it. Before this build - everything worked.

 

What does it mean?

2011.04.17 15:21:22 Tester tester agent failed

Reason: