Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

exit strategy

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

    exit strategy

    Hello, could someone tell me how can I fully quit strategy.
    For example, to reach $ 500 closing strategy and not re-enter a new condition to fulfill.
    Thanks

    #2
    JavierPB, welcome to our forums, with NT 6.5 you could not stop / disable it, but you could stop entering new trades as you Pnl condition occurs -

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi, thanks for answering Bertrand.
      Although very little programming and a little English, I loaded "SamplePnL.zip" and I already knew.
      I'm looking for an instruction as "CLOSE" that closes everything, including the strategy.
      I do not know if I make myself clear.
      Greetings. Javier

      Comment


        #4
        JavierPB,

        Stopping a strategy is not supported. The sample shows you how to prevent the strategy from doing anything after it closes the position, but actually physically stopping it is not supported.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Ok Josh, thank you very much
          Javier

          Comment


            #6
            JavierPB, can you tell me what the Sample PnL strategy does? Can it be used to stop a strategy from making any more trades if a certain draw down occurs or a specific number of consecutive losses occur?
            Are there instructions posted somewhere as to meet these objectives with Sample PnL?
            Thanks,
            BPURTELL

            Comment


              #7
              BPURTELL, this sample would show how to :

              a) prevent further trading if the current session's realized profit exceeds $1000

              or

              b) if realized losses exceed $400.

              and

              c) prevent trading if 10 trades have already been made in this session.

              Those performance counters are being reset at session break and the script uses NinjaScript's Performance class to gather the stats needed.

              The strategy is not disabled, but it will not execute any further trade logic as once the conditions above are fullfilled it would return out of the OnBarUpdate() method for this strategy.

              Hope that helps - have a good weekend,
              BertrandNinjaTrader Customer Service

              Comment


                #8
                Stopping a Strategy in NT7

                Does NT7 support Ending a Strategy?
                I have a simple script that I want to execute once and/or stop and warn me if a parameter is not properly set. "return" in my "OnBarUpdate()" method works but the strategy continues to run. I have a print statement so I assume the Output window will give me the proper warning but is there a more elegant or appropriate way to end the strategy and/or show an error message? Are forms supported?

                Comment


                  #9
                  Hello blach00,

                  Thank you for your post.

                  You would use Disable(): http://www.ninjatrader.com/support/h...t7/disable.htm

                  Forms are unsupported but you can find examples in the file sharing section of the Support Forum: http://www.ninjatrader.com/support/f...splay.php?f=37

                  Comment


                    #10
                    Exit a Strategy

                    Thanks for the help. I missed the Disable() method.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by ZenCortexCLICK, Today, 04:58 AM
                    0 responses
                    2 views
                    0 likes
                    Last Post ZenCortexCLICK  
                    Started by sidlercom80, 10-28-2023, 08:49 AM
                    172 responses
                    2,280 views
                    0 likes
                    Last Post sidlercom80  
                    Started by Irukandji, Yesterday, 02:53 AM
                    2 responses
                    17 views
                    0 likes
                    Last Post Irukandji  
                    Started by adeelshahzad, Today, 03:54 AM
                    0 responses
                    4 views
                    0 likes
                    Last Post adeelshahzad  
                    Started by Barry Milan, Yesterday, 10:35 PM
                    3 responses
                    13 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Working...
                    X