NinjaTrader Support Forum  
X

Attention!

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


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

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 06-04-2010, 12:08 AM   #1
randomwalker
Member
 
Join Date: Mar 2010
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
Default I cannot get this line plot and show in databox

the following is the codes trying to plot a horizontal line of yesterday VWAP on today's intraday chart. However, it just cannot get plot on the chart, any idea?

if (Bars.FirstBarOfSession )
{

if (Time[0].DayOfWeek == DayOfWeek.Monday)
timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 3, 16, 30, 0);
else
timeOfInterest = new DateTime(Time[0].Year, Time[0].Month, Time[0].Day - 1, 16, 30, 0);
}
barsAgo = GetBar(timeOfInterest) ;


Plot0.Set(VWAP().VWAPLine[barsAgo]);
randomwalker is offline  
Reply With Quote
Old 06-04-2010, 06:07 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,418
Thanks: 252
Thanked 979 times in 962 posts
Default

Any errors in the log tab? Do you include a check for enough CurrentBars at the OnBarUpdate() start? Otherwise you run into issues reaching back at the start of your charts as there're no bars back then to calc for.

http://www.ninjatrader.com/support/f...ead.php?t=3170
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 06-04-2010, 10:18 PM   #3
randomwalker
Member
 
Join Date: Mar 2010
Posts: 38
Thanks: 0
Thanked 0 times in 0 posts
Default

The message from log tab is that:" Error calling the 'OnBarUpdat' method for indicator on bar 78 :year, month and day parameters describle an unrepresentable datetime" And I run another indicator "SampleGetBar" downloaded from this support forum and see the same message from logtab. What should I do?
randomwalker is offline  
Reply With Quote
Old 06-07-2010, 06:42 AM   #4
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,418
Thanks: 252
Thanked 979 times in 962 posts
Default

You would need to print out associated values to debug where the issues stems from in your code at this time, I believe you would see this for example for an 'irregular' session day as last Monday (Memorial Day in the US) for example.
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 04-26-2012, 06:59 AM   #5
Drummer
Junior Member
 
Join Date: Jan 2011
Posts: 19
Thanks: 0
Thanked 1 time in 1 post
Default

I have code that successfully draws horizontal lines to my indicator panel in "maximum" display mode (right click the verticle axis) but I do not see the lines in a data box. How do I get these horizontal lines to display in a data box?
Drummer is offline  
Reply With Quote
Old 04-26-2012, 07:02 AM   #6
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,418
Thanks: 252
Thanked 979 times in 962 posts
Default

That would unfortunately not be possible, only plots could be displayed in the data box.

More control over the databox contents is on our feedback list for the next major NT version update, I've added your request in.

Thanks,
NinjaTrader_Bertrand is online now  
Reply With Quote
Old 04-26-2012, 08:28 AM   #7
Drummer
Junior Member
 
Join Date: Jan 2011
Posts: 19
Thanks: 0
Thanked 1 time in 1 post
Default

More control of drawing objects is REALLY needed like:
Show price marker checkbox (including left Y axis if there)
Show in data box checkbox

AND MOST ESPECIALLY;

STOP having the properties box show with either a left click OR a right click. The properties box SHOULD ONLY SHOW with a right click!!! I have hundreds of times brought up the properties box by left clicking on a draw object to move it only to have the damn properties box show up for me to have to click cancel, and then try again which can cause the properties box to appear again, (like when I am in a trade with heat).

This is NOT a problem with my mouse as I have replaced my mouse. Would you please update the request you put in with this info.




Anyway Bertrand.... thank you for your reply
Drummer 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
Replace databox and show price at mouse cursor? grose General Programming 1 02-25-2010 09:50 AM
Plot name in DataBox is not updated cls71 Version 7 Beta General Questions & Bug Reports 1 12-16-2009 02:21 AM
Last indicator value does not show in databox when +1 displaced Wessel Version 7 Beta General Questions & Bug Reports 3 12-15-2009 11:21 AM
horizotal line show value starfill Charting 7 09-17-2009 04:35 AM
Databox vs plot on chart zeller4 Indicator Development 2 11-29-2008 08:00 PM


All times are GMT -6. The time now is 05:29 AM.