How do I access the time frame for a given chart from NinjaScript?
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
referencing data on a different chart
Collapse
X
-
referencing data on a different chart
Is it possible to reference the results of an indicator on a different chart? If so, how?
How do I access the time frame for a given chart from NinjaScript?Last edited by saroj; 08-30-2009, 06:19 PM. Reason: incorrect observation... both the CL 4R and CL 12R are displayedTags: None
-
saroj,
Unfortunately an indicator only knows what is happening on the current chart it resides in.
To access timeframe of the chart it is currently on you can use this: http://www.ninjatrader-support.com/H...V6/Period.htmlJosh P.NinjaTrader Customer Service
-
How to store data in a way that it can be shared across charts like a global variable
Originally posted by NinjaTrader_Josh View Postsaroj,
Unfortunately an indicator only knows what is happening on the current chart it resides in.
To access timeframe of the chart it is currently on you can use this: http://www.ninjatrader-support.com/H...V6/Period.html
... so in NT 6.5 there is no way to create a global variable? I want to use the 12R chart to set direction/trend, but use a 4R chart to trigger entries in that direction. Any way to accomplish this?
If no, will this change in NT7?
Comment
-
Originally posted by saroj View Post... so in NT 6.5 there is no way to create a global variable?
That thread adds detail to Exposing indicator values that are not plots, which is the most applicable sample for your situation.AustinNinjaTrader Customer Service
Comment
-
Will Global Variables be available in NT7
Originally posted by NinjaTrader_Austin View PostNot exactly a "global variable", but this thread describes how to share values between indicators/strategies.
That thread adds detail to Exposing indicator values that are not plots, which is the most applicable sample for your situation.
I'm new to both NinjaScript and C# and OOP so excuse me if it is there in that thread and I simply don't see it or understand it.
still wondering about NT7 in this regard.
Comment
-
Only way you can share this information is to build it directly into a multi-time frame strategy to begin with. http://www.ninjatrader-support.com/H...ameInstrumentsJosh P.NinjaTrader Customer Service
Comment
-
What capability will exist in NT7 for cross-chart reference?
Originally posted by NinjaTrader_Josh View PostOnly way you can share this information is to build it directly into a multi-time frame strategy to begin with. http://www.ninjatrader-support.com/H...ameInstruments
Comment
-
Originally posted by saroj View PostI want to know what is happening on a 12R chart (giving trend and direction) from an indicator / strategy in a 4R chart (fine tuning entries).
One indicator is applied to the 12R chart and this indicator could expose any variable inside the indicator.
The second indicator/strategy on the second chart (4R) would read the exposed variables from the first indicator and could then use those exposed values in it's own calculations.
The links I gave you earlier contain code that demonstrates this idea.AustinNinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Austin View PostThe only way to share information between charts is to create two different indicators for each chart. It isn't possible without an indicator/strategy on each chart. OK... I'M WITH YOU SO FAR
One indicator is applied to the 12R chart and this indicator could expose any variable inside the indicator.
The second indicator/strategy on the second chart (4R) would read the exposed variables from the first indicator and could then use those exposed values in it's own calculations.
OK... MAKES SENSE... SO AS LONG AS THEY ARE NAMED DIFFERENTLY, THEY COULD PERFORM THE SAME FUNCTION AND THE 4R CHART COULD READ THE "EXPOSED" VALUE GENERATED FROM THE 12R CHART...
The links I gave you earlier contain code that demonstrates this idea.
NOW I'M LEFT WITH TRYING TO PUT THESE TWO OPPOSITE RESPONSES TOGETHER
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by andrewtrades, Today, 04:57 PM
|
1 response
8 views
0 likes
|
Last Post Today, 05:02 PM | ||
Started by chbruno, Today, 04:10 PM
|
0 responses
6 views
0 likes
|
Last Post
by chbruno
Today, 04:10 PM
|
||
Started by josh18955, 03-25-2023, 11:16 AM
|
6 responses
436 views
0 likes
|
Last Post
by Delerium
Today, 03:42 PM
|
||
Started by FAQtrader, Today, 03:35 PM
|
0 responses
7 views
0 likes
|
Last Post
by FAQtrader
Today, 03:35 PM
|
||
Started by rocketman7, Today, 09:41 AM
|
5 responses
19 views
0 likes
|
Last Post Today, 03:33 PM |
Comment