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
Retrieving price data when indicator input series is another indicator
Collapse
X
-
Retrieving price data when indicator input series is another indicator
When an indicator's input series is another indicator, I notice that Open, Close, High and Low return values from the input series (meaning from that other indicator) rather than returning price data. But indicator-on-indicator will eventually lead to a price data series (even if it's a sequence of more than two indicators). Is there a way – hopefully easy – to get at that price data series?Tags: None
-
Does the Help topic "Tutorials | Indicators | Beginner - Indicator on Indicator" answer your question?
--EV
-
No. That example implements indicator-on-indicator by embedding the target indicator within the code of the calling indicator. I'm looking at writing an indicator where the target indicator will be selected at run time using the Input Series parameter in the Indicators window. But then I still want to be able to get at the chart's price data.
Comment
-
But Add() has to go in Initialize(), right? And it doesn't allow variables, right? So how do I say, "If this is a 5-minute ES chart, add ES 5-minute price data. But if this is a 1-minute ES chart, add ES 1-minute data"?
The general question would be, How do I determine and then add the price data at the end of the indicator-on-indicator chain?
Comment
-
I guess that works, but it's certainly not an elegant solution! Every indicator eventually leads to price data, right? (The indicator runs against price data. Or the indicator runs against an indicator that runs against price data. Or the indicator runs against an indicator that runs against an indicator that runs against price data. And so on.) It sure seems that it should be possible to get to that price data without needing outside input.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
4 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
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
40 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
18 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
15 views
0 likes
|
Last Post Today, 02:56 PM |
Comment