Thanks in advance, Marcelo
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Count Daily Stop Losses
Collapse
X
-
Count Daily Stop Losses
Hi, I'm looking to stop the algo if I get 2 stops in a day, is there any sample I can follow, I tried to use SystemPerformance.AllTrades.LosingTrades.Count but this is just historical. Is there a way of knowing if an order hit the stoploss or any other way to count the daily StopLoss? I am using the managed order approach.
Thanks in advance, MarceloTags: None
-
Hello Marcelo,
Where you have mentioned:
" I tried to use SystemPerformance.AllTrades.LosingTrades.Count but this is just historical."
This is incorrect. The SystemPerformance will contain real-time as well as historical trades.
In OnOrderUpdate() you can detect a stop loss has filled and then increment a counter.
When Bars.IsFirstBarOfSession is true, reset the counter.Chelsea B.NinjaTrader Customer Service
-
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
43 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
21 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
30 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
50 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
40 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment