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
Multi-Instrument indicator/strategy question
Collapse
X
-
Multi-Instrument indicator/strategy question
I created a custom indicator that calls a certain instrument for calculations- so I guess it's a multi-instrument or a 2 instrument indicator (BIP0 and BIP1). I want to create a multi-instrument strategy as well (BIP0 and BIP1) that calls this custom indicator for buy/sell action. Is this possible with Ninjatrader? I'm not sure how this would work or what the actual sequence would be. In the main strategy, for each BIP, I would like to call this custom indicator. So is it BIP0 (strategy) => BIP0 (indicator) => BIP1 (indicator) => BIP1 (strategy) => BIP0 (indicator) => BIP1 (indicator) => BIP0 (strategy) and so on?Last edited by ciro1963; 01-11-2019, 03:50 PM.Tags: None
-
Hello ciro1963,
Thank you for the question.
Yes, this is possible in NinjaTrader. A host (strategy) can call a script (indicator) which has other series as well.
To answer your question it would be best to see an example of specifically what happens with your current script's configuration. This would be a very good use case for Print statements to see specifically what the output is. https://ninjatrader.com/support/help...lightsub=print
What I would suggest doing to answer this question would be to create a new strategy and indicator which only have 1 print in OnBarUpdate:
Code:Print("Strategy: " + BarsInProgress + " " + CurrentBar); or for the indicator: Print("Indicator: " + BarsInProgress + " " + CurrentBar);
I look forward to being of further assistance.JesseNinjaTrader Customer Service
- Likes 1
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
3 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
6 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
Comment