Well, when i add a 5-minute bars object to the strategy i use the sentence 'Add(Instrument, PeriodType.Minute, 5);' in the Initialize method. If I do this and I try to charge the strategy it don't work. From now the Onbarupdate method is not called. Can someone help me?. Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Problem with Add() in a strategy
Collapse
X
-
Problem with Add() in a strategy
Hello. Im developping a strategy and this work well. But as I use a 10-minute graph i want to work in the strategy with another dataseries of 5-minute too.
Well, when i add a 5-minute bars object to the strategy i use the sentence 'Add(Instrument, PeriodType.Minute, 5);' in the Initialize method. If I do this and I try to charge the strategy it don't work. From now the Onbarupdate method is not called. Can someone help me?. Thanks. -
Hello Alibanez,
Welcome to the NinjaTrader forums!
Add used like this will add a secondary series. The primary series is always what you are running the strategy against. You can see a sample multiTimeFrame strategy by opening Tools > Edit NinjaScript > Strategy > Sample Multi TimeFrame.
Documentation for this is available here.
Review the sample and the link above. If you continue to have issues, please share the code you're using and a brief explanation of what you expect it to do.Ryan M.NinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
61 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
148 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
98 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment