How can I solve this problem? Is there any way to check if instrument was traded during the whole range I need before using Add(instrument)?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtesting multiinstrument strategy wrong date range
Collapse
X
-
Backtesting multiinstrument strategy wrong date range
I'm backtesting multiinstrument strategy on a date range(for example 01.01.2011 - 12.01.2011). If there is a symbol in a list which is traded only part of that range (since 06.01.2011) all strategy executing only on the range of this instrument(since 06.01.2011).
How can I solve this problem? Is there any way to check if instrument was traded during the whole range I need before using Add(instrument)?Tags: None
-
I think I can use your code in OnBarUpdate(). And I need to use it in Initialize() before Add(). Should be smth like this:
protected override void Initialize()
{
if(EnoughData on Symbol)
{
Add(Symbol, PeriodType.Minute, 1);
}
}Last edited by nysetrader; 03-20-2012, 10:37 AM.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Tim-c, Today, 02:10 PM
|
1 response
7 views
0 likes
|
Last Post Today, 02:52 PM | ||
Started by Taddypole, Today, 02:47 PM
|
0 responses
2 views
0 likes
|
Last Post
by Taddypole
Today, 02:47 PM
|
||
Started by chbruno, 04-24-2024, 04:10 PM
|
4 responses
50 views
0 likes
|
Last Post
by chbruno
Today, 02:38 PM
|
||
Started by TraderG23, 12-08-2023, 07:56 AM
|
10 responses
399 views
1 like
|
Last Post
by beobast
Today, 02:35 PM
|
||
Started by lorem, Yesterday, 09:18 AM
|
5 responses
25 views
0 likes
|
Last Post Today, 12:29 PM |
Comment