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
Applying an indicator toa symbol or indicator plot in Panel 2
Collapse
X
-
Applying an indicator toa symbol or indicator plot in Panel 2
If I have an indicator that detects swing highs and swing lows on the the symbol on the main chart, is there a way to apply that indicator to detect swing highs/lows on whatever is currently plotted in panel 2 (may be another market symbol or another indicator plot) without specifically adding it as a named data series?Tags: None
-
Hello Scotty33,
An indicator can call another indicator. If you choose to, the logic in the host script can set to use the same parameters as the indicator applied directly to the chart in another panel.
The host indicator would not be reading from the indicator applied to the chart, but would be calling that indicator internally in the code and returning a plot value. (NinjaTrader does do some caching for efficiency if these were to be using the same data and parameters)Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Chelsea,
Thanks for your reply. Do you mean that the indicator that calculates the swing highs/lows should effectively call itself and apply to the symbol/indicator in panel 2 to calculate swing highs/lows there?
Do you have any examples of this approach that would help me to apply it?
Comment
-
Hello Scotty33,
I think you can have a new indicator & then initialize your host indicator twice, use one for each series you wish to. So this new indicator will be calculating for 2 diff series & then you can plot both results. But again you can't plot in separate panels from a single indicator, however you can draw objects in price panel & indicator panel if this is in new panel and if you plan to plot on price panel you can't even draw object in indicator panel. Hope it helps!
Comment
-
Hello Scotty33,
An indicator can call itself with different parameters if necessary.
Or can be coded to have more parameters and use those for calculations.
If the point is to use another data series for calculations it would make sense to add a data series with AddDataSeries() and use that series for calculations in the script.
Unfortunately, scripts are not able to detect other scripts directly added to the chart.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 07:16 AM
|
2 responses
6 views
0 likes
|
Last Post Today, 08:05 AM | ||
Started by ellington, Today, 07:40 AM
|
0 responses
2 views
0 likes
|
Last Post
by ellington
Today, 07:40 AM
|
||
Started by Atticus20, Today, 07:27 AM
|
0 responses
7 views
0 likes
|
Last Post
by Atticus20
Today, 07:27 AM
|
||
Started by linkcou, Today, 07:01 AM
|
0 responses
8 views
0 likes
|
Last Post
by linkcou
Today, 07:01 AM
|
||
Started by brunoviveiros, 02-17-2020, 05:31 AM
|
4 responses
66 views
0 likes
|
Last Post Today, 06:25 AM |
Comment