Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Floating image or text indicator
Collapse
X
-
Floating image or text indicator
I would like to create a simple indicator that is essentially a floating message, with an x/y coordinate away from the closing price so that the message moves with price and never moves out of view like a static text block would do. Does something like this already exist as an indicator? ...or can someone point me in the right direction as far as creating it within NT8?
Tags: None
-
Hello BullyWig Trader,
Thanks for your post.
I am not aware of an existing indicator that accomplishes your goal.
That said, this could be accomplished using SharpDX DrawTextLayout to custom render text on a chart in a static location using x and y coordinates.
See the help guide documentation below for detailed information about using SharpDX methods for custom rendering.
Using SharpDX For Custom Rendering: https://ninjatrader.com/support/help...sharpdx_for_cu stom_chart_rendering.htm
SharpDX DrawTextLayout: https://ninjatrader.com/support/help...textlayout.htm
Also, see the attached example script, SharpDXDrawTextLayout, which demonstrates this.
And, see the SampleCustomRender indicator which comes default with NinjaTrader.
To view the code of a script, you would open a New > NinjaScript Editor window, open the Indicators folder, and select the script you would like to view.
Let us know if we may assist further.Attached Files<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
-
Most importantly, can the static x/y points be anchored to price so that it actually floats along with price? That's what i am looking for; not sure if that was clear or not. thanks for your response.
Comment
-
Hello BullyWig Trader,
Thanks for your note.
Yes, it would be possible for the text to move along with the price of the current bar.
You would use ChartControl.GetXByBarIndex(ChartBars, CurrentBar) to get X coordinate of the last bar and use that for the 'float x' value in the previously attached script. For the 'float y' value in the previously attached script, you would use chartScale.GetYByValue(Bars.GetClose(Bars.Count - 1) to move the text along the Y-axis.
See the help guide documentation below for more information.
ChartControl.GetXByBarIndex() - http://ninjatrader.com/support/helpG...bybarindex.htm
ChartScale.GetYByValue() - http://ninjatrader.com/support/helpG...etybyvalue.htm
Let us know if we may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
On a related note, do you know of an (ecosystem) indicator that allows me to display a smaller image of a chart within a full sized chart?
I've seen it before but can't find that indicator now. Could you please help? Thanks in advance.
Comment
-
Hello oldporkchops,
I am not aware of an item like that myself, if any users know of that item they will certainly post here. If it was originally on the ecosystem you may need to browse through the files on there to see if anything looks similar or if you can spot the one you had previously seen.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
558 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
324 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
101 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
546 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
547 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment