There it is.
Original Stop was at 524.9. Entry made at 525.15 with 'Limit' Order. Stop Order created immediately. It was SL-M (Trigger at 524.9 and Price 0). I changed stop to 525.5 immediately and clicked 'Update'. NOW complained. See, the order is 'Limit' instead of 'SL'.
We have to figure out why Stop order changed to 'Limit'. It should always be 'SL' or 'SL-M'
Original Stop was at 524.9. Entry made at 525.15 with 'Limit' Order. Stop Order created immediately. It was SL-M (Trigger at 524.9 and Price 0). I changed stop to 525.5 immediately and clicked 'Update'. NOW complained. See, the order is 'Limit' instead of 'SL'.
We have to figure out why Stop order changed to 'Limit'. It should always be 'SL' or 'SL-M'
I just did test - created LIMIT entry, stop created immediately. Then updated stop, updated. So with Zerodha + NOW seems ok. I thought NOW is same for all.
Now in update flow, we do not set ordertype as ordertype change is not supported. Certainly not for stops. So,
1) First try manually, what is stop ordertype if you open modify order of stop from orderbook. Most likely it should be same, but just verify its not reset to LIMIT
2) If 1 is ok, you can try to get used to debugging with Scite. Run Orderman.ahk from scite using debug (F7/Green Bug button). You may need to hit F5/Run for application to start as it stops at first line after F7.
Now, Put breakpoint at start of _submitOrderCommon() in Order.ahk. Then in update flow will stop at that line. Then you can debug line by line and after each line check if it is causing change in Stop order type. We need to check what line in ahk is causing ordertype to be reset to LIMIT.