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
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
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.
I tried it out...
I wrote a script with only one line in it, a comment.
Comment("Empty Script ran.");
Started the expert, Opened offline file, waited a few bars, ran script, and, as
you say, the update then fails.
I had another script, which, when added, caused a fail...
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
I have no idea.