PureBytes Links
Trading Reference Links
|
> "update on every tick" feature to be only an approximation of the
> end-of-bar value and, therefore, do NOT retain such values beyond the
> close of the bar. A further reason given was that retaining the
> intra-bar value would cause results on "historical" data to differ
> from real-time results (because calculations on historical data use
> only the OHLC bar data, not tick data).
Both are true, although I don't think that's what Abhijit was
asking.
Changes to EL variables don't "stick" until the end of the bar.
Otherwise you could have a chart that displayed one set of values
if built in realtime, and a totally different set of values if
you closed and re-opened the chart, or toggled the status on the
indicator.
> Because I was not assigning the bar's closing value to the variable,
> it was getting "restored" to something else - I believe it was the
> closing vakue of the PREVIOUS bar, or something equally bizarre!
No, it should be the final value you assign in THAT bar.
Gary
|