Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

WaitUntilFlat - Synchronize - TD Ameritrade

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

    WaitUntilFlat - Synchronize - TD Ameritrade

    Hello:

    I have read the threads on synchronization of positions between a strategy and broker, and made the change in Tools - Options - Strategies - NinjaScript tab in Control Center to "Wait until flat before executing live". However, the display window still appears that positions are not in synch when adding a strategy to a graph. Any ideas? Thanks.
    Last edited by tonyh; 04-02-2010, 11:12 AM. Reason: misspelled word

    #2
    When you add a strategy to a chart it will always have a strategy calculated position. When you use WaitUntilFlat what that means is that any strategy action that may come afterwards to handle that strategy position will be a virtual trade and not be submitted to your live account. Once the strategy position crosses a flat state it will then submit the next order action live to your account. The sync occurs at that point in time (provided you had your account position at flat the whole time).
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      WaitUntilFlat - Synchronize - TD Ameritrade

      Hello Josh:

      Understand your explanation. I guess the best thing for me to do is have a strategy just for processing any trade triggering conditions when live on realtime data using the following code right after OnBarUpdate():

      if (Historical) return;

      My question with placing this code in the strategy is:
      What will this do to a strategy that, for example, requires 20 bars to compute a moving average? Will the 20 bars requirement begin at activation of the strategy, or use the historical 20 bars prior to entry into live conditions? Thanks.

      Comment


        #4
        Indicators begin near the beginning of the chart. When you add if (Historical) what it does is it just says no strategy logic will be processed. This does not impact your indicators.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          WaitUntilFlat

          Hello Josh:

          Thanks. Based on your explanation of the example I gave, the trade trigger can be activated on historical data once the system goes live...assuming the entry rules are true at that time.

          Comment


            #6
            tonyh, that is correct.
            AustinNinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            569 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            330 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            548 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            548 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X