Thanks in advance.
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
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 | ||
---|---|---|---|---|
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, Today, 07:51 PM
|
0 responses
3 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
5 responses
96 views
1 like
|
Last Post
by caryc123
Today, 07:47 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
6 responses
49 views
0 likes
|
Last Post
by algospoke
Today, 06:18 PM
|
||
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
Comment