Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
ProfitTarget turns off trend
Collapse
X
-
Hello Kenb2004,
Welcome to the NinjaTrader forums!
You can come close to creating this with strategy wizard but not exactly. Setting bools requires working with code. You can use user variables to simulate these.
See here for a sample on user variables in the strategy wizard.
You wouldn't be able to set a user variable when profit target fills, but you could use market position to check when flat.
See here for help with checking position in the strategy wizard.Ryan M.NinjaTrader Customer Service
-
Trade once
If an MACrossover makes a condion true, how can I enter the market, with a ProfitTarget and a StopLoss and make that original condition false? So after reaching the ProfitTarget or StopLoss it doesn't make another trade from the original true condition.
Comment
-
In your condition just add a bool variable check along with the cross over check. When it trades then set the bool to false so it would not trade ever again.
Code:if (someBool == true && CrossAbove(...)) { EnterLong(); ... anything else you want it to do.... someBool = false; }Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
672 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
379 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
111 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
577 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
582 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment