Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting question and/or suggestion

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

    Backtesting question and/or suggestion

    I am looking at a certain set of stocks and how they trade one strategy on one certain day. Each day would be a different set of stocks and the same strategy. One issue I am coming across is if I backtest for just one day, the SMA's I use are "too long" to start functioning correctly. This means I have to start the back testing a number of days ago and then look at the current days results, which can be time consuming with 180 stocks for instance. I know there is the minimum number of bars setting, but I need this to be much longer and "look back" at previous days data even tho not backtesting those days.

    I hope you understand what I am saying and this would be a good setting to implement for me and others perhaps. One suggestion would be "minimum previous bars for backtesting" and have that value be up to many thousands. Even if you only want test results from one certain day, the "charts" would be backfilled for this period of time.

    One issue with the "minimum number of bars" setting is since it doesn't look at the previous days data (and I am actually looking for about 3 months) the strategy cannot "start" correctly right at 9.30a. I am a stock trader only btw.

    Thanks!

    #2
    Not sure I follow.

    If your SMA needs 100 bars to normalize, why would "Min bars required" set to a value of 100 not work?
    RayNinjaTrader Customer Service

    Comment


      #3
      Because I am looking at how this strategy will trade on one date only. For instance COH (and another group of stocks) on 8/18/08. I use a 1 min bar chart and a 7800 period SMA as a trade filter. If I backtest on only this one date, there will not be enough bars to start the strategy since I would need 7800.

      Let me know if I can explain any further. Currently I am using trade ideas to find stocks that fit certain requirements, and I will see this stock(s) only on one certain date. But I need a longer period of time to make my strategy function properly, even tho I only want to run it that one date.

      I hope I expalined that ok, let me know, and thanks NinjaTrader is smoking hot son!

      Comment


        #4
        Yes, that explanation is clear.

        If you need a 7800 period SMA you then need 86.67 trading days of 1 minute historical data in order to normalize this indicator. This means you have to backtest your strategy with a start date (today - 86.67 day). There is no way around this with any desktop backtester that I am aware of.
        RayNinjaTrader Customer Service

        Comment


          #5
          Ok, thanks for your fast response.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          559 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          546 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X