Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Halting a strategy

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

    Halting a strategy

    I would like to exit my strategy as soon as any order is filled and then let the stops manage the rest of the trade without the strategy running.

    Any ideas how to code a halt?

    Thanks,
    spikebuck77

    #2
    Welcome to our forums - here's a sample that would show how to programmatically halt a strategy to not process further OnBarUpdate() logic to trigger further entries - http://www.ninjatrader.com/support/f...ead.php?t=4804
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I tried using the the SampleHaltBasicStrategy to see when it actually exits the program. I ran it all day and it continued to take new positions.

      Any idea how I can exit the strategy completely without manual intervention?

      Thanks again.

      Comment


        #4
        Unfortuantely you can't programmatically stop / disable the strategy instance or shutdown for example NT. The basic sample you ran would monitor strategy performance and exit ouf of the OnBarUpdate() logic if it either won 1000$ or lost 400$ - if this case was not hit in your testing, the strategy would continue to trade for sure.

        For a more advanced sample involving our event driven order management methods as well, please see the SampleHaltAdvancedStrategy offered on the same link.
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        18 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        1 view
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        6 views
        0 likes
        Last Post Javierw.ok  
        Started by timmbbo, Today, 08:59 AM
        2 responses
        10 views
        0 likes
        Last Post bltdavid  
        Started by alifarahani, Today, 09:40 AM
        6 responses
        41 views
        0 likes
        Last Post alifarahani  
        Working...
        X