... thats when you get a margin call.
So if you were in profit with open trades, this profit could theoretically be used as margin for new trades? Thanks paul, thats what I've coded but wasn't too sure if it was right.
I've coded up the behaviour of Brokers to allow for the testing of money management rules as well as system rules. Each trading account has two balances, an open and a close. So I could theoretically use either in a money management rule system. I'm currently coding up a money management system that allocates a small percentage of the entire account to be used as margin. In a portfolio situation, this percentage of the account is further divided by the historical maximum concurrent open trades. Working out pretty good... with a negative expectation system :O) it stops you going bust for up to 10 years, long enough to learn a lot of lessons and realise you'd be better off scrapping it!
Happy new year.