In particular I've made the interface for beginning a new backtest a lot simpler by encapsulating a lot of the "boilerplate" code into a new Backtest class. I've also modified the system to be fully workable with multiple currency pairs. In this article I'll describe the new interface and show the usual Moving Average Crossover example on both GBP/USD and EUR/USD.
In a margin account, the broker uses the $1,000 as a security deposit of sorts. If the investor's position worsens and his or her losses approach $1,000, the broker may initiate a margin call. When this occurs, the broker will usually instruct the investor to either deposit more money into the account or to close out the position to limit the risk to both parties.
As part of the Universal Account service, we are authorized to automatically transfer funds as necessary between your securities account and your futures account in order to satisfy margin requirements in either account. You can configure how you want us to handle the transfer of excess funds between accounts on the Excess Funds Sweep page in Account Management: you can choose to sweep funds to the securities account, to the futures account, or you can choose to not sweep excess funds at all.
Trading foreign exchange on margin carries a high level of risk, and may not be suitable for everyone. Before deciding to trade foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. Remember, you could sustain a loss of some or all of your initial investment, which means that you should not invest money that you cannot afford to lose. If you have any doubts, it is advisable to seek advice from an independent financial advisor.
Often, closing one losing position will take the margin level Forex higher than 5%, as it will release the margin of that position, so the total used margin will decrease and consequently the margin level will increase. The system often takes the margin level higher than 5%, by closing the biggest position first. If your other losing positions continue losing and the margin level reaches 5% once more, the system will just close another losing position.
For securities, the definition of margin includes three important concepts: the Margin Loan, the Margin Deposit and the Margin Requirement. The Margin Loan is the amount of money that an investor borrows from his broker to buy securities. The Margin Deposit is the amount of equity contributed by the investor toward the purchase of securities in a margin account. The Margin Requirement is the minimum amount that a customer must deposit and it is commonly expressed as a percent of the current market value. The Margin Deposit can be greater than or equal to the Margin Requirement. We can express this as an equation: