Errors, bugs, questions - page 2584

 
Georgiy Merts:

Here's a question.

Sometimes I get an array overrun error during optimization, with a certain set of parameters. The error occurs rather seldom and I cannot reproduce it. I need to know the set of parameters at which this error occurs. How to determine this set of parameters? There is a pass number in the tester's log, but this parameter set is not present in the report. Where can I see which parameters were used in this run?

Modify this bible to write the prints to the Common file.

 
And another bug - if one of the parameters is ENUM_TIMEFRAMES period, then on a 1D or 2D chart by this parameter - I have no display for some reason. Is it just me ?
 
fxsaber:

Modify this biblio to write the prints to the Common file.

Yes, if there are no other options, that's an ok solution. Thank you.

And let's keep it on a first name basis, we've known each other virtually for a long time.

 
Do I understand correctly that pointers to a variable don't work in mql?
void OnStart()
{ 
   int *ptr;
}

The compiler says the pointer cannot be used.

 
Roman:
Do I understand correctly that pointers to a variable don't work in mql?

The compiler says the pointer cannot be used.

It seems that pointers can only be to objects, and are obtained by calling GetPointer()

 
Georgiy Merts:

It seems that pointers can only be to objects, and are obtained by calling GetPointer()

Thank you. Yes, no problems with class objects, that's why I was surprised it doesn't work with variables, it's sad though.

 

I have nowhere to put the brokerage accounts in my personal computer.

When I open "Favorites", there is just a white page.

What's the matter?

I can't see accounts on mql5 or subscribe to anyone.

 

The indicator doesn't call OnDeinit when deleting the indicator, if it has theChartIndicatorGet function, which simply reads a handle of itself without adding it to a variable.

#property indicator_chart_window

int OnInit() {
   for (int i=0; i<ChartIndicatorsTotal(0,0); i++)  
       ChartIndicatorGet(0,0,ChartIndicatorName(0,0,i));
   return(INIT_SUCCEEDED);
}

//+------------------------------------------------------------------+

void OnDeinit(const int reason) {
   Print("Deinit");
}

//+------------------------------------------------------------------+

int OnCalculate(const int rates_total, const int prev_calculated, const int begin, const double &price[]) {
   return(rates_total);
}

And if you recompile the indicator after deleting it, the delayed call of OnDeinit occurs (Print("Deinit");).

Is it OK?


Build 2168

Files:
 
Nikolai Semko:

An indicator does not call OnDeinit when deleting an indicator if it has the ChartIndicatorGet function, which simply reads its own handle even without putting the handle into a variable.

IndicatorRelease is mandatory if it received its own handle.

 
fxsaber:

IndicatorRelease is mandatory if you get your own handle.

Hm...
And where and at what point do I delete an indicator handle?

It would be logical to use OnDeinit, but it doesn't work.

ZS It's a strange picture.
I tried it: if I delete the handle right after I get it, it gets deleted, but the indicator itself does not, the name stays, and it already has a new handle and keeps working. And, indeed, then when deleting the indicator OnDeinit runs.

I tried it with a bufferless indicator, though. I don't know how the data buffer will behave when the handle is deleted.
I don't get it...