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 charlesugo_1, 05-26-2026, 05:03 PM
            0 responses
            61 views
            0 likes
            Last Post charlesugo_1  
            Started by DannyP96, 05-18-2026, 02:38 PM
            1 response
            148 views
            0 likes
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 05-11-2026, 05:56 AM
            0 responses
            162 views
            0 likes
            Last Post CarlTrading  
            Started by CarlTrading, 05-10-2026, 08:12 PM
            0 responses
            98 views
            0 likes
            Last Post CarlTrading  
            Started by Hwop38, 05-04-2026, 07:02 PM
            0 responses
            286 views
            0 likes
            Last Post Hwop38
            by Hwop38
             
            Working...
            X