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 argusthome, 03-08-2026, 10:06 AM
      0 responses
      88 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      48 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      30 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      33 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      68 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X