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 > Application Technical Support > Charting

Charting Support for NinjaTrader Advanced Charting.

Reply
 
Thread Tools Display Modes
Old 04-08-2009, 09:58 AM   #1
gg80108
Senior Member
 
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
Default Plotting DataSeries

Have a DataSeries that contains bar numbers and want to plot a line between Highs and Lows of consecutive bars,, any suggestions?
gg80108 is offline  
Reply With Quote
Old 04-08-2009, 10:35 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
Default

Hi gg80108, you can use the DrawLine methods for connecting your highs / lows - http://www.ninjatrader-support.com/H.../DrawLine.html
NinjaTrader_Bertrand is offline  
Reply With Quote
Old 11-20-2009, 08:26 PM   #3
blueion
Junior Member
 
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
Default Plotting Lines to conect Highs & Lows

Yea, I'm interested in the same. Apparently, Low and Lows do NOT have a Plot method? We can plot EMA on close,open,high, low. But how can we create a series of lows and highs and plot then and base decision rules off of them? Not just drawing lines to connect them. Any suggestions are much welcomed.

blueion
blueion is offline  
Reply With Quote
Old 11-21-2009, 11:45 AM   #4
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

I am jumping in here so I may be off, but I suggest storing them in a DataSeries:
http://www.ninjatrader-support.com/H...iesObject.html
NinjaTrader_Ben is offline  
Reply With Quote
Old 11-22-2009, 03:01 PM   #5
gg80108
Senior Member
 
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
Default

here is the code i used to connect significant bar points, like Ben said the key to this is storing the bar numbers somewhere. The trick is that with a data series there is an entry in the array for every bar , a null or value, and not just the values you set in.
I had to use a


//find last pivot bar
for (int x = 1; x < Bars.BarsSinceSession;x++)
{
if (scalpSeries.ContainsValue(x))
{
PivotBarNum = (
int)scalpSeries[x];
DrawLine(
"sl" + CurrentBar,CurrentBar - PivotBarNum,Low[CurrentBar - PivotBarNum],ExtremeBar,High[ExtremeBar],Color.Blue,DashStyle.Solid,1);
Last edited by gg80108; 11-22-2009 at 03:07 PM.
gg80108 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
DataSeries.Reset() snaphook General Programming 16 11-11-2009 10:43 AM
How to copy DataSeries to another DataSeries xewoox General Programming 8 12-02-2008 07:53 AM
Dataseries Questions ??? RJay General Programming 2 10-28-2008 12:09 PM
DataSeries Weirdness CashCache General Programming 1 09-04-2008 10:53 PM
Plotting (or backtesting) Ratio's of dataseries Sidhartha General Programming 1 04-10-2008 02:01 PM


All times are GMT -6. The time now is 05:55 PM.