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 kinfxhk, 07-13-2026, 10:18 AM
        0 responses
        33 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 09:50 AM
        0 responses
        29 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-13-2026, 07:21 AM
        0 responses
        36 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 07-11-2026, 02:11 AM
        0 responses
        33 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        141 views
        0 likes
        Last Post SalmaTrader  
        Working...
        X