![]() |
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
|
|||||||
| Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
In a strategy, I am trying to display an indicator with a PlotStyle of Square. In the Initialize method I have:
LinReg(Close,lr_length).Plots[0].PlotStyle.Square; Add(LinReg(Close,lr_length)); I get compiler errors relating to PlotStyle. What am I doing wrong? |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Do you want to do this?
LinReg(Close,lr_length).Plots[0].PlotStyle = PlotStyle.Square;
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
That gives me "The name 'PlotStyle' does not exist in the current context"
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
|
Please try this:
LinReg(Close,lr_length).Plots[0].PlotStyle = Gui.Chart.PlotStyle.Square;
Dierk
NinjaTrader Customer Service |
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
|
That did it. My OO is rusty. Thanks Dierk.
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| New Indicator wizard always codes PlotStyle as line. | higler | General Programming | 3 | 05-16-2007 03:11 PM |
| PlotStyle.Line Across UnSet Values | whitmark | Indicator Development | 4 | 03-30-2007 01:14 AM |