macman, you were once a highly respected member here. Your silence for these last years means that few others will remember you.macman » Tue Oct 24, 2017 8:30 pm wrote:Hi Tommaso,
I recently posted asking if anyone knew of an EA which will zero hedge when a selected margin level is reached. So far no replies so I think maybe it does not exist and now I wonder if you might consider adding it as an option to your APTM.
As I am sure you know, brokers now regularly cut account leverage, often with little warning, so suddenly a 500:1 account can become a 50:1 account. A market movement against your open trades, which would be safe at 500:1, can bring a margin call at 50:1. There are even brokers who lower the leverage for the last hour of the week, making life difficult for any trader who wants to keep trades open during the weekend. I am also sure we will see more of this 'disappearing margin trick' in the future.
To protect against this, the routine would simply zero hedge the total position when account margin drops below the trigger level. This will also protect an account if there is a weekend gap, unlike a stop loss or pending order.
A zero hedge order could be given a 'ZH' comment, which would then allow APTM to control it using the existing managebyordercomment function.
The basic logic is here:
Best regards,
macman
We saw your initial post about this. We ignored it. Now you see fit to post it a second time. We shall continue to ignore it.
People earn the right to make requests of SHF coders by contributing in the first place. You are not a contributor and so do not have the right to make coding requests. Feel free to contact coders privately with an offer to pay for their services. That is entirely between you and them.
In this public forum, stop now, or I will stop you permanently.