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 Mindset, 04-21-2026, 06:46 AM
|
0 responses
87 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
132 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
65 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
118 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
67 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment