Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
    BertrandNinjaTrader Customer Service

    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.
        BertrandNinjaTrader Customer Service

        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).
                  BertrandNinjaTrader Customer Service

                  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.
                        BertrandNinjaTrader Customer Service

                        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 kevinenergy, Yesterday, 12:01 PM
                          6 responses
                          22 views
                          0 likes
                          Last Post kevinenergy  
                          Started by DawnTreader, 05-08-2024, 05:58 PM
                          15 responses
                          48 views
                          0 likes
                          Last Post NinjaTrader_Gaby  
                          Started by ZeroKuhl, Yesterday, 04:31 PM
                          7 responses
                          40 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by xepher101, Today, 12:19 PM
                          1 response
                          22 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Started by jpeep, 08-16-2020, 08:31 AM
                          16 responses
                          498 views
                          0 likes
                          Last Post NinjaTrader_ChelseaB  
                          Working...
                          X