Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
deactivate strategy
Collapse
X
-
deactivate strategy
I built a crossover strategy using strategy builder. I then now want the strategy to stop taking trades when the P&L reaches $2000 for example. Can someone please help me out?
Thanks! -
Hello Sharkclub,
Thanks for your post.
You could implement a Daily Profit Limit or a Daily Loss Limit within your NinjaScript strategy.
The Strategy Builder custom series can be used with offsets to do math and subtract the total PnL from yesterday's PnL to get the current PnL and provided an example of how to set a Daily Loss Limit using the Strategy Builder. You could implement similar logic in your script to add a Daily Profit Limit to your strategy.
Please see the example script, DailyLossLimitBuilderExample, in the forum post linked below for how this would be accomplished.
https://ninjatrader.com/support/foru...limit-examples<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
128 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
73 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
116 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
109 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
88 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment