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 TheMarlin801, 10-13-2020, 01:40 AM
        20 responses
        3,913 views
        0 likes
        Last Post Bidder
        by Bidder
         
        Started by timmbbo, 07-05-2023, 10:21 PM
        3 responses
        150 views
        0 likes
        Last Post grayfrog  
        Started by Lumbeezl, 01-11-2022, 06:50 PM
        30 responses
        804 views
        1 like
        Last Post grayfrog  
        Started by xiinteractive, 04-09-2024, 08:08 AM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Johnny Santiago, 10-11-2019, 09:21 AM
        95 responses
        6,194 views
        0 likes
        Last Post xiinteractive  
        Working...
        X