I am facing a real problem to operate with MetaTrader 5 on option spreads, due to the platform margin calculation system.
I've invested a lot of time and money in developing an Expert Advisor to set up Iron Condor type operations, where I sell a lot of Calls and Puts in the same strike, and buy a larger number of Calls in the next higher strike, as well as Puts in the strike immediately below.
I'll exemplify the problem in a Demo account, although exactly the same thing is happening in my real account.
Well, as shown in the image below, the Demo account in question had no other position before the opening of this operation and had a Balance of $ 92,044.00 which was also its Free Margin:
For example purposes, I set up in this same account a small operation as I mentioned before, broken down in the following table:
Well, as seen above, this operation generates a credit of $ 6,788.99. And here comes the first problem: this credit does not appear anywhere on the platform. It is as if MetaTrader disregarded that this operation gave me credit.
But the problem does not stop there: not only does the platform disregard the credit generated by the operation, but it still consumes me a lot of margin.
In fact, as shown in the screen below, this operation today takes a margin of $ 41,839.00 leaving the Demo account with only $ 50,205.00 of Free Margin:
It turns out that my maximum risk with this operation is $ 10,400.00, corresponding to the difference between the strikes of the short positions and the long positions, multiplied by the volume sold.
That is, the margin that the MetaTrader is considering is more than 4 (four) times greater than the maximum risk of the operation!
If I triple this operation, for example, MetaTrader would calculate a margin of $ 125,517.00 for it and the account would have Free Margin (negative) of approximately - $ 33,473.00.
And when the Free Margin turns negative, the platform no longer accepts orders, neither from EA, nor manuals, returning the error message "No money" or "not enough money", as it has unfortunately occurred in my real account ... knocking down the robot at critical times.
However, in "real life", after tripling this operation, my balance in the brokerage house would be $ 112,410.97, while my total risk, with the operation already tripled, would be a maximum of $ 31,200.00.
That is, I would still have a free margin to operate at the brokerage house of at least $ 81,210.97, but MetaTrader would no longer work ...
And neither the brokerage, nor the stock exchange, charge margin in the amount of the total risk of the operation, so that the platform is presenting a limitation much greater than my operational capacity.
I would like a feedback as soon as possible, so I can finally use the platform and my EA correctly.
Thank you very much in advance.