Refreshing offline charts - background, performance and solution ideas - page 2

 
Stanislav Korotky:
Should we probably ask a moderator to edit the title of this thread to something more applicable? I find current wording (especially "reloading", shouldn't be "refreshing"?) a bit inappropriate for underlying problem. Also "offline charts" are not mentioned at all, but this is essential.

Hello Stanislav,

yes you may do this as you like. Meanwhile this discussion becomes more and mor interessting for many people I think.

How is this: "Refreshing offline charts - background, performance and solution ideas"


Sorry - I looked - but haven't found a link to inform a moderator. Mail to mql5-website? If you like, you can change the title and please tell me how this is done.

 
JHawk:

yes you may do this as you like. Meanwhile this discussion becomes more and mor interessting for many people I think.

How is this: "Refreshing offline charts - background, performance and solution ideas"

Sorry - I looked - but haven't found a link to inform a moderator. Mail to mql5-website? If you like, you can change the title and please tell me how this is done.

I'm not a moderator, but they read the thread as well. The updated title suggestion is ok.

 
Now the thread title is really mis-leading.  It is in no way about refreshing offline charts. It is about shifting indicator buffers to re-use data stored in it.
 
int onTick() {
   // original Valid/ChangedBars values for regular charts (might be modified in offline charts)
   int ValidBars   = IndicatorCounted();
Makes no sense. Indicators use IndicatorCounted (old way) or OnCalculate (new way.) EAs use OnTick (new way.) There is no onTick(). Start using the new Event Handling Functions.
          Event Handling Functions - Functions - Language Basics - MQL4 Reference
 
whroeder1:
Makes no sense. Indicators use IndicatorCounted (old way) or OnCalculate (new way.) EAs use OnTick (new way.) There is no onTick(). Start using the new Event Handling Functions.
          Event Handling Functions - Functions - Language Basics - MQL4 Reference

You did not understand. This is a part of a large MQL library - available via presented links on GitHub - where its own "events" are defined for all types of MQL programs. onTick is not MetaTrader's function (otherwise it would be capitalized) but a special library function called from oldfashioned start (see here for example).

Reason: