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 > Indicator Development

Indicator Development Support for the development of custom indicators using NinjaScript.

Reply
 
Thread Tools Display Modes
Old 02-17-2008, 06:51 PM   #1
GaryAlbers
Senior Member
 
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
Default DrawLine help needed

I have attached a stripped down indicator that uses the DrawLine method
to put up to 10 lines on the price chart. They are not showing up and I
am not getting any error. I have a print statement to verify the logic is
executing with values as expected.

What I hope to see is that the lines are drawn for the bars on a given day
and are left there. New bars, with new values, are then drawn as the bars
for a new day unfold.
I call DrawLine each bar with the same tag so I am expecting to
alter the same line by extending it one more bar.

I could use some more eyes to point out what I am doing wrong.

Thanks in advance,
Gary
Attached Files
File Type: zip GDrawLines.zip (2.1 KB, 9 views)
GaryAlbers is offline  
Reply With Quote
Old 02-17-2008, 09:45 PM   #2
GaryAlbers
Senior Member
 
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
Default Forgot to mention...

I forgot to point out that the indictor code I attached normally reads data from a file but that was too much to upload, so I hard coded some data.
The dummy data plots some lines for the ES on 2/14/2008.

The lines should only be drawn for the bars on 2/14.

Thanks again, to who ever has an idea
GaryAlbers is offline  
Reply With Quote
Old 02-17-2008, 10:24 PM   #3
GaryAlbers
Senior Member
 
Join Date: Nov 2007
Location: Arlington Heights, IL
Posts: 100
Thanks: 0
Thanked 4 times in 4 posts
Default Figured it out.

I was using CurrentBar for the endBarsAgo parameter. Instead it should
have been set to 0 (for last bar on chart).

Hope I didn't waste anybody's time
GaryAlbers 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
DrawLine into the future? higler General Programming 4 09-10-2008 12:27 PM
DrawLine Help PrTester Charting 1 02-09-2008 08:41 PM
Data needed server Miscellaneous Support 0 12-11-2007 02:22 AM
Use Indicator plot color in DrawLine() MJT Indicator Development 1 06-01-2007 03:13 PM
DrawText, DrawLine, etc... funk101 Indicator Development 2 05-27-2007 01:13 PM


All times are GMT -6. The time now is 04:59 AM.