• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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:

      https://ninjatrader.com/support/help...tuntilflat.htm

      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:

      https://ninjatrader.com/support/help..._positions.htm

      Please let us know if we may be of further assistance to you.
      Kate W.NinjaTrader Customer Service

      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 KNalley, Today, 09:33 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by herkok, Today, 09:15 AM
        3 responses
        16 views
        0 likes
        Last Post herkok
        by herkok
         
        Started by AMATX, Today, 09:29 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Heath  
        Started by arnegockeln, Today, 09:25 AM
        0 responses
        3 views
        0 likes
        Last Post arnegockeln  
        Started by itrader46, Today, 07:51 AM
        2 responses
        21 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Working...
        X