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 charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
66 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
149 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
162 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
99 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
286 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|

Comment