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
How to Draw.Text on the left side of the chart?
Collapse
X
-
How to Draw.Text on the left side of the chart?
I have an indicator which draws lines at support/resistance levels. I would like to label these. It is easy to plot text accurately on the right side of the chart, because the location of the current bar is known. I do this in the in first attached image. But I would like to make them appear like the second attached image. That is, always on the far left, no matter how the chart is expanded or compressed. How would I do this not knowing the bar number or bar time of the leftmost bar?Tags: None
-
Hello gbourque,
Thanks for your post.
SharpDX in OnRender() would need to be used to custom render the text on the left side of the chart window to accomplish your overall goal as seen in the screenshot you shared.
You could view the documented SampleCustomRender sample script that comes with NinjaTrader to get a good overview of using SharpDX in OnRender() to custom render objects on a chart. To view the script open a New > NinjaScript Editor window, open the Indicators folder, and double-click on the SampleCustomRender file.
See the help guide documentation below for more information.
Using SharpDX for Custom Chart Rendering: https://ninjatrader.com/support/help..._rendering.htm
OnRender(): https://ninjatrader.com/support/help...8/onrender.htm
RenderTarget.DrawText(): https://ninjatrader.com/support/help...t_drawtext.htmBrandon H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
15 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
14 views
0 likes
|
Last Post Yesterday, 07:51 PM |
Comment