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 traderqz, Yesterday, 12:06 AM
        11 responses
        27 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by PaulMohn, Today, 03:49 AM
        0 responses
        7 views
        0 likes
        Last Post PaulMohn  
        Started by inanazsocial, Today, 01:15 AM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Jason  
        Started by rocketman7, Today, 02:12 AM
        0 responses
        10 views
        0 likes
        Last Post rocketman7  
        Started by dustydbayer, Today, 01:59 AM
        0 responses
        4 views
        0 likes
        Last Post dustydbayer  
        Working...
        X