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 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
58 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
61 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
49 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment