Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Exit on Session End Close As Entry

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

    #16
    Hi Brandon,

    Thanks for the reply and explanations.

    It seems the issue only affects Ninjatrader Strategy Tab but does not affect the Executions.
    So it seems I can leave it as is.
    I'll test it live and see how it fares. Thanks.

    About the Add On method:

    Can the AddOn method detect and cancel or change unmanaged automatically placed by the strategy orders?
    Or is it restricted to manually entered orders?
    If it does apply to unmanaged automatically placed by the strategy orders can you please refer the exact documentation?

    EDIT:

    What is the way to code the following into the strategy:

    After each closing order is filled, make the Strategy auto-disable itself and then immediately auto-reenable itself?
    Last edited by Cormick; 08-12-2021, 04:25 AM.

    Comment


      #17
      Hello Cormick,

      Thanks for your note.

      The AddOn approach can detect orders placed manually and orders place by a strategy.

      Please see the help guide documentation linked in post number 11 in regards to detecting trades and managing them programmatically. You would need to detect and track orders placed by the strategy the same way you would detect and track manually placed orders.
      1. Loops through the Account.Orders collection for the account to find active orders
      2. Subscribes to Account OrderUpdate events to look for any newly opened orders.
      3. Tracks these Orders in the script so they can be changed or canceled with Account.Change or Account.Cancel
      After each closing order is filled, make the Strategy auto-disable itself and then immediately auto-reenable itself?

      You would be able to disable the strategy when an order is filled by using CloseStrategy(). However, there are no documented or supported means for having a strategy re-enable itself. You would have to enable to strategy by clicking the 'enable' box on the Strategies tab or from a chart by checking the enable box in the Strategies window (Chart Toolbar > Strategies button).

      Let us know if we may assist further.
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CaptainJack, 05-29-2026, 05:09 AM
      0 responses
      90 views
      0 likes
      Last Post CaptainJack  
      Started by CaptainJack, 05-29-2026, 12:02 AM
      0 responses
      58 views
      0 likes
      Last Post CaptainJack  
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      119 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      195 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      176 views
      0 likes
      Last Post CarlTrading  
      Working...
      X