Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Indicator calling another Indicator
Collapse
X
-
thebean, how are you constructing this TRIN indicator? I would recommend making a named plot for the TRIN indicator instead of just using Value, and then you should be able to read it from another indicator no problem. This link can help get you started - http://www.ninjatrader-support2.com/...ead.php?t=4991.AustinNinjaTrader Customer Service
-
Hi NinjaTrader_Austin, thanks for the suggestion. I saw that tip before and tried to incorporate it somehow into the indicator with little success.
Right now I am adding a data series for each of the data points that are needed to calculate the TRIN value. For example:
Add(advanceIndex, periodtype, periodInterval);
Then in OnBarUpdate() I have the following 2 lines:
Value.Set(trinValue);
TRINLine.Set(trinValue);
The indicator appears to be drawing itself properly. What I am noticing now is that the SMA indicator doesn't draw properly unless I also include the underlying data series as part of the chart as well. Is there a way to fix that?
Comment
-
thebean, in the series you are calling, you need to add Update() - please see here for the help guide reference for Update() - http://www.ninjatrader.com/support/h...nt7/update.htm.AustinNinjaTrader Customer Service
Comment
-
I figured out what the problem was. The TRIN indicator was downloading data but using the default Session setting for each of the data series that I added. The problem was that a couple of the instruments were using 'US Equities RTH' instead of 'Default 24/X' as their sessions. Changing the default values for those instruments worked!
Just for future reference, if I wanted to override the session programmatically, could I? Thanks for the suggestions!
Comment
-
I'm a bit confused about referencing exposed variables...
I"m not understanding something about your "sampleboolseries."
Here's what I want to do, using your example, if I put the SampleBoolSeries on 2 charts, one is on ADD index the other on TICK index. Now I want to access the current value of your bool Series in another code that says:
If the sampleboolseries.bullindication of TICK and sampleboolseries.bullindication of ADD are both true then if the MACD of this chart say of IBM is also bullish then give me an up arrow on the on the current chart, in this case IBM.
The part that I can't seem to get is how do I reference your SampleBoolSeries and differrentiate it for TICK and ADD.
I can certainly Add the TICK dataseries and ADD date series and then use that to calculate MACD within my code for each dataseries but I already have that calculating on the 2 charts and I want to reference the values there so that I don't have to have it recalculated within this new code, or in this case the bull and bear indication already being calculated on the TICK and ADD
I guess simply put what is the syntax for accessing and differenctiating the SampleBoolSeries being used for TICK then again for ADD indices?
That is:
What do I have to add to:
"SampleBoolSeries().Bullindication" to point to one that's being calculated for TICK and then the one for ADD?
.
Comment
-
How are you using the ADD method? ADD typically is used in strategies to add a indicator to a chart, rather than have it used for other calculations. You can reference the indicator just by calling it like a function and referring to the correct dataseries.Originally posted by Benske View PostI"m not understanding something about your "sampleboolseries."
Here's what I want to do, using your example, if I put the SampleBoolSeries on 2 charts, one is on ADD index the other on TICK index. Now I want to access the current value of your bool Series in another code that says:
If the sampleboolseries.bullindication of TICK and sampleboolseries.bullindication of ADD are both true then if the MACD of this chart say of IBM is also bullish then give me an up arrow on the on the current chart, in this case IBM.
The part that I can't seem to get is how do I reference your SampleBoolSeries and differrentiate it for TICK and ADD.
I can certainly Add the TICK dataseries and ADD date series and then use that to calculate MACD within my code for each dataseries but I already have that calculating on the 2 charts and I want to reference the values there so that I don't have to have it recalculated within this new code, or in this case the bull and bear indication already being calculated on the TICK and ADD
I guess simply put what is the syntax for accessing and differenctiating the SampleBoolSeries being used for TICK then again for ADD indices?
That is:
What do I have to add to:
"SampleBoolSeries().Bullindication" to point to one that's being calculated for TICK and then the one for ADD?
.
When you refer to TICK, are you referring to the fact that you have a indicator or strategy that adds a tick-based data series?Last edited by NinjaTrader_AdamP; 03-05-2012, 02:11 PM.Adam P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
579 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
334 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 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
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
551 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment