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
Draw ray or line with price marker.
Collapse
X
-
Draw ray or line with price marker.
I would like to draw a horizontal ray or a line at a specific price value and also have a price marker displayed. I want to move this around to different values periodically (I only want one line displayed at a time, not multiple instances). It might even be nice to hide it at times. I can draw rays and horizontal lines using the draw commands but I can't figure out how to get a price marker displayed with them. Or maybe I can create and indicator with an Oscillator Line, but I don't know how to move it around and I only want the current value plotted, not multiple instances of the oscillator line (if that's the way to go). Any suggestions? Thanks.Tags: None
-
I did try the Line/Lines concept. I can move it around fine, but there is no price marker associated with the line. So, for that purpose the draw methods work just as well for me. For what I am trying to accomplish visually, it would really help me to have price markers associated with with my lines. So, in NT what are the objects that have price markers associated with them? If I am forced to use plots to have price markers then I will but then I have a new question:
How do I draw a plot across a specified bar interval, say from 20 bars back to the current bar? When I draw the next iteration of the plot over a new bar interval then I want the old one to disappear. I only want the plot over the current interval. Thanks.
Comment
-
Josh
Thank you. How do I determine if there is a value in Plot0[5], for example. For instance, say that I have only saved values for certain bars of Plot0. How can I test to see if there is a valid value saved for a particular bar. What does NT store for those bars where I have set no value?
Comment
-
Checking for Valid Values
It is possible that you may use a DataSeries object but decide not to set a value for a specific bar. Internally, a dummy value does exist however, if you wanted to check to see if it was a valid value that you set, you can check the following method.
DataSeries.ContainsValue(int barsAgo)
Returns a true or false value.RayNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by brunoviveiros, 02-17-2020, 05:31 AM
|
4 responses
63 views
0 likes
|
Last Post Today, 06:25 AM | ||
Started by volIQ, 03-27-2024, 04:28 PM
|
3 responses
21 views
0 likes
|
Last Post
by RJay
Today, 05:41 AM
|
||
Started by Nickgiaco, 02-26-2024, 10:23 AM
|
2 responses
72 views
0 likes
|
Last Post Today, 05:12 AM | ||
Started by Johndc, Today, 04:39 AM
|
0 responses
8 views
0 likes
|
Last Post
by Johndc
Today, 04:39 AM
|
||
Started by johntraderuser2, Today, 02:34 AM
|
0 responses
11 views
0 likes
|
Last Post Today, 02:34 AM |
Comment