Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

BUG Found.

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

    BUG Found.

    Hi just thought I'd pass this along, having come across this bug. If you have an indicator, let's call it A, and A adds another timeframe (let's say a 5 min chart for argument's sake) and then you use this indicator in another indicator (let's call this B), when the 2nd Bars object is loaded for A (the 5 min chart), this BarsArray is not guaranteed to have the same session as the main Bars object - it will default to the instrument's session template instead.

    IE: if you load a chart with say "Default 24/7" and then load up indicator B, it's Bars object will be correctly set at "Default 24/7", however indicator "A" which is used inside will have the 5 min chart on the instrument's session (not "Default 24/7").

    Jeremy
    Jeremytang
    NinjaTrader Ecosystem Vendor - Shark Indicators

    #2
    Hi Jeremytang,

    This may be expected depending on if the exact added series is on the chart that you're applying the indicator to. Below are the rules for session templates in non-hosted multiseries scripts.

    If a multi-series script adds an additional Bars object that already exists on the chart, the script will use the preexisting series instead of creating a new one to conserve memory. This includes that series' session template as applied from the chart. If the Bars object does not exist on the chart, the session template of the added Bars object will be the session template of the primary Bars object. If the primary Bars object is using the "<Use instrument settings>" session template then the additional Bars objects will use the default session templates as defined for their particular instruments in the Instrument Manager.

    Edit for non hosted clarification.
    Last edited by NinjaTrader_RyanM1; 10-14-2011, 08:40 AM.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thannks Ryan,

      It sounds like the expected behavior in my example should have been to use the "Default 24/7" session. But this is not what actually happens.

      I've added two indicators to illustrate my point. To reproduce:

      1) Open Chart, set the session to "Default 24/7"
      2) Add TestTimeframe indicator - Note this looks correct during the "off hours"
      3) Add TestParentTimeframe - Note this should be identical to the first indicator, but during the "off hours" it isn't

      Jeremy
      Attached Files
      Last edited by Jeremytang; 10-13-2011, 03:54 PM. Reason: Added file examples
      Jeremytang
      NinjaTrader Ecosystem Vendor - Shark Indicators

      Comment


        #4
        Thanks for this test script and steps. Will look into this and update you tomorrow, Friday.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks for your patience, Jeremy. The secondary series in a hosted multi-series indicator will take the session template from instrument settings. In order to use Default 24 /7 in this case you would need to set it at the instrument level. The previous rules apply to non-hosted multi-series scripts.
          Ryan M.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by zstheorist, Today, 07:52 PM
          0 responses
          3 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          149 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Working...
          X