Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Back Testing questions

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

    Back Testing questions

    Hi all,


    I have a few questions about backtesting with Ninja.

    First I would like to know how to backtest an intraday strategy. I have a strategy applied to the 1 minute chart but my entries and stops must be managed in ticks terms because I am taking very short term profits ( 3 ticks on the ES ) and stops are very tight. An entry and a stop could happen on the same bar so the underneath tick movement inside a 1 minute bar is essential to know if we want to replicate realistically this strategy as it would have happen in real time.

    What do I need to set up in Ninja to replicate this simulation ?

    Thks

    Bernard

    #2
    Bernard, for this please check out how to add a the tick timeframe granularity to your 1 min chart - http://www.ninjatrader-support2.com/...ead.php?t=6652

    Comment


      #3
      System crash

      Bertrand,

      I tried that but got a system crash !

      I added in the initialization method :

      Add(PeriodType.Tick,1);

      On Stops management code I made sure I used the Tick data :

      if(BarsInProgress == 1)





      Bernard

      Comment


        #4
        I guess you added too much tick data so you ran out of memory, please try using a smaller 'daysBack' setting when loading up the strategy on the chart.

        Comment


          #5
          I'll try that




          Thanks

          Comment


            #6
            System crash

            By the way I am just woudering if what I do is right.

            It's been now a few times that my system crashed and when I reopen Ninja I can't get it right because it tries to reopen the workspace I was working on before the crash happened. The only way I could have access to Ninja again is to delete the XML default workspace file.

            Am I doing the right thing or is there a better way to do it ?


            Bernard

            Comment


              #7
              Bernard,

              A 1-tick series is extremely resource intensive. If you are loading many days of 1 tick for a heavily traded instrument you could easily run out of memory causing the issues you experience. NT7 will improve memory management and have other improvements to allow you to pull up more data, but the fact that 1-tick is still resource intensive remains.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Josh

                I know it depends on your computer but on an average computer how many periods of ticks data would you consider acceptable.

                When I had my crash I was looking at three months of ticks data





                Thks


                Bernard

                Comment


                  #9
                  Bernard, I would start with 2-3 weeks using for example 50 tick data (should be granular enough to 'look inside' the min bars for executing trades to).

                  Comment


                    #10
                    Bertrand


                    What do you mean by 50 Tick data




                    Bernard

                    Comment


                      #11
                      Bertrand

                      Do you mean


                      Add(PeriodType.Tick,50);


                      which would mean that I would have each 50 ticks inside the bar ?

                      I am a bit confuse


                      Bernard

                      Comment


                        #12
                        Yes Bernard, this is exactly what I meant, a 50 tick chart. If you limit your backtesting to 2-3 weeks of tickdata you should be good.

                        Comment


                          #13
                          OK Thanks Bertrand

                          I will do that tonight though because I do not want to have a crash while I am trading.




                          I'll come back with the results tonight or tomorrow


                          Thks again

                          Bernard

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                          0 responses
                          649 views
                          0 likes
                          Last Post Geovanny Suaza  
                          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                          0 responses
                          370 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by Mindset, 02-09-2026, 11:44 AM
                          0 responses
                          109 views
                          0 likes
                          Last Post Mindset
                          by Mindset
                           
                          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                          0 responses
                          574 views
                          1 like
                          Last Post Geovanny Suaza  
                          Started by RFrosty, 01-28-2026, 06:49 PM
                          0 responses
                          576 views
                          1 like
                          Last Post RFrosty
                          by RFrosty
                           
                          Working...
                          X