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 > Automated Trading

Automated Trading Support for automated trading systems using NinjaScript. Support for our ATI (Automated Trading Interface) used to link an external application such as TradeStation and eSignal to NinjaTrader.

Reply
 
Thread Tools Display Modes
Old 11-07-2008, 02:33 PM   #1
stocastix
Junior Member
 
Join Date: Nov 2008
Posts: 10
Thanks: 0
Thanked 0 times in 0 posts
Default Added Property to Strategy but Not Showing on Property Grid

I code most of my strategies by hand not using the Wizard. When I introduce a property, how do I make it appear on the Property Grid when selecting a Strategy?

It seems as though when when you select Parameters for a strategy via the wizard, it appears on the Property Grid but if you write a Parameter by hand, it does not show.

Can you help me please?
stocastix is offline  
Reply With Quote
Old 11-07-2008, 02:56 PM   #2
NinjaTrader_Ben
NinjaTrader Customer Service
 
NinjaTrader_Ben's Avatar
 
Join Date: May 2008
Location: Denver, CO
Posts: 3,157
Thanks: 0
Thanked 3 times in 3 posts
Default

Hello,

Here is an example of how to do it. Add this in the Variables section:

privateint test = 1;

Add this in the Properties section:

[Description(
"test")]
[Category(
"Parameters")]
publicint Test
{
get { return test; } set { test = Math.Max(1, value); }
}
NinjaTrader_Ben is offline  
Reply With Quote
Old 11-07-2008, 04:00 PM   #3
NinjaTrader_Ray
Administrator
 
NinjaTrader_Ray's Avatar
 
Join Date: Nov 2004
Location: Denver, CO, USA
Posts: 11,163
Thanks: 6
Thanked 45 times in 32 posts
Default

Here is some additional information on this topic - http://www.ninjatrader-support2.com/...ead.php?t=5782
NinjaTrader_Ray 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
How can I get my script parameters to show up in the property grid? tradefaz General Programming 3 08-27-2008 02:34 AM
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


All times are GMT -6. The time now is 01:08 AM.