Waiting For Update message?

 

I wrote a little expert which, similar to period converter, updates non-standard history file and sends refresh to offiline chart. This way offline chart behaves much like live chart updating every time a new tick is received.

One weird problem I encountered is when I drop a script on offline chart it works fine and say draws a trendline. But a little while afterwards (1-3 minutes) I get "Waiting For Update" on screen and offline chart freezes. Then I have to delete chart and recreate anew.

When I just draw a trendline manually chart does not freeze, so I assumed it's something between offline chart refresh and script run.

Can anybody shed any light on this? Greatly appreciatied.

 

Is your script a loop, and if so, do you have a Sleep in it?

I have offline charts with scripts, without freezing, so your problem is not intrinsic to offline+script

 
phy:

Is your script a loop, and if so, do you have a Sleep in it?

I have offline charts with scripts, without freezing, so your problem is not intrinsic to offline+script


It is not a script but an expert that runs in M1 chart generating M3 chart. M3 offline chart is the one that freezes after script is applied.
 

I'm not sure you answered my question...

 

I am posting my expert which maintains custom time frame much like period converter. The difference is, there is no loop. Every time tick comes in record is updated and custom chart is refreshed. So it behaves much like a live chart.

The problem is that as soon as you drop any sript on custom chart after a few ticks (it seems when new bar needs to be created) chart freezes with "WAITING FOR UPDATE" message.

Otherwise chart works for hours without any problems. Indicators are ok they do not cause any problems.

Open 1min chart, attach CustomPeriod expert to it, go to File/Open Offline, find 3min chart and open it. It should update now synchroneously with 1min chart.

As soon as you execute any script on the 3min chart "WAITING FOR UPDATE" message will appear after a few ticks.

Rosh or Stringo might look at this strange phenomenon.

Files:
 


I tried it out...

I wrote a script with only one line in it, a comment.

int start()
{
Comment("Empty Script ran.");
return(0);
}

Started the expert, Opened offline file, waited a few bars, ran script, and, as you say, the update then fails.

But..

I had another script, which, when added, caused a fail...

But...

With two M3 charts fed by one chart with the expert, it all runs.
Maybe initializing the Expert with Open Offline charts already in place makes it work.

I have no idea.

Reason: