Go Back   NinjaTrader Support Forum > NinjaTrader 7 > General Development

General Development General NinjaScript development questions.

Thread Tools Display Modes
Old 01-12-2013, 12:56 PM   #1
Senior Member
Join Date: Jan 2006
Location: Margate, Florida, USA
Posts: 586
Thanks: 40
Thanked 12 times in 11 posts
Default Property Grid...

In my custom indicator, I would like to add a drop down list to a property so I use can select from 3 options. Can someone point me in the direction on how this is done please?

For instance:

[Description("Description here")]
[GridCategory("Category here")]
[Gui.Design.DisplayNameAttribute("Display name here")]
public int MyProperty
get { return myProperty; }
set { myProperty = value; }

I need to create a property with drop down selections like I see in other NT indicators, Color values, etc.
funk101 is offline  
Reply With Quote
Old 01-12-2013, 05:08 PM   #2
Senior Member
Join Date: Dec 2007
Posts: 460
Thanks: 48
Thanked 70 times in 55 posts

I think you need to look into using an enum as the parameter. Here is a sample provided by Ninja:


coolmoss is offline  
Reply With Quote
The following user says thank you to coolmoss for this post:
Old 01-13-2013, 12:35 AM   #3
Senior Member
Join Date: Jan 2006
Location: Margate, Florida, USA
Posts: 586
Thanks: 40
Thanked 12 times in 11 posts

That's cool, thanks. But my issue is that I need to return DataGridViewContentAlignment value of either:

Not sure the enum can do that , at least i haven't figure it out yet. What say ye?
funk101 is offline  
Reply With Quote
Old 01-13-2013, 09:30 AM   #4
NinjaTrader Customer Service
NinjaTrader_Lance's Avatar
Join Date: Sep 2012
Location: Denver, CO, USA
Posts: 1,437
Thanks: 53
Thanked 226 times in 219 posts


Yes enum should be what you're looking for. For more details on its usage (in addition to the link already posted) http://www.csharp-station.com/Tutorials/Lesson17.aspx

Please let me know if I can be of further assistance.
NinjaTrader_Lance is offline  
Reply With Quote
Old 02-08-2014, 02:05 AM   #5
Junior Member
Join Date: Feb 2014
Posts: 1
Thanks: 0
Thanked 0 times in 0 posts

Never imagined the enum can be used in that way. I am also confused with a similar C# property grid question, I read through the property grid tutorial but didn't find the good solution to my annoyance.
xiaoyuandlg is offline  
Reply With Quote
Old 02-08-2014, 07:51 PM   #6
NinjaTrader Customer Service
NinjaTrader_JC's Avatar
Join Date: Mar 2012
Location: Denver, CO
Posts: 2,611
Thanks: 261
Thanked 480 times in 468 posts

Hello xiaoyuandlg,

Welcome to the NinjaTrader Support Forums!

That is a bit out of the scope that we can support here at NinjaTrader.

On different subjects like this you may want to start a new thread as well but I will leave this thread open incase a member of our Support Forums has worked with the "KetticPropertyGrid".
NinjaTrader_JC is offline  
Reply With Quote

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
Controlling display of Plots property grid CriticalTrader Indicator Development 2 06-25-2012 11:05 AM
Basing one Property/Parameter on Another Property/Parameter gregschr General Development 5 08-10-2010 11:31 AM
How to delete a property blarouche Indicator Development 4 08-14-2009 12:37 PM
Added Property to Strategy but Not Showing on Property Grid stocastix Platform Technical Support 2 11-07-2008 05:00 PM
How can I get my script parameters to show up in the property grid? tradefaz General Development 3 08-27-2008 02:34 AM

All times are GMT -6. The time now is 03:10 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content.