![]() |
|
|||||||
| Indicator Development Support for the development of custom indicators using NinjaScript. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Certified NinjaScript Consultant
|
I am trying to plot a line whereby I set a "valid" value onthe currentbar, then the next three bars, for example, are "invalid" so I do not setvalues to the plot. Thefifth bar is "valid" so I set a value to the plot again. I am finding that the line plot style does not connect theset plot values across the invalid value bars as I would expect it to given how otherplatforms work. Do I correctly understand the line plot functionality in this context? Is there a possible workaround? I am using Version 6.
Regards, Whitmark |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
The problem is that NT only connects valid data points. As there in an invalid plot no line (segment) would be drawn.
a) bar 100 valid, bar 101 invalid, bar 102 valid, bar 103 invalid -> no line segment drawn b) bar 100 valid, bar 101 valid, bar 102 invalid, bar 103 valid, bar 104 valid -> segments 100-101 and 103-104 drawn If we changed the logic then there would be no way to render a line with gaps (which is desired behaviour).
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 | |
|
Certified NinjaScript Consultant
|
Dierk Droth wrote:
Quote:
Regards, Whitmark |
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Hmm not entirely sure what your are looking for, but how about this: You use the DrawLine method in your NinjaScript to draw a line (or a few lines). You should limit the # of lines to a few (if possible), since managing thousands of custom painted lines for sure would have undesirable impact on performance.
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Certified NinjaScript Consultant
|
Thanks Dierk, you make a great point. I'll need to rethink the necessity of that requirement.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|