![]() |
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
|
|||||||
| Charting Support for NinjaTrader Advanced Charting. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
Have a DataSeries that contains bar numbers and want to plot a line between Highs and Lows of consecutive bars,, any suggestions?
|
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,404
Thanks: 252
Thanked 974 times in 957 posts
|
Hi gg80108, you can use the DrawLine methods for connecting your highs / lows - http://www.ninjatrader-support.com/H.../DrawLine.html
Bertrand
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2009
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
|
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
Ben
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Senior Member
Join Date: Dec 2008
Location: Castle Pines, Co
Posts: 621
Thanks: 1
Thanked 2 times in 2 posts
|
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.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |