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 > Strategy Analyzer

Strategy Analyzer Support for automated system backtesting and optimization using the NinjaTrader Strategy Analyzer.

Reply
 
Thread Tools Display Modes
Old 03-26-2008, 09:53 AM   #1
kenzo
Junior Member
 
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default PlotStyle

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?
kenzo is offline  
Reply With Quote
Old 03-26-2008, 10:00 AM   #2
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Do you want to do this?
LinReg(Close,lr_length).Plots[0].PlotStyle = PlotStyle.Square;
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-26-2008, 10:05 AM   #3
kenzo
Junior Member
 
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

That gives me "The name 'PlotStyle' does not exist in the current context"
kenzo is offline  
Reply With Quote
Old 03-26-2008, 10:15 AM   #4
NinjaTrader_Dierk
Administrator
 
NinjaTrader_Dierk's Avatar
 
Join Date: Mar 2005
Location: Bamberg, Germany
Posts: 9,994
Thanks: 0
Thanked 6 times in 6 posts
Default

Please try this:
LinReg(Close,lr_length).Plots[0].PlotStyle = Gui.Chart.PlotStyle.Square;
NinjaTrader_Dierk is offline  
Reply With Quote
Old 03-26-2008, 10:23 AM   #5
kenzo
Junior Member
 
Join Date: Jan 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default

That did it. My OO is rusty. Thanks Dierk.
kenzo 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
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


All times are GMT -6. The time now is 12:21 AM.