Suppose i punch AMO to buy a scrip at 100(limit order) and AMO stop order at 98(SL-M), but market opens at 96(gap down), what will happen to my position?

Both your orders will get executed, so you would have bought around 96 and sold around 96.

Your first order in AMO is Buy Limit Order with earlier timestamp.
Your second order is a sell Stop Loss Order - Market SL-M with later timestamp.
Your first order will be in the queue earlier than the second order.
Also there are few orders standing in front of your order for the same scrip (people who placed orders earlier than you, people whose orders are from some other brokers etc.,)
Assuming even the orders in front of you could not change the price to >96 and price stays below 96.
Your buy order will execute first, buying the stock or position at say 95.85 or something (best available market price)
Then immediately you stop loss order will execute say at 95.85 or closer say 95.90 etc., (best available market price)
Whatever the case may be you will incur a less small loss, if liquidity is high.
This is as per my understanding. Hope you are clear now!

P.S: If your first order is Stop Loss order Sell (if you placed in AMO, Sell order first and then Buy order, based on timestamp), then it will check for margin requirement, if it is options or futures, margin required will be very high. If you dont have sufficient funds for shorting, then your order will be rejected.

Only your Buy Limit order will execute.


wonderfully explained, thanks @AastroGuru