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 lightsun47, Today, 03:51 PM
|
0 responses
5 views
0 likes
|
Last Post
by lightsun47
Today, 03:51 PM
|
||
Started by 00nevest, Today, 02:27 PM
|
1 response
10 views
0 likes
|
Last Post
by 00nevest
Today, 03:48 PM
|
||
Started by futtrader, 04-21-2024, 01:50 AM
|
4 responses
46 views
0 likes
|
Last Post
by futtrader
Today, 03:01 PM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
1 response
14 views
0 likes
|
Last Post
by bltdavid
Today, 02:44 PM
|
||
Started by port119, Today, 02:43 PM
|
0 responses
10 views
0 likes
|
Last Post
by port119
Today, 02:43 PM
|
Comment