Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Please, help me to join in my head WaitUntilFlat and GetRealtimeOrder()

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

    Please, help me to join in my head WaitUntilFlat and GetRealtimeOrder()

    Hello.

    Say, we have a strategy with start behaviour WaitUntilFlat.
    And, say, it State == State.Transition strategy has position and protective orders.

    Considering WaitUntilFlat, should strategy do GetRealtimeOrder() for the protective orders?

    if convert orders to realtime, strategy will have "virtual" position and real orders, right?
    And what will happen when a virtual position meets real order?

    I am strongly needed order in my head )

    Thanks in advance.
    fx.practic
    NinjaTrader Ecosystem Vendor - fx.practic

    #2
    Hello fx.practic,

    GetRealtimeOrder is only used to transition orders which are currently active in historical data. If the protective orders are still active and they will be active in Realtime and need to be managed then you need to do that.

    This method is only needed if you have historical order references which you wish to transition and manage in real-time (i.e., you had a working order which was submitted historically and re-submitted in real-time as the strategy is enabled).
    https://ninjatrader.com/support/help...ub=getrealtime


    if convert orders to realtime, strategy will have "virtual" position and real orders, right?
    And what will happen when a virtual position meets real order?
    Your strategy always has a virtual position and the orders being real would depend on the start behavior. Wait until flat will compare the strategy position, in that case you would not have a flat position entering realtime so the orders would just be virtual until the strategy reaches flat. Once you are flat and also in realtime it could start placing real orders.

    If the Strategy Position is flat, then the Account Position and Strategy Position are assumed to be in sync with each other. The next order placed by your strategy would be placed as a live order to your account.

    If the Strategy Position is not flat, the strategy will place all trades in a "virtual" sense until the Strategy Position reaches or crosses a flat state. Once a flat state is achieved the Strategy Position will be assumed to be in sync with the Account Position and all future orders will be placed live.
    https://ninjatrader.com/support/help...#WaitUntilFlat


    I look forward to being of further assistance.

    Comment


      #3
      "the orders would just be virtual until the strategy reaches flat"
      Yahoo, the clarity came to me!
      Thanks a lot, Jesse!
      fx.practic
      NinjaTrader Ecosystem Vendor - fx.practic

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      25 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      121 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X