Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem : BarsSinceEntryExecution is major of Curretbar

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

    Problem : BarsSinceEntryExecution is major of Curretbar

    hi,

    In sampeCustomSeries.cs i've this code in State.DataLoaded:


    else if (State == State.DataLoaded)
    {
    myDoubleSeries = new Series<double>(this);

    }

    protected override void OnBarUpdate()
    {


    myDoubleSeries[0] = Math.Abs(Close[0] - Open[0]);
    Print(myDoubleSeries.Count + "Current bar "+ CurrentBar);
    i see this output



    this is the same output if i use



    else if (State == State.DataLoaded)
    {
    // Create a new Series object and assign it to the variable myDoubleSeries declared in the ‘Variables’ region above
    myDoubleSeries = new Series<double>(this,MaximumBarsLookBack.Infinite);
    }

    why ?...if i use the first example (myDoubleSeries = new Series<double>(this)
    the plot of DataSeries.Count it should be 256 and not 13835
    Last edited by turbofib; 05-20-2017, 12:12 PM.

    #2
    Hello turbofib,

    The Count is used internally for other purposes.

    The maximum bars lookback is just for calling indexes that many bars ago. An indexing error will occur if calling more than 256 bars ago. (The count used for the primary series which is used for synchronizing any added series continuous to have the right count)
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    90 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    137 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    120 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    72 views
    0 likes
    Last Post PaulMohn  
    Working...
    X