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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X