I believe you need to set correct automargin parameter without modifying the class methods.
Check out the links
No one has replied
Thanks for the info. I forgot to mention that I plan to do intraday trading.