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 Kaledus, Today, 01:29 PM
        0 responses
        3 views
        0 likes
        Last Post Kaledus
        by Kaledus
         
        Started by PaulMohn, Today, 12:36 PM
        1 response
        15 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by yertle, Yesterday, 08:38 AM
        8 responses
        36 views
        0 likes
        Last Post ryjoga
        by ryjoga
         
        Started by rdtdale, Today, 01:02 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_LuisH  
        Started by alifarahani, Today, 09:40 AM
        3 responses
        18 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X