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, 05-11-2026, 05:56 AM
|
0 responses
53 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|
||
|
Started by CarlTrading, 05-10-2026, 08:12 PM
|
0 responses
32 views
0 likes
|
Last Post
by CarlTrading
05-10-2026, 08:12 PM
|
||
|
Started by Hwop38, 05-04-2026, 07:02 PM
|
0 responses
195 views
0 likes
|
Last Post
by Hwop38
05-04-2026, 07:02 PM
|
||
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
356 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
275 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|

Comment