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 argusthome, 03-08-2026, 10:06 AM
|
0 responses
61 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
40 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
21 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
23 views
0 likes
|
Last Post
|
||
|
Started by Mindset, 02-28-2026, 06:16 AM
|
0 responses
51 views
0 likes
|
Last Post
by Mindset
02-28-2026, 06:16 AM
|

Comment