I am writing a new indicator and want to disable/lock and hard code these properties so that users can't change them. Please let me know how to do that.. .can't seem to find a thread that shows this clearly.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to disable/lock properties of indicators?
Collapse
X
-
How to disable/lock properties of indicators?
Hi,
I am writing a new indicator and want to disable/lock and hard code these properties so that users can't change them. Please let me know how to do that.. .can't seem to find a thread that shows this clearly.Tags: None
-
Hello priceisking,
Thanks for your post.
You can hide properties from the indicators windows by setting the BrowsableAttribute boolean for that property to false
Help Guide - BrowsableAttributeJosh G.NinjaTrader Customer Service
-
Do i have to list all properties individually or can i do it in 1 shot like this?
#region Properties
[Browsable(false)]
#endregion
I'm not able to compile with above .
Comment
-
That would need to be applied to each property individually.
For example:
Code:#region Properties [Browsable(false)] [NinjaScriptProperty] [Range(1, double.MaxValue)] [Display(Name="MyAttribute", Order=1, GroupName="Parameters")] public double MyAttribute { get; set; } #endregion
Josh G.NinjaTrader Customer Service
Comment
-
Ok thank you. But I tried this with Label and it still shows up in the properties window allows modification:
[Browsable(false)]
[Range(1, int.MaxValue), NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "Label", GroupName = "NinjaScriptParameters", Order = 0)]
public string Label
{ get; set; }
Comment
-
Oh OK. . .so default properties i can't hide. What about custom plot colors and other settings for plots?
Comment
-
You would not be able to hide plots with BrowsableAttribute either. For plots you would want to use ArePlotsConfigurable and set it to false.
Help Guide - ArePlotsConfigurableJosh G.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
6 responses
3,290 views
1 like
|
Last Post
by jgualdronc
Today, 10:56 AM
|
||
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
9 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
11 responses
62 views
0 likes
|
Last Post Today, 10:08 AM | ||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
8 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
25 views
0 likes
|
Last Post Today, 09:41 AM |
Comment