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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
45 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
31 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
42 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment