Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Ok to call SetStopLoss multiple times
Collapse
X
-
Ok to call SetStopLoss multiple times
Is it ok for a strat to call SetStopLoss multiple times with different values from a single OnBarUpdate call? Will this generate multiple order modifies or is Ninja smart enough to collapse those into a single modify if the price has changed on the last call?Tags: None
-
Ok, that is kind of what I expected, so I should be sure to calc the final value and set just once.
However, that brings up another question. How often is too often for doing an order modify? For example, as an instrument moves quickly, can a strat update a trailing stop many times per sec, or should it be limited to some number of updates per sec? Similar for entries or targets.
Certainly, using OnOrderUpdate to limit updates while an order modification is pending makes sense, but is there a recommended best practice?
This is for managed orders.Last edited by aslane; 09-23-2019, 04:53 AM.
Comment
-
Hello aslane,
That depends on the brokerage.
The Sim101 shouldn't have a problem unless there are so many so rapid the CPU is maxed out.
A brokerage account may have a limit. Contact your broker to find out the limit of order messages per second for your brokerage.Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
88 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
135 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
68 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
119 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
69 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment