Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Custom created series out of sync

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Custom created series out of sync

    private Series<double> priceH;
    priceH = new Series<double>(this);

    protected override void OnBarUpdate()
    {
    priceH[0]=High[0];

    if((!(Calculate == Calculate.OnBarClose) && CurrentBar==Bars.Count-1) || (Calculate == Calculate.OnBarClose && CurrentBar==Bars.Count-2))
    {
    for(int i=0;i<Bars.Count;i++)
    {
    if(i<Bars.Count-1)
    ZigZagLine[CurrentBar-i]=priceH.GetValueAt(i);
    }
    }
    }

    -------------------

    ---------------------
    priceH array series out of sync.
    how to fix?

    #2
    Hello buildorbust,

    Thanks for your post.

    This appears to be a duplicate of the post in the NinjaTrader8 forum and your script does appear to use NinjaTrader8 syntax.

    Here is a link to the other thread where I have already replied: https://ninjatrader.com/support/foru...es-out-of-sync

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CaptainJack, 05-29-2026, 05:09 AM
    0 responses
    256 views
    0 likes
    Last Post CaptainJack  
    Started by CaptainJack, 05-29-2026, 12:02 AM
    0 responses
    165 views
    0 likes
    Last Post CaptainJack  
    Started by charlesugo_1, 05-26-2026, 05:03 PM
    0 responses
    169 views
    1 like
    Last Post charlesugo_1  
    Started by DannyP96, 05-18-2026, 02:38 PM
    1 response
    252 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 05-11-2026, 05:56 AM
    0 responses
    203 views
    0 likes
    Last Post CarlTrading  
    Working...
    X