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 geotrades1, Today, 10:02 AM
        2 responses
        5 views
        0 likes
        Last Post geotrades1  
        Started by ender_wiggum, Today, 09:50 AM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by rajendrasubedi2023, Today, 09:50 AM
        1 response
        12 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by bmartz, Today, 09:30 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by geddyisodin, Today, 05:20 AM
        4 responses
        28 views
        0 likes
        Last Post geddyisodin  
        Working...
        X