Does anyone have a suggestion for cancelling the stop loss entirely while the market is closed and placing a new stop loss order after the market re-opens? I'd rather have this exposure than exit the order. I also don't want to have to manually manage this due to holidays, etc.
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
Stop loss / Bid gap down before open
Collapse
X
-
Stop loss / Bid gap down before open
I run a long term strategy that uses a stop loss. I hold my positions across the market maintenance periods, weekends, etc. I'm concerned that a major event will occur while the market is closed and that my order will be filled far below my stop loss. I understand that that the market maker supports banding, which will help protect against large gap downs.
Does anyone have a suggestion for cancelling the stop loss entirely while the market is closed and placing a new stop loss order after the market re-opens? I'd rather have this exposure than exit the order. I also don't want to have to manually manage this due to holidays, etc.Tags: None
-
Hello bean3178,
Thanks for opening the thread.
You could add some code to change your stop loss or cancel it just before the close of the market. If you are managing your strategy with Order objects, you can use the ChangeOrder() and CancelOrder() methods as needed. Detecting the end of a session can be done using a SessionIterator.
You could also chose a different order type for stop loss. For example a buy-stop-limit or sell-stop-limit order. Investopedia has a good explanation on the implications and uses - http://www.investopedia.com/ask/answ...ystoplimit.asp
CancelOrder() - https://ninjatrader.com/support/help...ancelorder.htm
ChangeOrder() - https://ninjatrader.com/support/help...hangeorder.htm
SessionIterator.ActualTradingDayEndLocal - https://ninjatrader.com/support/help...oniterator.htm
You may also wish to take a look at the SampleOnOrderUpdate strategy for making your own protective orders that can be managed more freely: http://ninjatrader.com/support/forum...ead.php?t=7499
Please let me know if I can be of further help.JimNinjaTrader Customer Service
-
This is great, thanks. I wasn't aware of those functions.
It looks like a variation of the example provided for these 2 functions may work as well:
I could use an if/else there and either process the stop loss or cancel it. I want to do the same at market open, so that I can wait for volatility to normalize a bit after open.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by LawrenHom, Today, 10:45 PM
|
0 responses
3 views
0 likes
|
Last Post
by LawrenHom
Today, 10:45 PM
|
||
Started by love2code2trade, Yesterday, 01:45 PM
|
4 responses
28 views
0 likes
|
Last Post Today, 10:31 PM | ||
Started by funk10101, Today, 09:43 PM
|
0 responses
7 views
0 likes
|
Last Post
by funk10101
Today, 09:43 PM
|
||
Started by pkefal, 04-11-2024, 07:39 AM
|
11 responses
37 views
0 likes
|
Last Post
by jeronymite
Today, 09:37 PM
|
||
Started by bill2023, Yesterday, 08:51 AM
|
8 responses
44 views
0 likes
|
Last Post
by bill2023
Today, 09:27 PM
|
Comment