Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
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 Lele2k24, Yesterday, 11:24 AM
|
8 responses
27 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
||
Started by Padan, Today, 02:02 AM
|
4 responses
15 views
0 likes
|
Last Post
by Padan
Today, 10:46 AM
|
||
Started by kramnor2001, Yesterday, 02:30 PM
|
4 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 10:44 AM
|
||
Started by eduardodipp7, Today, 10:29 AM
|
0 responses
2 views
0 likes
|
Last Post
by eduardodipp7
Today, 10:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
39 responses
272 views
0 likes
|
Last Post
by f.saeidi
Today, 10:23 AM
|
Comment