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
Text at top left of chart in strategy
Collapse
X
-
Text at top left of chart in strategy
I need to draw some text at the top left of my chart. How do I do that in a C# strategy in NT8? Do you have some sample code that does this?Tags: None
-
Ok thanks. Suppose I want to update that text at the close of each bar. Is there a way to delete/remove the text I draw on the previous bar and then call Draw.TextFixed for the new text? Or will Draw.TextFixed just overwrite whatever text i put there before?
Second question: suppose I want to draw multiple lines of text. Can I do that just by adding a "\n" character at the end of each line of text? Or is there another way I have to use?
Comment
-
Hello westofpluto,
To update it you just need to call the Draw. syntax again with the same tag name. All drawing objects work this way, if a unique tag is provided a new object is made otherwise the existing object will be updated when using the same tag.
You can use the newline character to add more lines. The alternative to that would be to use an indicator and OnRender, that would allow for using X/Y coordinates to draw text in more custom ways.
I look forward to being of further assistance.
JesseNinjaTrader Customer Service
Comment
-
You can use the newline character to add more lines. The alternative to that would be to use an indicator and OnRender, that would allow for using X/Y coordinates to draw text in more custom ways.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by techgetgame, Today, 11:42 PM
|
0 responses
7 views
0 likes
|
Last Post
by techgetgame
Today, 11:42 PM
|
||
Started by sephichapdson, Today, 11:36 PM
|
0 responses
1 view
0 likes
|
Last Post Today, 11:36 PM | ||
Started by bortz, 11-06-2023, 08:04 AM
|
47 responses
1,612 views
0 likes
|
Last Post
by aligator
Today, 07:22 PM
|
||
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
9 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
19 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
Comment