[NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "Enable Changing Targets", GroupName = "NinjaScriptStrategyParameters", Order = 3)]
public bool ChangeTarget
{ get; set; }
[NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "# of Ticks within to activate new target", GroupName = "NinjaScriptStrategyParameters", Order = 4)]
public int TickRang
{ get; set; }
[NinjaScriptProperty]
[Display(ResourceType = typeof(Custom.Resource), Name = "Enter # of Ticks to set new target", GroupName = "NinjaScriptStrategyParameters", Order = 5)]
public int NewTickTarget
{ get; set; }
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Property Indentation
Collapse
X
-
Strategy Property Indentation
I have created a property for my strategy that allows the user the ability to change profit targets. See below pic. I want the two parameters with the red arrows to be indented and allow the user to enter values in them only if "Enable Changing Targets" is checked. Whenever "Enable Changing Targets" is not checked, the user will not have the ability to change values and I want the text to be hidden or grayed out (if possible). How do I do update my code to do this? I included my code below for reference. Thanks
HTML Code:Last edited by algospoke; 06-17-2024, 06:29 PM.Tags: None
-
Hello algospoke,
Thank you for your post.
I recommend checking out the following reference sample script:
This script demonstrates how to toggle if properties are shown/hidden based on a bool checkbox. You may search the script for "use case #1" and jump to different comments and regions of code that are relevant to that use case.
Please let us know if we may be of further assistance.
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
58 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
41 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
46 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
37 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|
||
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
156 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|

Comment