Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Help with applying Indicator to BarsRequest Result

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

    Help with applying Indicator to BarsRequest Result

    I use the 14-Day Average True Range pretty much in all trading strategies - primarily for adding wiggle-room to my stop orders.

    As such I thought I would take advantage of the new BarsRequest feature in NT8 and write a new Indicator ATR14D that grabs 15 Daily bars and exposes a single value to the chart/strategy that loads it without needing to add a daily series.

    It seems to be working ok, yet the Average True Range I am being returned does not equate to the 14D ATR Indicator Value on either NinjaTrader or FXCM. Its out by more than 50%.

    Can anyone see what I am doing wrong here (file attached).
    Attached Files

    #2
    Can anyone help with this?

    Comment


      #3
      Hello reach4thelasers,

      Thank you for your patience. I am currently looking into this and will update you as soon as possible.
      Michael M.NinjaTrader Quality Assurance

      Comment


        #4
        Hello reach4thelasers,

        The bars request is not enough to calculate the indicator. There is a lot more work a 3rd party developer would need to do to get this to work. I have spoken with our PM department and we are looking to to see what can be done to either simplify the process or provide a full working example. In the meantime, if your purpose is to simply not have to work with a multi timeframe indicator/strategy, you could write an indicator which adds a 1 day series, calls the ATR with that data series, and exposes a data series containing the same values. Then in your code you would just call the indicator you created. You would likely have to update that indicator before calling its value using the Update() method.

        Please let me know if you have any questions or if I may be of further assistance.
        Michael M.NinjaTrader Quality Assurance

        Comment


          #5
          Ok thats very disappointing but I'm sure I can make it work..... If I add 15 Daily bars to an inidcator and then add that indicator to a 30s strategy... does that mean that I need to load 15 days of 30 second bars or will it just need the 15 bars?

          I could, alternatively, manually implement the ATR logic in my own indicator using the BarsRequest response - its quite well-defined and very simpl;e although it would violate the DRY principle which would upset me immensely :-|
          Last edited by reach4thelasers; 09-28-2015, 12:31 PM.

          Comment


            #6
            Hello reach4thelasers,

            In my example and to your first question, the number of bars loaded would be the same for both indicators so this would not be ideal if your purpose was specifically to only load x number of bars in the other series.

            To your second question, this would be a viable option as well.

            Please feel free to reply this thread in a few weeks as we may have more information on this at that time.

            Please let me know if I may be of further assistance.
            Michael M.NinjaTrader Quality Assurance

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by argusthome, Yesterday, 10:06 AM
            0 responses
            17 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            16 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            14 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            9 views
            0 likes
            Last Post TheRealMorford  
            Started by Mindset, 02-28-2026, 06:16 AM
            0 responses
            38 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Working...
            X