Automatic order execution by system

#1
Scenario: Suppose current series expiry is on 31st Oct 2013. One lot of PE6100NOV2013 is purchased on 30th Oct 2013 and One lot of PE6050NOV2013 is purchased on 31st Oct 2013. On 31st Oct 2013, previously purchased One lot of PE6100NOV2013 is executed by system automatically.after inquiry with broker, If I came to know that margin was low on 31st Oct 2013 and due to that automatic square off is done by system.

Concerns :
1. If margin was low on 31st October then will buying of PE6050NOV2013 should done successful
2. If margin was low then broker will intimate client using call,SMS or mail to increase to margin prior to 31st October 2013 so that appropriate margin can be maintained on 31st October 2013
3. If margin was low then which order i.e. intra-day order (SELL PE6050NOV2013) or prior purchased option order (SELL PE6100NOV2013) should be executed automatically by system.

So what is the exact process to execute order if margin is low.