• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Use MergeBackAdjusted and MergeNonBackAdjusted In Same Indicator

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

    Use MergeBackAdjusted and MergeNonBackAdjusted In Same Indicator

    I'm doing an indicator calculation where I need to get the ATR from a backadjusted continuous contract and then I need the price from the non-backadjusted series.

    How would you do this in an indicator?
    • How can I programmatically load a data series with a different merge policy than the global settings?
    • Can you add two data series in an indicator that only differ by merge policy?

    #2
    Hello BarzTrading,

    In general, there is no way to specify the merge policy from code as this is handled at the instrument/platform level. You can add series that specify certain trading hours but not the merge policy as this is controlled by the instrument or platforms global settings.

    If you are using the same instruments, that would be an additional roadblock here as the same data would be used in that situation. In this case, I don't believe this would be inherently possible. I can take a feature request for this item.

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks, Jesse. That's helpful. Yes, this capability might only be needed rarely, but there are a few things for which this is VERY useful. I'd also like to see a new merge policy type: "Merge Ratio Back Adjusted". For what I'm doing this would make my life much easier and it would be fairly easy, I think, for your developers to add.

      Finally, I did figure out a roundabout way to have both the backadjusted and unadjusted data series available to the indicator.

      First, you have to load the backadjusted series on the chart using the "ES ##-##" syntax.

      Then in the configure state of your indicator you can look at that primary series, figure out the front contract (or take it as an input parameter), and add the data series "ES 12-18" for example. Meanwhile, your global or instrument merge policy must be set to merge non-back adjusted.

      In this case, the backadjusted series will be available with BarsArray[0] and the unadjusted series will be available with BarsArray[1].

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Tyler7498, Today, 07:34 PM
      0 responses
      4 views
      0 likes
      Last Post Tyler7498  
      Started by Woomera, Today, 07:24 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_ChrisL  
      Started by Newtrader101, Today, 12:31 PM
      2 responses
      13 views
      0 likes
      Last Post Newtrader101  
      Started by kweiss, Today, 06:42 PM
      0 responses
      2 views
      0 likes
      Last Post kweiss
      by kweiss
       
      Started by Newtrader101, Today, 06:31 PM
      0 responses
      6 views
      0 likes
      Last Post Newtrader101  
      Working...
      X