Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stop doesn`t work through backtesting

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

    Stop doesn`t work through backtesting

    Need assistance. I`ve set up stop and take profit orders. But they do not work during backtesting - orders are being closed on day close. Please advise.

    #2
    Hello vitaleg,

    For checking strategy order submission issues, please view TraceOrders output. Add this line to Initialize method:
    TraceOrders = true;

    Then, view output through Tools > Output window.

    Currently there's not enough information to determine why those orders did not fill. As a start please let us know how they are defined and the series you are backtesting against.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Thanks for response, Ryan. I have attached the screenshot of stoploss initialization in wizard and the output window. I se there only 2 messages, while there are 47 trades. I`m backtesting on stock AA.



      Comment


        #4
        You're submitting your stop loss order at .05 as mode price. This submits a stop loss order at .05.

        If you intened to submit them at .05 from entry price you may need to adjust this to calculation mode ticks and use a value of 5.

        Also, set ExitOnClose = false to prevent closing at the end of the day.
        Last edited by NinjaTrader_RyanM1; 08-16-2010, 02:49 PM.
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Thanks, Ryan. One last question - can I set up the stop value to the previous bar`s High - Low ? I see in the code stop initializes prior to position. Please advise.
          Last edited by vitaleg; 08-16-2010, 02:54 PM.

          Comment


            #6
            You can't perform this type of math in the strategy wizard. You'd have to work with code directly, and then understand that this type of statement couldn't be set in the Initialize method.

            You would have to work closely with this reference sample:


            That will help you set an initial value when flat and then a different value(based off range) when you are in a position.
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by fx.practic, 10-15-2013, 12:53 AM
            5 responses
            5,404 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by Shai Samuel, 07-02-2022, 02:46 PM
            4 responses
            95 views
            0 likes
            Last Post Bidder
            by Bidder
             
            Started by DJ888, Yesterday, 10:57 PM
            0 responses
            8 views
            0 likes
            Last Post DJ888
            by DJ888
             
            Started by MacDad, 02-25-2024, 11:48 PM
            7 responses
            159 views
            0 likes
            Last Post loganjarosz123  
            Started by Belfortbucks, Yesterday, 09:29 PM
            0 responses
            8 views
            0 likes
            Last Post Belfortbucks  
            Working...
            X