[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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
132 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
65 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment