NinjaTrader Support Forum  

Go Back   NinjaTrader Support Forum > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 09-21-2008, 09:16 PM   #1
cassb
Senior Member
 
Join Date: Nov 2007
Location: Victor, NY
Posts: 578
Thanks: 5
Thanked 4 times in 4 posts
Send a message via Yahoo to cassb Send a message via Skype™ to cassb
Default Why doesn't this boolean parameter work?

I have a parameter that's boolean. Here is the declaration and the get/set code.

Code:
        private bool lines;

[...]

        [Description("Plot as lines [true] or as rays [false]")]
        [Category("Plots")]
        public bool Lines
        {
            get { return lines; }
            set { lines = value; }
        }
It defaults at false. When I change it to true and click OK on the indicator screen, it always resets itself back to false. How do I get this to work?? The code looks right to me and I can't find any other indicators that use a boolean parameter.
Price-Dynamics.com
A NinjaTrader Official Partner

Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy!

Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account!
cassb is offline  
Reply With Quote
Old 09-21-2008, 10:37 PM   #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

a) all parameters needed to have the category "Parameters". Please use the wizard to see how it works
b) if case that's an indicator: there already is an "internal" property "Lines". Please use a different name.
NinjaTrader_Dierk is offline  
Reply With Quote
Old 09-22-2008, 06:58 AM   #3
cassb
Senior Member
 
Join Date: Nov 2007
Location: Victor, NY
Posts: 578
Thanks: 5
Thanked 4 times in 4 posts
Send a message via Yahoo to cassb Send a message via Skype™ to cassb
Default

Quote:
Originally Posted by NinjaTrader_Dierk View Post
a) all parameters needed to have the category "Parameters". Please use the wizard to see how it works
b) if case that's an indicator: there already is an "internal" property "Lines". Please use a different name.
Yes, it is an indicator. And that's what I thought -- "Lines" was a reserved word or already used. Thanks, I'll change the variable name.

Bryan
Price-Dynamics.com
A NinjaTrader Official Partner

Visit http://www.price-dynamics.com to learn more about the Rhythm Relay trading system. Yes, you can discretionary or auto-trade with 75%+ accuracy!

Use our Contact Us page to request free access to our daily Trader's Lounge where you can see the system in action in a live account!
cassb 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
Parameter Persistence CashCache Strategy Development 5 07-23-2010 07:56 AM
BarColor Parameter Mike Winfrey Indicator Development 4 09-17-2008 08:43 AM
Parameter Value Formatting whitmark General Programming 1 08-01-2008 09:13 AM
Can I have different parameter for different instruments? cassb Strategy Development 4 06-05-2008 03:55 PM
Boolean log with integers jeremymgp Indicator Development 5 01-04-2008 07:36 AM


All times are GMT -6. The time now is 10:19 PM.