Fast market Lesson: Stops can get rejected

Likely bad code.

Code worked exactly as designed. But, bad design on my part to not handle this. I never expected a stop order that was sitting server side to be rejected. Stupid, but mistakes are part of every development process.
 
This seems to be a broker issue. As far as I remember, IB will trigger it even if it is bound for immediate execution. Not a market issue.

Not necessarily. A fast market can jump a stoploss order. Even a stop loss needs a counter party to trade with. If everyone is running for the hills and price has moved far from your stop it may never fill.

That's not how stops work. After triggering it's a market order and there's always a market to trade with, even if far away. If it's stoplimit in which case it can fly past the limit price but that's not what he was using.

Edit: should be noted that this is for futures, my scenario is for equities which is different.
 
This is a crazy strategy. I just saw your limit order. Any trading strategy needs to be aligned with the volatility of the financial instrument.
Your strategy attempts to avoid risk, which will never work. There is no reward without risk.
You must embrace risk, then go from there

Thanks for your reply.

Couple of things:

1) I'm using a a 100% custom/self-developed software stack, and its only recently been put online. Risk is intentionally kept low so I can find issues like this, and not pay a massive price for it. I only trade maybe an hour or so a day while I can sit and watch it do its thing. Trading isn't paying the bills for me (yet :) ).

2) I'm in what I call "Software/Strategy Risk Reduction" phase. My intent is to trade as frequently as I can, learn as much as possible, and basically break even with minimal swings. After data fee's, that's essentially where I am. I'm not done, but I've accomplished what I've wanted to thus far (maybe not as quickly as I'd like...).

3) 100% agree with you, gotta understand and seek risk to make money. Generally speaking, I disagree with the statement that a 2 tick stop is too tight to be profitable with. Obviously, I need to have a high win rate, but my test and real time data suggests that is possible. The wild card here is market volatility, which I don't account for in real time. This wasn't an oversight, just a risk I accepted to more quickly accomplish the goals I stated in bullet 2. I've always known I was "tuned" to a low vol market, but that will be addressed for my "production" strategy.

Good conversation, guys. Personally, I hope vol stays high. Makes things much more interesting.
 
So my trading platform/system was trading for the first time in a fast market today (I shut it down for the last couple of days, out of fear). Market taught me a lesson, and exposed a flaw in my execution logic: The market will reject stop orders if the market is already below the stop price, leaving a position un-hedged. I should have known this.... but I didn't, and almost got bit. Fortunately, I was paying attention and was able to manually step in quickly and turned a 80 tick loss into a 20 tick gain (via luck, not skill).

Moral of the story.... be careful out there, especially when you're auto-trading and your system is walking into unfamiliar territory.
I don't have a time to go through the entire thread but upon reading the first few posts this is my comment:

Yes, the market can jump your stop price for a variety of reasons (fast markets, gaps etc).

Whether your stop loss gets executed in those circumstances depends on the setting of your platform/broker, since it is resting on their servers, not the exchange.

If you're using Rithmic trader to execute trades, read below:

There is a separate settings option that needs to be checked off on the platform in order to have these stops executed in case price jumps through your S/L. I accidentally learned that on one of Rithmic's webinars and had that on ever since (I don't trade with them at the moment). I don't remember though if you have to have your platform on when the price jumps through in order for that to work or it works for all your stops (once the option is activated) because these setting will be saved together with your stop order on Rithmic server. The logic tells me it's the latter one, but since it's your money, it's best to check with them directly (Rithmic, not your broker). But the option is right there buried inside Rithmic trader. Why it's not "on" by the default, is beyond me but what do I know...

Hope that helps.
 
Last edited:
There are stop-orders for futures:

Stop Order Notes

  • The stop order's trigger price is validated differently depending on the market state.
  • During the Continuous market state, a Buy stop order must be > last trade price and a Sell stop order must be < last trade price. Absent a last trade price, the settlement price is used.
  • During the Pre-Open and No Cancel market states, a Buy stop order must be > settlement price and a Sell stop order must be < settlement price.

2nd bullet is exactly my issue. I sent a bracket to Rithmic, my opening limit rested on the exchange and the legs of my bracket rested on rithmics servers until the open was filled. Once rithmic got confirmation of the fill, they sent my target and stop to the exchange. 1-2 milliseconds is all it took for me to miss. I didn't anticipate this being an issue, but I should have.

Right there there is a second flaw in your assumptions:

Once your order (opening the trade) to buy (or sell) get's filled, only your T/P part of the bracket (limit order) will be placed on the exchange. Your S/L, if it is stop market order, can't be on the exchange, it is on Rithmic's server until price goes through it when it get's activated (or not) depending on the settings I described for you earlier.
 
So my trading platform/system was trading for the first time in a fast market today (I shut it down for the last couple of days, out of fear). Market taught me a lesson, and exposed a flaw in my execution logic: The market will reject stop orders if the market is already below the stop price, leaving a position un-hedged. I should have known this.... but I didn't, and almost got bit. Fortunately, I was paying attention and was able to manually step in quickly and turned a 80 tick loss into a 20 tick gain (via luck, not skill).

Moral of the story.... be careful out there, especially when you're auto-trading and your system is walking into unfamiliar territory.

In Rithmic, go to Configure Brackets and check "on" the option to: "convert stops to market on reject".

the webinar I was talking about:

note: video is for trader pro but works the same for non-pro version.

hope that helps,
Greg
 
bad design on my part to not handle this
So curious what did you decide to do in such case? If I understand correctly, the exchange rejected the order because trigger price was outside of the protection range. I don't think there is anything you (or vendor) can do about it. My system re-submits but if I get three rejects (configurable), the strategy is suspended and manual involvement is required from that point.
 
In Rithmic, go to Configure Brackets and check "on" the option to: "convert stops to market on reject".

the webinar I was talking about:

note: video is for trader pro but works the same for non-pro version.

hope that helps,
Greg

Greg,

Thank you! I'm using R|Api, not R-Trader, so I can't do that exactly, but will end up implementing something similar in my own software.
 
Back
Top