Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot0 Value on FirstTickOfBar

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

    Plot0 Value on FirstTickOfBar

    On FirstTickOfBar Plot0[0] is reset to Close[0], regardless of prior value. It continues to Plot correctly.

    protected override void OnBarUpdate()
    {

    if(FirstTickOfBar)
    {
    Print("plot0 value = " + Plot0[0].ToString());
    Print("delta value = " + delta.ToString());

    }
    //Print("plot0 value intrabar = " + Plot0[0].ToString());
    delta = 5;

    Plot0.Set(delta);
    }

    #2
    palinuro,

    When no values are set yet it takes on a default value for place holding purposes which is the Close[0].
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Josh View Post
      palinuro,

      When no values are set yet it takes on a default value for place holding purposes which is the Close[0].
      That seems odd behavior. Values have been set for the previous bars, and I would have expected it to default to the previous bar's value until it changes.

      But I can work around it.

      Comment


        #4
        Interesting. I would have thought you used some interesting value to determine the status of DataSeries.ContainsValue().

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        597 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        343 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        556 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        555 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X