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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
64 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
35 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
59 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
51 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment