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 rbeckmann05, Today, 06:48 PM
|
0 responses
4 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
||
Started by rhyminkevin, Today, 04:58 PM
|
4 responses
52 views
0 likes
|
Last Post
by dp8282
Today, 06:13 PM
|
||
Started by iceman2018, Today, 05:07 PM
|
0 responses
5 views
0 likes
|
Last Post
by iceman2018
Today, 05:07 PM
|
||
Started by lightsun47, Today, 03:51 PM
|
0 responses
8 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
14 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
Comment