Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to track track StartBehavior.WaitUntilFlat state?

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

    How to track track StartBehavior.WaitUntilFlat state?

    Hello.
    I am creating strategy that should stop working if Strategy Position not same to Account Position.
    Strategy's StartBehavior.WaitUntilFlat.
    If strategy starts live with historical position - it wait until Strategy Position become flat and, of course, Strategy Position != Account Position
    What is the best way to detect that strategy is in position adopting state?

    Thank you.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    In the other words, how can I detect that strategy is yellow here:
    Attached Files
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    Comment


      #3
      Hello fx.practic,

      Thank you for your note.

      If you're simply wanting to see whether the strategy is still waiting, you can use IsWaitUntilFlat:



      If you are wanting the strategy to make sure your account and the strategy itself are in the same position when the strategy begins, you can use Wait Until Flat, Synchronize account.

      When using this setting, if the Account Position is flat already, no reconciliatory order will be submitted. The strategy will then wait for the Strategy Position to reach a flat state as well before submitting any orders live.

      If the Account Position is not flat, NinjaTrader will submit a market order(s) to reconcile the Account Position to a flat state. The strategy will then wait for the Strategy Position to reach a flat state before submitting live orders.

      Here's more information on the various Start behaviors for strategies:



      Please let us know if we may be of further assistance to you.

      Comment


        #4
        Thanks a lot, Kate!
        I've just re-read whole section of manual about strategies and missed this useful property somehow.
        That's what I need.
        fx.practic
        NinjaTrader Ecosystem Vendor - fx.practic

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        81 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        41 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        64 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        66 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X