NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 05-18-2011, 04:33 PM   #1
kashter
Member
 
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
Default Showing values of visible day

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])
but it does not update values as you scroll back in time to past days. What would I need to do to make the indicator 'update' values relevant to the visible day?

K
kashter is offline  
Reply With Quote
Old 05-18-2011, 04:37 PM   #2
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hello K,

Sorry, not quite following what you're looking to do. What values do you want updated on prior days?
NinjaTrader_RyanM is offline  
Reply With Quote
Old 05-18-2011, 04:45 PM   #3
kashter
Member
 
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
Default

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
kashter is offline  
Reply With Quote
Old 05-18-2011, 05:02 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

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.
NinjaTrader_RyanM is offline  
Reply With Quote
Old 05-18-2011, 05:13 PM   #5
kashter
Member
 
Join Date: Mar 2011
Posts: 53
Thanks: 4
Thanked 0 times in 0 posts
Default

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
kashter is offline  
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT -6. The time now is 03:59 PM.