Errors, bugs, questions - page 1029

 
Silent:

Tried to attach OnTimer with ChartRedraw instead of switching to another TF - no response, it updates, but the error hangs.

I'll try again.

No, it doesn't work that way. You need a pause after the first switch before the second one .
 
MetaDriver:

...

// Corrected the link. First it was through "my codes", now it's through a general login to kodobase. // Does it work now? Or do you have to unlogin to get the public link?

Yeah, it works.
 
MetaDriver:
No, it doesn't work that way. You need a pause after the first switch before the second one .

There's something wrong with the optimization.

// Not with the code optimiser, but with the logical optimisation of the charts.

I'm not mad, it happens, you can't keep track of everything, you just need to fix it.

Heh, I'll have to get the service desk on it.

 
MetaDriver:

They messed up something there with the optimization.

// Not with the code optimiser, but with the logical optimisation of the charts.

I'm not mad, it happens, you can't keep track of everything, I just need to fix it.

Heh, we're going to have to stress Service Desk.

Maybe we need a command that will simulate a change of tf and cause a complete re-initialization of the chart?

Not only with indicators it would remove a lot of problems.

 
"
Silent:

Maybe we need a command that will simulate the change of timeframe and lead to a complete re-initialization of the chart?

Not only with indicators it would solve a lot of problems.

Maybe, but it would be better not to change timeframe at all. In a good way, for indicators we need a simple tick generation.

It is not always suitable for my purposes, but in general it would solve a lot of "weekend problems".

 
MetaDriver:
"

Maybe, but it would be better without any changes of timeframe. In fact, for indicators we need a simple tick generation.

It is not always suitable for my purposes, but in general it would remove a lot of 'weekend problems'.

Well, yes, without any change, just imitation with consequences, as if there was a change of timeframe. The generation of some event.

The upd they are not only weekend, any breakdown of communication is there too.

 
Silent:

They're not just the output, any break in the connection is there too.

Agreed.

A "command" to forcibly null all prev_calculated for the selected character would also be useful. With subsequent tick generation would combine well.

 
MetaDriver:

I agree.

A "command" to forcibly null all prev_calculated for the selected character would also be useful. With subsequent tick generation would be a good combination.

Oh!

Write to the sd, what will the sd say?

 

One more question:

         sDatetime  = FileReadString(file_handle);
         sActual    = FileReadString(file_handle);
         sConsensus = FileReadString(file_handle);
         sPrevious  = FileReadString(file_handle);
         
         barshift = iBarShift(Symbol(), Period(), datetime(formatdatetime(sDatetime)), false); //ВОТ ЭТА СТРОКА ВЫДАЕТ ПРАВИЛЬНЫЙ БАРШИФТ.
         if(StringToDouble(formatstring(sActual)) > 0 && StringToDouble(formatstring(sActual)) < 10000) ActualBuffer[barshift] = StringToDouble(formatstring(sActual));
         Print(formatdatetime(sDatetime));
         Print("iBarShift = ", barshift, " Datetime = ", formatstring(sDatetime), " sActual = ", sActual, " sConsensus = ", sConsensus, " sPrevious = ", sPrevious);

This is a piece of indicator code that loads fundamental data from csv.

1. we enter the bar number in the barshift using a function. Debugged the program. This line works correctly.

But this line produces an error "Array OUT of range". Why? Do buffers now need additional fancy features? I didn't cite the code above, I created it by template through "create->indicator", I filled in the buffers through wizard. Z.U. I even set the conditions so that only barshift checked in the range from 0 to 10 000. But it didn't help.

ActualBuffer[barshift] = StringToDouble(formatstring(sActual));

Also, I got the barshift using the composter library. Is it possible that there are no built-in tools in Metatrader?

 
Al_key:

One more question:

This is a piece of indicator code, that loads the fundamental data from csv.

1. In the barshift we enter the bar number by date time using the function. I debugged the program. This line works correctly.

2. this line gives an error "Array OUT of range". Why? Do the buffers now require additional shamanism.

I don't cite the code above,

was done by template through "create->indicator", buffers through the wizard. Z.I. I even set the conditions so that only barshift checked in the range from 0 to 10 000. But it didn't help.

Also, I got the barshift using the composter library. Is it possible that there are no built-in tools in Metatrader?

"We have to, Fedya. It's necessary."

(c) Shurik.

--

Such an error occurs, for example, if memory for a dynamic buffer is not allocated (in this case, for ActualBuffer). It's not clear from the code fragment you've cited.

Reason: