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 > NinjaScript Development Support > General Programming

General Programming General NinjaScript programming questions.

Reply
 
Thread Tools Display Modes
Old 08-26-2008, 09:08 PM   #1
tradefaz
Senior Member
 
Join Date: Aug 2008
Posts: 109
Thanks: 0
Thanked 0 times in 0 posts
Default How can I get my script parameters to show up in the property grid?

When I create a new instance of my strategy I don't see any of my public parameters (properties). I used the attribute notation below:


[Description("test")]
[Category("Parameters")]
public int test = 10;
tradefaz is offline  
Reply With Quote
Old 08-26-2008, 11:11 PM   #2
NinjaTrader_Josh
NinjaTrader Product Manager
 
NinjaTrader_Josh's Avatar
 
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 106 times in 70 posts
Default

You need the get and set lines. For instance:

[Description("Period for fast MA")]
[Category("Parameters")]
public int Fast
{
get { return fast; }
set { fast = Math.Max(1, value); }
}
NinjaTrader_Josh is offline  
Reply With Quote
Old 08-27-2008, 02:31 AM   #3
jonesr227
Junior Member
 
Join Date: Aug 2007
Posts: 21
Thanks: 0
Thanked 0 times in 0 posts
Default

What about the optimization properties? Can min, max and increment be entered programatically?
jonesr227 is offline  
Reply With Quote
Old 08-27-2008, 02:34 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

>> Can min, max and increment be entered programatically?
Unfortunately this is not supported.
NinjaTrader_Dierk 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
Market Replay date -- is there a property? cassb General Programming 1 05-02-2008 09:09 PM
Add Hidden Property? pivot44 Market Analyzer 1 04-16-2008 10:09 AM
PaintPriceMarkers property should be on Plot class pcdev General Programming 1 03-13-2008 10:26 AM
Exposing a non DataSeries property in an indicator tquinn Indicator Development 4 01-11-2007 02:29 PM
My indicator has a Color property and I need to be able to persist and recover it ThePatientOne Suggestions And Feedback 2 12-31-1969 06:00 PM


All times are GMT -6. The time now is 04:40 PM.