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
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
-
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 FrazMann, Today, 11:21 AM
|
0 responses
3 views
0 likes
|
Last Post
by FrazMann
Today, 11:21 AM
|
||
Started by geddyisodin, Yesterday, 05:20 AM
|
8 responses
52 views
0 likes
|
Last Post Today, 10:45 AM | ||
Started by cmtjoancolmenero, Yesterday, 03:58 PM
|
10 responses
36 views
0 likes
|
Last Post Today, 11:10 AM | ||
Started by DayTradingDEMON, Today, 09:28 AM
|
4 responses
24 views
0 likes
|
Last Post Today, 10:47 AM | ||
Started by George21, Today, 10:07 AM
|
1 response
19 views
0 likes
|
Last Post Today, 10:43 AM |
Comment