Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Profit target reached, how to stop strategy?
Collapse
X
-
Profit target reached, how to stop strategy?
I am running a simple automated system on the eminis with a single indicator, built with the Strategy Wizard. My question concerns profit targets. My goal is for the system to reach a given profit target and then to stop trading for the day once it has been reached even if the original entry condition is still true on the following bars. My problem is that I can't get it to stop entering trades even after the target is reached. I have tried to correct this using "realized PnL" (i.e. don't enter if the PnL for the day has hit $700) but it doesn't backtest properly with the Strategy Optimizer. Is there any other way to accomplish this or am I using "realized PnL" incorrectly?Tags: None
-
I can't think of an approach in the wizard that could be done easily. Of course this can be done programattically.
Here is a reference sample for this - http://www.ninjatrader-support.com/v...ead.php?t=4084RayNinjaTrader Customer Service
-
Thanks, I've output the code from the Strategy Wizard and added your suggested lines. However, when I go to compile, I'm getting CSO103 errors for "priorTradesCumProfit" and "priorTradesCount":
"The name "priorTradesCount" does not exist in the current context."
Any suggestions (admittedly I don't know much about this area, my first foray out of the safety of the Wizard)? Thanks very much.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
111 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
60 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
38 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
43 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
79 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment