I don't want "Hello World" placed at a location relative to price values, bur rather at a specific pixel value above where "Bottom.Right" text would appear.
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
Place text at a specific pixel location
Collapse
X
-
Place text at a specific pixel location
Could you give me an example of a Draw.Text() statement that will print the text "Hello World" right above where Draw.TextFixed( .. Bottom.Right) would be placed on a chart.
I don't want "Hello World" placed at a location relative to price values, bur rather at a specific pixel value above where "Bottom.Right" text would appear.Tags: None
-
Hello SilverSurfer1,
Unfortunately, drawing tools must be drawn over a bar or at a fixed corner in the case of Draw.TextFixed().
Instead of using a drawing tool, you will need to custom render the text in OnRender().
Included with NinjaTrader is the SampleCustomRender() script that demonstrates.
I am also including links to the help guide.
https://ninjatrader.com/support/help...8/onrender.htm
https://ninjatrader.com/support/help...t_drawtext.htm
And a link to a User App Share script that renders text in OnRender().
https://ninjatraderecosystem.com/use...bol-watermark/Chelsea B.NinjaTrader Customer Service
-
Thanks for the response. That is way too much work for a simple text. Maybe in a future release, there could be a Draw.TextCustom.( xAxisPixel, yAxisPixel) which will allow placing text anywhere on the X/Y axis.Last edited by SilverSurfer1; 09-20-2023, 01:18 PM.
- Likes 1
Comment
-
Hello SilverSurfer1,
This request is being tracked with ID # SFT-647.
Please note, we receive many requests and cannot reasonably implement all requested features or changes. Interest is tracked internally and if enough interest is tracked, it would be weighed against how feasible it would be to make those changes to consider implementing, so we cannot offer an ETA or promise of fulfillment.
When new features are implemented, they will be listed in the Release Notes page of the Help Guide. The ID number may be different than the internal feature request tracking ID, but the description of the feature will let you know if that feature has been implemented.
Release Notes - https://ninjatrader.com/support/help...ease_notes.htmChelsea B.NinjaTrader Customer Service
Comment
-
You should certainly be using OnRender for this. A specific pixel location is not a good idea because what if they resize the window? What if their resolution differs? What about their text size being 150% vs. 100%? It's really not so simple unless you're always printing in the upper left and even then the distance from the corner will vary if you do not take these things into account. That's why OnRender is just a better solution - you can program in what you need.
- Likes 1
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by KonAdams, Today, 10:53 PM
|
0 responses
1 view
0 likes
|
Last Post
by KonAdams
Today, 10:53 PM
|
||
Started by JGriff5646, Today, 10:02 PM
|
0 responses
10 views
0 likes
|
Last Post
by JGriff5646
Today, 10:02 PM
|
||
Started by AdamDJ8, Today, 09:18 PM
|
0 responses
5 views
0 likes
|
Last Post
by AdamDJ8
Today, 09:18 PM
|
||
Started by knowmad, Today, 03:52 AM
|
2 responses
33 views
0 likes
|
Last Post
by knowmad
Today, 09:03 PM
|
||
Started by ETFVoyageur, Today, 07:05 PM
|
0 responses
11 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:05 PM
|
Comment