Global Variables - timing issue  [SOLVED]

Questions about MultiCharts and user contributed studies.
User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Global Variables - timing issue

Postby syswizard » 03 Feb 2019

I am trying to pass indicator values from a workspace to another workspace and another chart.
How can I be assured my GVGet calls are getting the latest GVSet data since they are both firing off at the Close of the bar with the same bar interval ?
In other words if the GVGet fires before the GVSet, it will be retrieving stale data.
It would be great if I could delay the GVGet calls by 100 milliseconds or so.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Global Variables - timing issue

Postby TJ » 03 Feb 2019

I am trying to pass indicator values from a workspace to another workspace and another chart.
How can I be assured my GVGet calls are getting the latest GVSet data since they are both firing off at the Close of the bar with the same bar interval ?
In other words if the GVGet fires before the GVSet, it will be retrieving stale data.
It would be great if I could delay the GVGet calls by 100 milliseconds or so.
GVs are sent in one bar and retrieved in the next bar.
There is always a one bar delay.

You can try the BARSTATUS=0 condition.

User avatar
syswizard
Posts: 295
Joined: 15 Dec 2012
Has thanked: 16 times
Been thanked: 28 times

Re: Global Variables - timing issue

Postby syswizard » 04 Feb 2019

Thanks for that TJ....so always a one bar delay. I think I can live with that.
So one very important issue is to insure the receiving chart has the exact same time/tick interval.....
Or the receiving chart must be equal to or LOWER than the sending chart in terms of interval.

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: Global Variables - timing issue  [SOLVED]

Postby TJ » 04 Feb 2019

Thanks for that TJ....so always a one bar delay. I think I can live with that.
So one very important issue is to insure the receiving chart has the exact same time/tick interval.....
Or the receiving chart must be equal to or LOWER than the sending chart in terms of interval.
Timing-based analysis on multi-data . . . works best with time-based charts.

The two charts can be of the same time interval,
or, if they are not the same fractal, the sending chart should have the finer resolution.


Return to “MultiCharts”