|05-21-2010, 08:35 AM||#1|
Join Date: May 2009
Thanked 0 times in 0 posts
BarsAgo appears to be lagging
As soon (i.e. immediately) as a new bar opens, I am needing to start scanning the prior bars.
I must have something wrong because it looks to me like on the first tick of a new bar that the  bar pointer has not yet been moved to the new bar.
Below is the code to indicate what is happening, if you put it in an indicator, on a new bar  is still pointing to what I would have thought would now be .
(If you run it on a tick chart it will move fast enough to see what is happening.)
Is this so?
If possible, how can I reliably start processing backwards on the first tick of a new bar?
Do I need to treat  as ?
If so at what point does  move to the current bar, making that process invalid?
// This method is used to configure the indicator and is called once before any bar data is loaded.
protected override void Initialize()
CalculateOnBarClose = true;
Overlay = true;
AutoScale = false;
/// Called on each bar update event (incoming tick)
protected override void OnBarUpdate()
Print ("New Bar");
Print("Bar 0 Open = "+Open.ToString());
DrawArrowDown("tag1", true, 0, Open + TickSize, Color.Red);
if (CurrentBar < 1)
Print("Bar 1 Open = "+Open.ToString());
DrawArrowDown("tag2", true, 1, Open + TickSize, Color.Blue);
|Thread||Thread Starter||Forum||Replies||Last Post|
|Strategy Analyzer: Performance only appears in Instruments grid, not in Summary||adamus||Version 7 Beta General Questions & Bug Reports||6||05-18-2010 11:11 AM|
|NT lagging||Lost Trader||Miscellaneous Support||1||05-07-2009 12:51 PM|
|I found a bug that appears every so often...||VagyokC4||Strategy Development||8||09-28-2007 08:22 AM|
|New User Needs Help -- No data appears in chart||ninja.man||Charting||1||08-31-2007 03:23 PM|
|Ninja Lagging||guy||Miscellaneous Support||2||03-28-2006 11:09 AM|