Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Add() method in Initialize()

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

    Add() method in Initialize()

    Hey, two big thumbs up for the work on NT7 - it's really shaping up to be great!!

    In an NT7 strategy, how would I add a HeikenAshi chart that matches my primary OHLC chart type and period, and how should I reference it to add indicators based on it?

    The first issue seems to be that there is only one overload for AddHeikenAshi(), and it requires a reference to the period type and value. I could get the primary chart type and period from the Bars object, except that references to the Bars object are not allowed in Initialize().

    The second question is similar: if I could get the HA chart added, then I could reference BarsArray[1] as a DataSeries input for my indicators...except that I would imagine that's not allowed in Initialize() either.

    What would you suggest?

    Greg

    #2
    Greg,

    You will need to hard code Add()s. You should not be placing any indicator logic in Initialize(). Initialize() does not have any bars created yet.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks

      Okay, that's what I thought.

      I noticed in 6.5 that there was an Add() overload to add an alternate period/type for whatever the primary instrument is, to get around this type of issue...so a nice enhancement to 7.0 might be a set of overloads to add alternate chart types for whatever the primary instrument and timeframe happen to be. The new chart types are so nice that adding them as alternate/parallel views seems like it would be a common thing to want to do.

      Again, you guys are doing a great job - I'm loving the 7.0 beta! Thanks and keep up the great work!

      Greg

      Comment


        #4
        Thanks for the suggestion.
        Josh P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by Mindset, 05-06-2023, 09:03 PM
        10 responses
        265 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by michi08, 10-05-2018, 09:31 AM
        5 responses
        743 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Working...
        X