• 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

Back Test Assistance

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

    Back Test Assistance

    I must admit, it's been quite awhile since I've used the Strategy Analyzer, as I like to use Market Replay to run my strategies on so that I may watch the market unfold. Now however, I would like to use the Strategy Analyzer again to save some time, but I can't seem to get it to show any trades.

    I ran it for yesterday and it showed in the status bar of the control panel that it was running the backtest, but no results. However, when I run the same strategy in Market Replay for yesterday it shows trades. I checked the dates and trading symbol in the backtest settings and they are correct. Could you suggest something else I could check?

    Thanks,

    Safetrading

    #2
    Hello Safetrading,

    Thank you for your note.

    Does your strategy incorporate the use of ATM Strategies to manage the position?

    When you run the Strategy Analyzer is there any item in the Orders tab?
    CameronNinjaTrader Customer Service

    Comment


      #3
      reply

      No transactions appear in the orders tab andf no, I'm not using any ATM strategies in my strategy, although I have my "SetStopLoss" in the OnBarUpdate rather than in the Initialize section.

      Originally posted by NinjaTrader_Cameron View Post
      Hello Safetrading,

      Thank you for your note.

      Does your strategy incorporate the use of ATM Strategies to manage the position?

      When you run the Strategy Analyzer is there any item in the Orders tab?

      Comment


        #4
        Hi SafeTrading,

        The next step here is to debug your strategy, by printing to confirm values and follow code flow. Use TraceOrders output to check for messages related to strategy order submission.

        See here for more info on Debugging your NinjaScript code.

        It may also help to add drawing objects to your chart for signal and condition confirmation - Drawing Objects.
        Ryan MNinjaTrader Customer Service

        Comment


          #5
          reply

          I'm happy to look for my own errors, but as I mentioned previously, the strategy worked in Market Replay for the same day. I was under the assumption that if the strategy worked without errors during Market Replay, that it should also work in the Strategy Analyzer for a back test. Is this assumption incorrect?

          Thanks,

          Safetrading

          Originally posted by NinjaTrader_RyanM View Post
          Hi SafeTrading,

          The next step here is to debug your strategy, by printing to confirm values and follow code flow. Use TraceOrders output to check for messages related to strategy order submission.

          See here for more info on Debugging your NinjaScript code.

          It may also help to add drawing objects to your chart for signal and condition confirmation - Drawing Objects.

          Comment


            #6
            Originally posted by safetrading View Post
            I'm happy to look for my own errors, but as I mentioned previously, the strategy worked in Market Replay for the same day. I was under the assumption that if the strategy worked without errors during Market Replay, that it should also work in the Strategy Analyzer for a back test. Is this assumption incorrect?

            Thanks,

            Safetrading
            What time frames are you using in market replay that produces trades and the analyzer?

            Are you doing anything special in your strategy?

            Comment


              #7
              Originally posted by safetrading View Post
              I'm happy to look for my own errors, but as I mentioned previously, the strategy worked in Market Replay for the same day. I was under the assumption that if the strategy worked without errors during Market Replay, that it should also work in the Strategy Analyzer for a back test. Is this assumption incorrect?

              Thanks,

              Safetrading
              Not necessarily, replay is live data, backtest is historical data.

              Comment


                #8
                Edit Strategy Problem

                Hello,

                I am new and I do apologize if this was already talked about and I missed it.

                I am trying to back test a strategy that will buy 5 ES contract in 2 separate orders (Signal Name: Long3 and Long2).

                The reason is that I would like to get a profit target for 3 of the contracts and let the other 2 continue until other conditions present themselves.

                The Strategy Analyzer does execute the Long3 but not the Long2.
                I have also tried using a different set in the Edit Strategy Console to try and get this scenario to work.
                However either way (Enter Long3 and Long2 in the same set or 2 different sets), only Long3 executes during the backtest and not Long2.

                Is there any known reason for this?

                Thanks in Advance.
                Anthony

                Comment


                  #9
                  Hello Anthony,

                  Thank you for your note.

                  Could you provide a sample of your code for when Long3 and Long2 are supposed to enter the market?
                  CameronNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by richa61416, Today, 01:18 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post richa61416  
                  Started by Robotman, Today, 01:08 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Robotman  
                  Started by StevenNelson, Today, 12:29 PM
                  1 response
                  5 views
                  0 likes
                  Last Post NinjaTrader_Kate  
                  Started by anupsoni, Today, 12:23 PM
                  1 response
                  3 views
                  0 likes
                  Last Post NinjaTrader_Kate  
                  Started by aligator, Yesterday, 12:15 PM
                  8 responses
                  62 views
                  0 likes
                  Last Post NinjaTrader_Heath  
                  Working...
                  X