AmiBroker IBController session was terminated 10 min before market close

I am using Amibroker interfacing with my Interactive Broker account. I have developed a few AFL programs to handle automatic trading.

However, I encounter a serious problem! Whenever it is 10 min before the close of the market, it would terminate my Amibroker session without any negotiation with the attached message. Even after I re-enter Amibroker, all the memories in my AFL programs are lost.

margin%20warning

Their reason is because if I want to stay my position overnight, I need to have more margin. However, my plan is to close the position just right before the close of the market, not at the 10 min before the market close.

Is there any means to suppress this kind of “sudden kickout”?

@roger this does not seem an AmiBroker problem.

To me, it seems something that you have to ask directly to Interactive Brokers since the message is triggered by them. I suggest you to contacte their support and see if there is a way to avoid such alert.

1 Like

You need to contact Interactive Brokers. It seems that you are making trades that exceed some of their quotas/margin limitations. It has nothing to do with AmiBroker. It is rather about your account funding.