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-examplesBrandon H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ageeholdings, Today, 07:43 AM
|
0 responses
6 views
0 likes
|
Last Post
by ageeholdings
Today, 07:43 AM
|
||
Started by pibrew, Today, 06:37 AM
|
0 responses
4 views
0 likes
|
Last Post
by pibrew
Today, 06:37 AM
|
||
Started by rbeckmann05, Yesterday, 06:48 PM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 05:43 AM
|
||
Started by llanqui, Today, 03:53 AM
|
0 responses
6 views
0 likes
|
Last Post
by llanqui
Today, 03:53 AM
|
||
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
12 views
0 likes
|
Last Post Today, 12:38 AM |
Comment