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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      37 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, Yesterday, 02:41 AM
      0 responses
      17 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      25 views
      1 like
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      34 views
      0 likes
      Last Post CarlTrading  
      Working...
      X