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 XXtrader, Yesterday, 11:30 PM
        2 responses
        11 views
        0 likes
        Last Post XXtrader  
        Started by Waxavi, Today, 02:10 AM
        0 responses
        6 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by TradeForge, Today, 02:09 AM
        0 responses
        11 views
        0 likes
        Last Post TradeForge  
        Started by Waxavi, Today, 02:00 AM
        0 responses
        2 views
        0 likes
        Last Post Waxavi
        by Waxavi
         
        Started by elirion, Today, 01:36 AM
        0 responses
        7 views
        0 likes
        Last Post elirion
        by elirion
         
        Working...
        X