![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
|
Hello,
I was wondering if it is technically possible to get values from an indicator currently loaded on a chart to pass them on onto another indicator loaded on the same chart. My programming skills are pretty basic, but I have normally managed to complete any tasks required to achieve a goal, although probably not in the most efficient way. ![]() At the moment what I do is to code indicators within another indicator, which means that the list of parameters I used in the indicator containing other indicators gets longer and longer, and when I change the parameters in the first indicator (used as input in the second one) then I have to also change the parameters in the second indicator, a process which gets tedious and subject to human error. I have been reading a bit about User Defined Methods, and was wondering if a solution to this problem could be found there. Please advice if that is the route I should explore (any other hints welcome!) Thanks, Stopped
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,413
Thanks: 252
Thanked 976 times in 959 posts
|
Hi Stopped, sorry not following what you would like to do - if you need indicator values from another indicator you can just call the indicator method in the script, there would be no need / way to directly access an explicit indicator loaded on a chart.
Have a good Sunday,
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Senior Member
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
|
Hi Bertrand,
Thanks for your quick reply on a weekend! I did not explain myself correctly. Let's try again using a very simple example:
Thanks in advance, Stopped
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,413
Thanks: 252
Thanked 976 times in 959 posts
|
Thanks for the clarification, this would only work if you coded one complete indicator doing the different plots based on your custom criteria, you could then define user defined inputs for the indicator that could be used in various method calls in the code so all would as just per your inputs as desired.
http://www.ninjatrader.com/support/f...ead.php?t=5782
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#5 |
|
Senior Member
Join Date: Jun 2010
Location: London, U.K.
Posts: 174
Thanks: 29
Thanked 1 time in 1 post
|
Hi Bertrand,
Thanks for that suggestion. Can I use a combined indicator to plot graphs in separate panels? Or would I need to create more than one indicator in that case? Cheers, Stopped
|
|
|
|
|
|
#6 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,413
Thanks: 252
Thanked 976 times in 959 posts
|
You're welcome - you would need an indicator per panel then, as you could not draw to specific panels via the code.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| prevent indicator to be saved/loaded in chart template | DH008 | Indicator Development | 1 | 02-18-2011 10:36 AM |
| Indicator: Getting indicator values from a specified time | NinjaTrader_Josh | Reference Samples | 0 | 07-29-2009 10:46 AM |
| executing code after indicator has been loaded? | NinjaCustomer | Indicator Development | 1 | 02-05-2009 09:59 PM |
| Using indicator values | traderT | Strategy Development | 12 | 01-09-2009 02:15 PM |
| Indicator: Exposing indicator values that are not plots | NinjaTrader_Josh | Reference Samples | 0 | 01-15-2008 02:27 AM |