I run an automated strat that often kicks out and rejects orders as the spread of the instrument I am trading widens or if the order level is too close to market.
Usually for Hang Seng where the PRT rejection message is ‘Order level is too close to current market. The minimum distance for this market is 100.’
Note this only kicks out when IG increase their minimum distance from the normal intraday level, all other times the code works.
Is there a piece of script I can input that looks for such rejections and then submits the order that complies with the min distance and hence will not be rejected by IG?
Thanks