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?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtest strategy on different currencies with different time frames
Collapse
X
-
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?Tags: None
-
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.
-
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
-
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:
You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by
Further information can be found in the documentation on creating NinjaScripts for Multi-Time Frame & Instruments:
If you have any further questions, please don't hesitate to ask.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
56 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
133 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
73 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
45 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|
Comment