Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Running a Strategy with Manual Intervention + How to stop a strategy

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

    Running a Strategy with Manual Intervention + How to stop a strategy

    Hi,
    As I watch the strategy execute, I'm trying to move my stop up manually, but it keeps resetting itself to its original position with each bar. My strategy is set to 'on bar close'. So that makes sense. But I am curious, is there a way to execute a strategy such that manual intervention can be allowed..?

    Also, I've noticed that on simulation mode, when I end a strategy, the account value keeps changing - looks like the orders did not completely cancel! How do I END or STOP executing a Strategy such that all orders are immediately closed out and the account is FLAT? This is certainly important when the strategy is executing on the actual account.

    Thanks.

    RK

    #2
    Hello rasdaka,

    You will need to submit an exit order using isLiveUntilCancelled as true, and then not update the order after submitting it.

    See the post below with details.
    https://ninjatrader.com/support/foru...21#post1204121

    To automatically cancel working entry and exits enable 'Cancel entry orders when a strategy is disabled' and 'Cancel exit orders when a strategy is disabled' in Tools -> Options -> Strategy.

    To submit an order to close a position, call ExitLong() and ExitShort() when State is State.Terminated in OnStateChange().
    https://ninjatrader.com/support/help...tatechange.htm

    You could also call CancelOrder() with any orders assigned to variables in OnOrderUpdate() when the strategy is terminating.
    https://ninjatrader.com/support/help...ancelorder.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thanks, ChelseaB. I've set the config on Tools > Options > Strategy as advised.

      I do wonder about the 'ATM Strategy' config items. Curious if you might be able to direct me to some documentation explaining these options..?

      Click image for larger version

Name:	image.png
Views:	124
Size:	94.9 KB
ID:	1219636​​

      Many thanks!

      RK
      Attached Files

      Comment


        #4
        Hello RK,

        This is related to Atm Strategy templates and not NinjaScript.

        Below is a link to the help guide definitions.
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        41 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        12 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        8 views
        0 likes
        Last Post port119
        by port119
         
        Started by Philippe56140, Today, 02:35 PM
        0 responses
        7 views
        0 likes
        Last Post Philippe56140  
        Started by 00nevest, Today, 02:27 PM
        0 responses
        7 views
        0 likes
        Last Post 00nevest  
        Working...
        X