![]() |
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Member
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
|
Hi,
I am trying to have an indicator to display certain values pertaining to the visible chart. I have hacked something to have the values show as I scroll forward in time using this snippet from 'CurrentDayOHL': Code:
currentDate != Bars.GetTradingDayFromLocal(Time[0]) K |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello K,
Sorry, not quite following what you're looking to do. What values do you want updated on prior days?
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Member
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
|
Hi Ryan,
I like to keep a something similar to the Data Box as a message top of the chart, with info such as mid of range, daily range, IB range. So when I scroll back or forward in intradays, the values need to update to the visible chart. At present the values stay fixed based on the values of the last trading day. K |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hello K,
Unfortunately we're not able to offer much support for working with visible chart area. I can see what you're saying when using DrawTextFixed(). It uses the last value rather than an historic one when scrolling back. You may consider using DrawText() only, and placing text relative to bars. A good property that can help reset values on a daily basis is FirstBarOfSession. An alternative to this is overriding the plot method and you then draw directly on chart. We can point you to the provided sample but any implementation will be on your own. This CustomPlotSample is available in all NT installations through Tools > edit NinjaScript > Indicator.
Ryan M
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Member
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
|
Ryan,
Appreciate the guidance. You are right on the usage of the DrawText, and I was thinking of overloading the plot method to get what I want. I believe I have enough info to 'hack' something to my liking. Cheers, K |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Data Box showing Drawing Objects values? | Stopped | Suggestions And Feedback | 4 | 01-08-2011 01:14 AM |
| Market Replay Bar showing wrong end day | pedroprada@bellsouth.net | Connecting | 1 | 12-19-2010 09:26 PM |
| Indicator values not showing in column | snaphook | Market Analyzer | 9 | 12-03-2010 02:37 PM |
| NT7 not showing data from the current day | joao30 | Version 7 Beta General Questions & Bug Reports | 4 | 12-22-2009 11:43 AM |
| Charting Problem--Rays / Lines are not visible on following day. | ninja.man | Charting | 2 | 10-22-2007 03:41 PM |