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

Comment