Thx
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
stop trading after 2 consecutive losses
Collapse
X
-
Will this Work?
Ninja Trader,
I have spent several hours yesterday looking at posts and the help files for a way to stop trading after consecutive losses. I found the code below in the help files.
if (Performance.RealtimeTrades.TradePerformance.MaxCo nsecLoser > 2)
return;
Is this enough to stop trading or does it require something else I may have overlooked. It seems so much easier than what I ve seen on the forum todate.
BigMike
Comment
-
For regular NinjaScript strategies you can work with the Performance class correct, a sample into this would be found here - http://www.ninjatrader-support2.com/...ad.php?t=19289
The snippet you posted should work for realtime trading to return out of the OnBarUpdate() after 2 consecutive losing trades.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
17 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
120 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
174 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
134 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|

Comment