Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Restrict Placing Orders on Daily Loss/Profit
Collapse
X
-
Hello pvincent,
Thanks for your post.
There is no supported way to prevent manual order submissions through NinjaScript, but you can add logic to a NinjaScript strategy so that strategy will cease firing orders after the Account's realized PnL reaches a certain point.
This can be done by checking the PnL, and then setting a bool that controls your trading logic so the trades no longer fire.
You can see the Unrealized PnL on the account with OnAccountItemUpdate(): https://ninjatrader.com/support/help...itemupdate.htm
Below is a link to examples that will submit an exit order to exit the strategy position and prevent new entries until the next session after the PnL level is reached.
https://ninjatrader.com/support/foru...ples#post93881
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>
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
63 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
88 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
47 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
105 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
63 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment