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.VerticalLine on 10th bar to the right (updates every bar)
Collapse
X
-
Draw.VerticalLine on 10th bar to the right (updates every bar)
Hello, Can you help me with a code that draws vertical line on the 10th bar to the right (barsAgo = 9), and updates every bar, that means, that on each OnBarUpdate, previous vertical line is deleted and new line is drawn.Tags: None
-
Hello UltraNix,
Thanks for your post.
You could use Draw.VerticalLine() to draw a vertical line on the chart at a specified bar.
See the sample code in the help guide documentation linked below which demonstrates drawing a vertical line using a barsAgo value of 10.
Draw.VerticalLine(): https://ninjatrader.com/support/help...rticalline.htm
If you would like to use a barsAgo value of 9, you would simply set that for your barsAgo argument when calling the Draw.VerticalLine() method.
Let us know if we may assist further.Brandon H.NinjaTrader Customer Service
-
Hello UltraNIX,
Thanks for your note.
You could use SetZOrder() to determine the index in which chart objects are drawn on the chart's Z-axis (front to back ordering). Objects with a higher ZOrder are drawn first.
See the attached example script demonstrating this.
And, see this help guide page for more information about SetZOrder(): https://ninjatrader.com/support/help.../setzorder.htm
Let us know if we may assist further.Attached FilesBrandon H.NinjaTrader Customer Service
- Likes 1
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by knowmad, Today, 03:52 AM
|
0 responses
17 views
0 likes
|
Last Post
by knowmad
Today, 03:52 AM
|
||
Started by tradingnasdaqprueba, Today, 03:42 AM
|
0 responses
12 views
0 likes
|
Last Post Today, 03:42 AM | ||
Started by Haiasi, 04-25-2024, 06:53 PM
|
4 responses
63 views
0 likes
|
Last Post
by effraenk
Today, 02:15 AM
|
||
Started by ccbiasi, 11-23-2017, 06:06 AM
|
5 responses
2,213 views
0 likes
|
Last Post
by leodavis
Today, 02:11 AM
|
||
Started by kujista, Yesterday, 12:39 AM
|
2 responses
14 views
0 likes
|
Last Post
by kujista
Today, 02:02 AM
|
Comment