Thanks in advance.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Adding A Legend To A Chart Panel
Collapse
X
-
Adding A Legend To A Chart Panel
I have a strategy that runs on several series and is very much state based. So what I imagine is plotting a 'legend' style box on the chart that lists the respective state of each series and that of various indicators. The simple solution would be to plot this info to one of the output panels but I would like to see it on the chart. What is the best/easiest way of accomplishing this?
Thanks in advance.Tags: None
-
Hello molecool,
Thank you for the post.
The best way to do this would be to use OnRender. You could make a custom legend however you wanted, for example showing text and a colored rectangle for the plot color next to the text. OnRender is X/Y based so you could do something based on the chart panel coordinates rather than bar/price. Downside is this is more complex to learn initially.
The simple or basic way would be to use text objects. You would likely need to find the maximum price and draw at the current bar and at that price, then offset the text every X ticks of price or use the Y offset field from that max price for each new line. it would be much more cumbersome and likely would not handle scaling well. OnRender would be suggested for anything that needs to be static or not price/bar based.
If you are not familiar with OnRender you can see the SampleCustomRender indicator for an example.
I look forward to being of further assistance.JesseNinjaTrader Customer Service
-
Hi, is there an easy way to show the bid and ask on the chart as text? Basically I would just like to have the current bid and ask on the chart as a legend, I feel it's simple but can't find the way to do it. Thanks!! Have a great year full of successful trades!
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ttrader23, Today, 04:48 PM
|
0 responses
3 views
0 likes
|
Last Post
![]()
by ttrader23
Today, 04:48 PM
|
||
Started by wisdomspoon, Today, 03:50 PM
|
3 responses
14 views
0 likes
|
Last Post
![]()
by rockmanx00
Today, 04:33 PM
|
||
Started by Mountain_cast, 02-10-2025, 11:14 PM
|
2 responses
19 views
0 likes
|
Last Post
![]() |
||
Started by Robotman, Today, 01:06 PM
|
2 responses
37 views
0 likes
|
Last Post
![]()
by Robotman
Today, 02:05 PM
|
||
Started by PH_GMT, Today, 12:40 PM
|
4 responses
19 views
0 likes
|
Last Post
![]()
by PH_GMT
Today, 02:41 PM
|
Comment