Anyone found a way around this issue?
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!
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
NinjaTrader
60 minute vs hour MultiTimeframe data with IB
Collapse
X
-
60 minute vs hour MultiTimeframe data with IB
I have found out that when using multitimeframe strategies, I cannot use PeriodType.Minute greater than 59 with Interactive Brokers. It seems IB doesn't provide minute data from 60 and higher. In fact you would have to use hourly data.
Anyone found a way around this issue?Tags: None
-
That's the strange thing. I'm able to create regular charts using any interval I want (65, 93 / 128 etc etc).
Here is the code I tested with:
Code:protected override void Initialize() { CalculateOnBarClose = true; // Index = 0 (1 minute) Add(PeriodType.Minute, 5); // Index = 1 Add(PeriodType.Minute, 15); // Index = 2 } protected override void OnBarUpdate() { Print("So far so good"); }
Code:protected override void Initialize() { CalculateOnBarClose = true; // Index = 0 (1 minute) Add(PeriodType.Minute, 5); // Index = 1 Add(PeriodType.Minute, 60); // Index = 2 } protected override void OnBarUpdate() { Print("So far so good"); }
Comment
-
Looks fine on my end, I tried with this setup also printing the BarsInProgress alongside, to see which bars object is calling the OnBarUpdate.
protected override void Initialize()
{
CalculateOnBarClose = true;
// Index = 0 (1 minute)
Add(PeriodType.Minute, 5); // Index = 1
Add(PeriodType.Minute, 60); // Index = 2
Add(PeriodType.Minute, 240); // Index = 3
}
protected override void OnBarUpdate()
{
Print(BarsInProgress + " So far so good");
}
Do you run on latest NT7R21 and IB TWS 938.1?
BertrandNinjaTrader Customer Service
Comment
-
No, I always download directly from the Interactive Brokers website so I am sure the software is original. So I downloaded version 943.1c.I will download the combo as you stated later on a separate machine. Will keep you posted. But problem does seem strange right?
Comment
-
But I know that IB provides data in set intervals of seconds and then minutes of 1,2,3,5,10,15,20,30 and then hourly intervals and then daily and weekly.
So maybe the 55 minute interval is made up of 30+20+5 .. And 60 minute cannot be created because it expects an hourly?
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by sofortune, Today, 10:28 AM
|
1 response
3 views
0 likes
|
Last Post Today, 10:54 AM | ||
Started by marcus2300, Today, 10:21 AM
|
2 responses
2 views
0 likes
|
Last Post Today, 10:49 AM | ||
Started by proptradingshop, Today, 10:07 AM
|
3 responses
5 views
0 likes
|
Last Post Today, 10:49 AM | ||
Started by DT215, 01-14-2023, 07:59 PM
|
3 responses
126 views
1 like
|
Last Post Today, 10:47 AM | ||
Started by DawnTreader, 05-08-2024, 05:58 PM
|
10 responses
39 views
0 likes
|
Last Post
by DawnTreader
Today, 10:10 AM
|
Comment