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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        72 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X