Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Position Bools
Collapse
X
-
Hi Teebone21,
I'm not sure what you're asking for but this might be it.
Code:[NinjaScriptProperty] [Display(Name = "Trade Longs", Description = "Permit trading long positions", Order = 1, GroupName = "Parameters")] public bool IsTradeLongs { get; set; } [NinjaScriptProperty] [Display(Name = "Trade Shorts", Description = "Permit trading shorts positions", Order = 2, GroupName = "Parameters")] public bool IsTradeShorts { get; set; }
Hope that helps!
Matt
-
Thank you sir! I will update code and defaults to make this workOriginally posted by StealthM93 View PostHi Teebone21,
I'm not sure what you're asking for but this might be it.
Code:[NinjaScriptProperty] [Display(Name = "Trade Longs", Description = "Permit trading long positions", Order = 1, GroupName = "Parameters")] public bool IsTradeLongs { get; set; } [NinjaScriptProperty] [Display(Name = "Trade Shorts", Description = "Permit trading shorts positions", Order = 2, GroupName = "Parameters")] public bool IsTradeShorts { get; set; }
Hope that helps!
Matt
- Likes 1
Comment
-
Hello Teebone21,
Thanks for your post.
It seems that you might be wanting to create user-defined bool input properties as mentioned by StealthM93 (Matt).
The code that Matt shared would be used for creating those user-defined input properties. The IsTradeLongs and IsTradeShorts variables could then be used throughout the script.
Creating User Defined Input Parameters: https://ninjatrader.com/support/help...d_input_pa.htm
Please let me know if I may assist further.<span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>
Comment
-
Thanks i got it to work!Originally posted by NinjaTrader_BrandonH View PostHello Teebone21,
Thanks for your post.
It seems that you might be wanting to create user-defined bool input properties as mentioned by StealthM93 (Matt).
The code that Matt shared would be used for creating those user-defined input properties. The IsTradeLongs and IsTradeShorts variables could then be used throughout the script.
Creating User Defined Input Parameters: https://ninjatrader.com/support/help...d_input_pa.htm
Please let me know if I may assist further.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Yesterday, 05:17 AM
|
0 responses
54 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
130 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
72 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
44 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
49 views
0 likes
|
Last Post
|

Comment