NinjaTrader Support Forum  
X

Attention!

This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM 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.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 07-31-2012, 07:28 PM   #1
ij001
Senior Member
 
Join Date: Apr 2010
Posts: 125
Thanks: 18
Thanked 3 times in 3 posts
Default Parameters in UserDefinedMethods

Hi there

I added a bool method to Parameters in my UserDefinedMethods.cs file.

private bool iShowOnly = false;

[Description("")]
[GridCategory("Parameters")]
publicbool ShowOnly
{
get { return iShowOnly; }
set { iShowOnly = value; }
}

Since UserDefinedMethods.cs is public it shows in Parameters for all indicators. I only want to use it with a couple of indicators not all of them. Is there a way to restrict to which ones?

Btw - I can't put the code just in the indicators I need because the methods I use are coded and referenced in the UserDefinedMethods.cs file...

Thx
Irvin
ij001 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
UserDefinedMethods ScottB Automated Trading 7 09-28-2010 02:34 PM
UserDefinedMethods ScottB General Programming 2 09-25-2010 11:53 AM
UserDefinedMethods.cs zeller4 Indicator Development 1 06-07-2010 08:51 AM
userdefinedmethods 8DTK8 Strategy Development 4 02-22-2009 07:49 AM
Question about UserDefinedMethods clint2008 Strategy Development 1 11-07-2008 10:37 AM


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