Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy analyzer not executing trades

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

    Strategy analyzer not executing trades

    Hello,

    I am trying to backtest a strategy for a particular instrument (futures). Backtest does not execute trades (after 01/15/2012). I know for a fact that the conditions specified in the strategy were met on 01/22/2012 and 01/23/2012. It does not execute (on 01/23/2012 that is) whether the test dates are between 01/01/2012 and 01/24/2012 or whether the test dates are between 01/22/2012 and 01/24/2012.

    Ideally, I want to run backtest one or two days at a time. Is there anything wrong I maybe doing?

    I tried changing many of the test parameters but it has no effect. Please advise.

    #2
    Welcome to our forums d_vikram86 - are you working with a single or multiseries strategy here in this case?

    To be 100% sure your programmed in conditions triggered as you expected, please add a barcolor change or drawing object to your code to verify.

    It's also helpful to run the strategy with TraceOrders enabled so you could see if you were getting any ignored orders because you ran into the Internal Order Handling Rules, or for example if orders expired if you're working with non market orders.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      I am working with a single series strategy. All my orders are market orders (only long at this instant). How do I add a barcolor change or drawing object? I am plotting my indicator on the strategy (I read a post somewhere in the forums on how to do it), is that what you meant?

      I will experiment with traceorders and get back with what I get.

      Thanks!

      Comment


        #4
        Hello d_vikram86,

        BarColor is available here with a couple examples:


        This reference sample can assist with drawing objects:
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          I enabled traceorders and double checked my conditions. I am yet to draw objects or use bar colors, but the following is happening:

          If i use market replay connection to replay the data downloaded (01/23//2012) and run my strategy the orders are getting executed. On the other hand if I use the same strategy to backtest the same security no orders are getting executed and there are full "zeros" in the summary screen. What could be the problem?

          Comment


            #6
            Do you have historical data available? Check the chart tab after running the test to verify. Would the SampleMaCrossOver provide some results?

            It also sounds like you may be trying a backtest on only a couple days of data at a time. You may want to adjust MinimumBarRequired to a lower value, or increase the date range.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              I found the problem. I was not connected to "zenfire". I assumed the strategy analyzer automatically connects and gets the data as needed. I was missing the required data.

              I was able to think about it because you asked me if I had historical data available. Thanks for that!

              Comment


                #8
                Glad you were able to get that sorted out. Thanks for updating us here.
                Ryan M.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by judysamnt7, 03-13-2023, 09:11 AM
                4 responses
                59 views
                0 likes
                Last Post DynamicTest  
                Started by ScottWalsh, Today, 06:52 PM
                4 responses
                36 views
                0 likes
                Last Post ScottWalsh  
                Started by olisav57, Today, 07:39 PM
                0 responses
                7 views
                0 likes
                Last Post olisav57  
                Started by trilliantrader, Today, 03:01 PM
                2 responses
                21 views
                0 likes
                Last Post helpwanted  
                Started by cre8able, Today, 07:24 PM
                0 responses
                10 views
                0 likes
                Last Post cre8able  
                Working...
                X