Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How is this possible ?

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

    How is this possible ?

    DataSeries 0 = 49 Volume
    DataSeries 1 = 343 Volume

    Print Statement in OnbarUpdate()
    8/28/2017 6:06:18 PM CurrentBars[0] = 20 CurrentBars[1] = 1860

    How can the number of 343 bars ever be greater than the number of the Lower Resolution
    Bars ??


    AddDataSeries are all in proper order.

    #2
    Hello JerryWar,

    I am not able to reproduce this behavior.

    I have exported the script I have tested so that you may test this on your end.

    Please import the script and do not modify it. Open the output window and add this to a chart.

    Then please include the output from the output window.

    The output I'm receiving looks like:
    BIP: 1 , Times[1][0]: 8/28/2017 4:00:03 PM, Times[2][0]: 8/28/2017 4:00:03 PM, CurrentBars[1]: 76, CurrentBars[2]: 10
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Chelsea, Your indicator output looks Correct.

      I was having an issue an tracked it to adding two indicators which had no processing of BarsInProgress. So I segregated them with a conditional statement and added the print statement as a Sanity check but instead got the questionable printout.
      This is the print statement. I have no clue how it could possibly print the way it did.

      Print ( Time[0].ToString()+ " CurrentBars[0] = " + CurrentBars[0].ToString() + " CurrentBars[1] = "+CurrentBars[1].ToString() );

      Comment


        #4
        Hello JerryWar,

        Without an export of the script, I would not be able to provide you details of why the print printed as it did. There is no way to know what current bar represents with the snippet of code you have provided.

        Likely, the series indexes are not the series you are expecting. Try printing the BarsPeriods[index].Value and BarsPeriods[index].BarsPeriodType.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        79 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        45 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        66 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X