Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
initiating a strategy
Collapse
X
-
initiating a strategy
i have a strategy which i launch from the chart..it currently process instruments which i imported over(20 symbols)..if the chart is loaded on an instrument, will the strategy process all the 20 symbols? or does a chart have to be open for each instrument for the strategy to work? I have a strategy with 20 symbols on a daily chart of BAC...one of the symbols is XLI, which i imported over. But when i try to bring up XLI on another chart, it is blank. would it be better to run the strategy from the TAB and not from the CHART? using multiple symbols?Tags: None
-
mystiq, already replied in your other thread on the topic - if you created a multiinstrument strategy and added your 20 symbols in it's code to be loaded, it would maintain the data needed if you just start it on your primary chart -
Please note that those symbols will then not appear on a chart automatically with this procedure, they are just available 'in the back' to run calculations on.
-
thx you again. i was thinking that the strategy was not working because i could not see the chart. so i am thinking of using "min bars required" of 1 ...with 1 day of historical data needed...could this work? and thx for responding to my other posts. next time i will wait before posting again.Originally posted by NinjaTrader_Bertrand View Postmystiq, already replied in your other thread on the topic - if you created a multiinstrument strategy and added your 20 symbols in it's code to be loaded, it would maintain the data needed if you just start it on your primary chart -
Please note that those symbols will then not appear on a chart automatically with this procedure, they are just available 'in the back' to run calculations on.
Comment
-
You're welcome, sounds good - I could not comment on how much your strategy would need historical data wise to initialize properly as needed, so normally you want to load more days than 1 - please note that the MinBarsRequired is not how many days are loaded - this will be set as you create the chart (daysToLoad).
Comment
-
initiating a strategy
Thx for the info NT_Bertrand:Originally posted by NinjaTrader_Bertrand View PostYou're welcome, sounds good - I could not comment on how much your strategy would need historical data wise to initialize properly as needed, so normally you want to load more days than 1 - please note that the MinBarsRequired is not how many days are loaded - this will be set as you create the chart (daysToLoad).
mystiq, already replied in your other thread on the topic - if you created a multiinstrument strategy and added your 20 symbols in it's code to be loaded, it would maintain the data needed if you just start it on your primary chart -
You're welcome - if you add the strategy to your chart it would trigger a data load if needed. As an alternative you could also just open up a standalone chart of the symbol in question to trigger a backfill (if you're connected to a feed supporting this).
mystiq, for this strategy to work you would need to add them in the strategy directly - as you then start it from your primary chart it would load / add the other bars objects as needed -
...if i am running a multi-instrument strategy that alerts on a 30min BAC chart,...which has 20 instruments already coded in strategy, and one instrument is IBM, would the strategy alert me to IBM if conditions are met? or do i have to open another 30min chart just for each instrument?
Comment
-
initiating a strategy
thank you NT_Bertrand , but i still do not understand - "the conditions for the alert have to be coded to use the IBM price series" - i referenced the info above , but cannot understand what it means.Originally posted by NinjaTrader_Bertrand View PostYou would not have to open a chart for each instrument - however the conditions for the alert have to be coded to use the IBM price series -
You can see example code how to start under the 'True Event Driven OnBarUpdate() Method' section.
please explain to a newbie....
edit: the extra instruments are not HARD CODED within strategy, but manually added as a parameter (?soft coded?) will your explaination still apply?
Comment
-
mystiq, the symobls you want to use in your strategy are added with the Add() command in the Initialize(), you can then either access them in the right BarsInProgress context (check with of your bars objects is calling the OnBarUpdate to do calculations) or you can access this instruments data via the BarsArray property, so you can decide which input series your indicator / calculations should use, for example consider an SMA(BarsArray[1], 20) would give you the 20 Period SMA on the first added / the secondary instrument in your strategy.
If you take some time and review our SampleMultiInstrument strategy installed per default with NinjaTrader it should become clearer and clearer how this environment is designed.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
649 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
576 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment