![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Aug 2007
Posts: 11
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I am working on an indicator that plots the low of the day, if that day’s low is lower than the previous day’s low. Specifically, a day’s low is added to a DataSeries if the day makes a lower low. If the day doesn’t make a new low, the DataSeries stores a null value using the .Reset() method. The problem I am experiencing is that the .Reset() method doesn’t seem to be setting a null value. When the indicator is added to a chart, the instances where a null value is expected are plotted on the chart as the day’s Close Value. I have checked my code and cannot see a reason why it is plotting the Close. The indicator is attached. For the sake of clarification, I have also attached and a .png showing the indicator as it currently plots and also showing how I would like it to plot. Is there anyway to achieve the desired indicator plot (as shown in the .png). Many thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
Hi ninja.man, please check this link - http://www.ninjatrader-support.com/H...iesObject.html
The Reset() method will differentiate between 'visualization' and 'plotting', meaning the null value will be stored internally for calculations, but is not used in plotting as this may not be visually appealing.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Aug 2007
Posts: 11
Thanks: 0
Thanked 0 times in 0 posts
|
Hello Bertrand,
I looked through that page in the hope of finding a solution before I posted on the forum, and modeled my code specifically on what that page contains--still I am getting a plot at the close of the day, rather than a null value. Perhaps if you have the time you can take a minute to review the code in the indicator I posted. It is very simple and should take just a moment to see where the error is. I myself have triple checked it, but as I am not a programmer, I do not see where I am making the mistake!
|
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,569
Thanks: 262
Thanked 1,018 times in 999 posts
|
There is no mistake, the difference is just the null value is stored internally and not used for actual plotting of the indicator.
You may want to check this reference sample for an idea how to connect Plots with the DataSeries object - http://www.ninjatrader-support2.com/...ead.php?t=3227
Bertrand
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Multi instrument strategies and Close[1] values | Operandi | Strategy Development | 1 | 09-17-2008 03:46 AM |
| Can indicators return values other than Plot values? | higler | General Programming | 2 | 04-29-2008 05:17 AM |
| Indicator: Exposing indicator values that are not plots | NinjaTrader_Josh | Reference Samples | 0 | 01-15-2008 02:27 AM |
| Reset values in a DataSeries | Rollins | Indicator Development | 2 | 12-09-2007 01:05 AM |
| Where do I enter "close at time" values? | dberliner | SuperDOM and other Order Entry Windows | 1 | 11-02-2006 06:39 AM |