Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest strategy on different currencies with different time frames

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

    Backtest strategy on different currencies with different time frames

    1. If I want to backtest my strategy with major forex pairs with 1 min, 5min, 15 min, 1 hour, 4 hour charts, and shows the results respectively for different currencies and different time frames, what should I do?

    2. For 1, if I want to see the profit and loss for each month from start time to end time, how to achieve that?

    #2
    Hello jack1234,

    Thanks for writing in.

    You could run multiple instances of your strategy within the Strategy Analyzer to create performance reports for your strategy using those parameters.

    Additionally, you can use an optimization backtest to automatically iterate through all instances that you wish to test. You would not be able to specify a different data series for optimization iterations, so you can either run those optimization beck tests separately, or you can add parameters that will only allow the strategy to perform within a certain period.

    For example, you could specify a starting month as a parameter and have that starting month iterate for each optimization iteration.

    For more information on running an optimization backtest, please refer to the help guide documentation here: https://ninjatrader.com/support/help...a_strategy.htm

    Please let me know if you have any additional questions.
    JimNinjaTrader Customer Service

    Comment


      #3
      Thanks, for different currency pairs, we can use https://ninjatrader.com/support/help...asket_test.htm, but for different timeframes, what could we do specifically so that we can test all the time frames in one go?

      Comment


        #4
        Hello jack1234,

        Any behaviors that you would like to be iterated through an optimization back test will need to be controlled by parameters so they can be modified by the optimizer.

        To be able to test multiple data series in an optimization backtest, you will have to statically add the data series' to your strategy and add parameters that determine what data series you would like to trade with.

        Each data series added with AddDataSeries() will be referenced in by a 1, 2 or 3 for BarsInProgress and BarsArray for each data series added.

        We have sample code that demonstrates how to use an additional data series here:

        http://ninjatrader.com/support/forum...ead.php?t=6652

        Further information can be found in the documentation on creating NinjaScripts for Multi-Time Frame & Instruments:

        http://ninjatrader.com/support/helpG...nstruments.htm

        If you have any further questions, please don't hesitate to ask.
        JimNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by WeyldFalcon, Today, 02:07 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_ThomasC  
        Started by hfwiley, Today, 03:02 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Melissa  
        Started by pdennis, Today, 02:34 PM
        2 responses
        14 views
        0 likes
        Last Post pdennis
        by pdennis
         
        Started by tonynt, Today, 01:47 PM
        3 responses
        17 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by WesFoster, Today, 12:39 PM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Dennis  
        Working...
        X