• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to stop a strategy

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

    how to stop a strategy

    in strategy builder how can I stop the strategy when my Unrealized or realzied profit is a certain amount... ? any help is appreciated

    #2
    Hello babouin77,

    You can compare the Strategy > Unrealized PnL with Misc > Numeric value.

    Below is a link to the Strategy Builder 301 video.
    https://youtu.be/HCyt90GAs9k

    Also, below is a link to a forum post with helpful information about getting started with NinjaScript.
    https://ninjatrader.com/support/foru...040#post786040
    Attached Files
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      But how to exit the strategy. Anything special that I need to put in the strategy builder to say close all position open or something?

      Comment


        #4
        Hello babouin77,

        Do you want to stop trading?
        In which case just don't have conditions that evaluate as true and call order methods.

        Do you want to disable the strategy?
        In which case (make a copy first then) unlock the script and call CloseStrategy().
        https://ninjatrader.com/support/help...sestrategy.htm
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Ok thanks I’ll try these. So for the first one I just have an empty set with nothing in it?

          Comment


            #6
            Hello babouin77,

            The strategy would remain enabled but would not trade until your conditions say to. You could say wait until October if you wanted.

            These would not be empty condition sets, these would explicitly state when its ok to submit orders.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Got you. Thanks

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by bumbledbee, Today, 04:28 AM
              1 response
              5 views
              0 likes
              Last Post NinjaTrader_Marco  
              Started by Tmaninc, Today, 02:13 AM
              3 responses
              12 views
              0 likes
              Last Post Tmaninc
              by Tmaninc
               
              Started by rexmie888, Yesterday, 09:37 PM
              1 response
              11 views
              0 likes
              Last Post NinjaTrader_ChrisSch  
              Started by larkmail, Yesterday, 06:19 PM
              1 response
              7 views
              0 likes
              Last Post NinjaTrader_Marco  
              Started by jvanelli, Yesterday, 09:23 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Marco  
              Working...
              X