Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Embedded Input series inaccurate

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

    Embedded Input series inaccurate

    I have an embedded/nested indicator as the price series for another indicator and am printing to Output to test some values and am getting unusual results. I have printed the value for Input[1] two times and they do not match. Maybe I'm missing something but I can't figure out what would cause this. The second printed value of Input[1] is the correct value. Input[2] and Input[0] are correct.

    Code:
    if (CurrentBar > 50 && IsFirstTickOfBar)
            {
                Print("(2)  " + Input[2] + "    " + CurrentBar);
                Print("(1)  " + Input[1] + "    " + CurrentBar);
                Print("(0)  " + Input[0] + "    " + CurrentBar);
                Print("(1)  " + Input[1] + "    " + CurrentBar);    
            }​
    Output
    (2) 3842.25 5461
    (1) 3842.5 5461
    (0) 3843 5461
    (1) 3842.75 5461

    ​​

    #2
    Hello Taggart,

    Input[0] (meaning the current bars value) is not correct compared to what?

    Are you comparing to the host indicator printing the same value?

    Please provide an export of a reduced test script.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Input[1] printed from the host indicator did not match the value of the nested indicator run independently. I was able to solve the issue programmatically with Update().

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      633 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      364 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      105 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      567 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      568 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X