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 DJ888, 04-16-2024, 06:09 PM
        4 responses
        12 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by terofs, Today, 04:18 PM
        0 responses
        11 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by nandhumca, Today, 03:41 PM
        0 responses
        7 views
        0 likes
        Last Post nandhumca  
        Started by The_Sec, Today, 03:37 PM
        0 responses
        3 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X