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 Graci117, Today, 09:02 PM
|
1 response
4 views
0 likes
|
Last Post Today, 09:09 PM | ||
Started by ETFVoyageur, Today, 07:55 PM
|
0 responses
7 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:55 PM
|
||
Started by janio973, Today, 07:24 PM
|
1 response
7 views
0 likes
|
Last Post Today, 07:35 PM | ||
Started by aligator, 01-06-2022, 12:14 PM
|
4 responses
246 views
0 likes
|
Last Post
by john_44573
Today, 06:11 PM
|
||
Started by reynoldsn, Today, 05:56 PM
|
0 responses
14 views
0 likes
|
Last Post
by reynoldsn
Today, 05:56 PM
|
Comment