See in high volatility, the price “gaps” down. If your SL is a Limit order at 100, and the price jumps from 102 to 98, your order will never fill because the price is already below your limit.
This is because of the:
Price Gapping: In fast markets, the LTP (Last Traded Price) skips your specific Limit price.
SL-L vs SL-M: SL-Limit (SL-L) requires a specific price match. SL-Market (SL-M) triggers as soon as the price is hit, but many brokers now restrict SL-M for Options to prevent “freak trades.”
Fix is you have to use a range for SL – Limit orders, use wide difference between your Trigger Price and your Limit Price.
Another fix is buffer set trigger at your exit point but set Limit much lower to ensure it acts like a market order within a protected range.
def place_protected_sl(current_price, sl_points, is_buy=False):
# Example for an existing BUY position (so we place a SELL SL)
trigger_price = current_price - sl_points
# Set limit price 1% lower than trigger to ensure execution in a crash
# This creates a "price range" for the fill
limit_price = round(trigger_price * 0.99, 1)
order_params = {
"symbol": "NIFTY25JAN22500CE",
"qty": 50,
"type": "STOPLOSS_LIMIT",
"side": "SELL",
"trigger_price": trigger_price,
"price": limit_price # The "worst" price you'll accept
}
return order_params
# Input: Bought at 100, SL at 90
sl_order = place_protected_sl(100, 10)
print(f"Trigger: {sl_order['trigger_price']} | Limit: {sl_order['price']}")
# Result: Trigger 90, Limit 89.1 -> Order fills anywhere between 90 and 89.1