![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
|
At (Bars.DayBreak) I have a computed value I need to display
It seems the data box is not "API available" - unless something has changed? I tried to plot it adjacent to e.g. the lower chart boundry as a unique object using DrawText - but I'm not sure how to reference the y position. Is there a way to determine the lower chart y-scale boundry to use as y-value? It seems if I use DrawFixed I can only keep a single value displayed - which would be ok if there was a way to make that dependent on the cursor position. Any thoughts welcome! thanx tb |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Likely would need to override the Plot() method. Check out the CustomPlotSample indicator.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
|
Ray, thanks - that was quick!
Is there a way to have a user defined data series display in the data box? On some occasion I had an empty colored field showing up in the databox, not sure when that happened though... |
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
|
Only DataSeries objects that are part of the Values collection will show up in the DataBox. Calling Add() to add a plot will add a DataSeries object to this collection. Thus, only DataSeries objects that are used to store values that are plotted will display.
Ray
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: May 2008
Posts: 50
Thanks: 0
Thanked 0 times in 0 posts
|
One idea - for the "wishlist" - would be if you could just "nail" the y position to Top or Bottom (relative to the chart window at time of drawing) and have the x position selectable, kind of a crossing between DrawText or DrawTextFixed
Maybe extending the TextPosition enumeration for DrawTextFixed to "BottomCurrentBar" or "BottomFloating" (etc.) would help. |
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
|
Thank you for the suggestion. We will put it on the list of future considerations.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 | |
|
Senior Member
Join Date: Oct 2009
Location: Australia
Posts: 108
Thanks: 2
Thanked 14 times in 7 posts
|
Quote:
Override the Plot method. Use the bounds parameter for your Y offset. It has a variety of properties like bounds.Top, bounds.Bottom that you can use to accurately place your text or symbols on the chart regardless of where the Price bars change the Y Axis |
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drawtext | spenbm01 | Miscellaneous Support | 3 | 06-06-2008 11:23 PM |
| DrawText API doc? | mazachan | General Programming | 1 | 03-04-2008 03:12 PM |
| DrawText | Mike Winfrey | General Programming | 1 | 12-21-2007 04:57 PM |
| DrawText, DrawLine, etc... | funk101 | Indicator Development | 2 | 05-27-2007 01:13 PM |
| Can not get DrawText to work (NT6) | RedDuke | General Programming | 7 | 05-13-2007 06:10 PM |