Account Protector

Greetings - testing out your EA, aiming for protection if a 15% drawdown occurs, and I would like to close all orders in a FIFO-compliant manner.

Are there any options for "CloseFiles: Close which trades first?" that result in a FIFO close order?
If not, could you add an option like "Close FIFO order" to this input option?
There's currently no option for FIFO closing. Maybe I will add it in the next version. However, the default option (No order, as quickly as possible) will almost always result in the first open position closing first. But that's not guaranteed.
 
  • 👍
Reactions: forexheffe
Hi. Great EA! I did have a bug, potentially. Just hit the equity desired, and it did close all open positions, and turn off the automated trading, but did not close the pending orders, which I did have checked as an action. Or rather it closed them, but then they re-opened. I closed them manually, and as the automated trading had been shut off by that point, they stayed closed. I guess automated trading must be active for Account Protector to work, so it's a race to close with the other EAs trying to open. Manually set pendings wouldn't be a problem.
Ah. I just see that Close All Other Charts has priority... so if I checked that action, it would solve the problem, yes?
 
Hi. Great EA! I did have a bug, potentially. Just hit the equity desired, and it did close all open positions, and turn off the automated trading, but did not close the pending orders, which I did have checked as an action. Or rather it closed them, but then they re-opened. I closed them manually, and as the automated trading had been shut off by that point, they stayed closed. I guess automated trading must be active for Account Protector to work, so it's a race to close with the other EAs trying to open. Manually set pendings wouldn't be a problem.
Ah. I just see that Close All Other Charts has priority... so if I checked that action, it would solve the problem, yes?
Yes, closing all charts with other EAs should solve this.
 
When does the Equity Snapshot update it's values - how often does this take place. It has been over 20 minutes w/o an update. Seems like that would cause potential problems when using the equity protection settings (like I am). I can send you an image if you would like.1747286147866.png
 
Last edited:
When does the Equity Snapshot update it's values - how often does this take place. It has been over 20 minutes w/o an update. Seems like that would cause potential problems when using the equity protection settings (like I am). I can send you an image if you would like.View attachment 32574
They don't update automatically. That's the point. Which equity protection settings are you using? Conditions that don't mention equity snapshot have nothing to do with equity snapshot even if they are based on equity.
 
They don't update automatically. That's the point. Which equity protection settings are you using? Conditions that don't mention equity snapshot have nothing to do with equity snapshot even if they are based on equity.
I am using the Equity <=% of snapshot. I have it set to 90%. I am trying to have the EA close opened trades if the drawdown hits 10% of equity. Do I need to use the floating loss rises to % of balance instead?
 
I am using the Equity <=% of snapshot. I have it set to 90%. I am trying to have the EA close opened trades if the drawdown hits 10% of equity. Do I need to use the floating loss rises to % of balance instead?
Equity <=% of snapshot set to 90% will work as a 10% equity drawdown condition if you took your snapshot at the right moment - at the point from which you are measuring your drawdown. If you update your snapshot after that, it will be measuring drawdown from a new point. I don't know if you want that or not.

Floating loss as % of balance works the same as Equity <=% of snapshot if the snapshot was taken when there were no open trade (basically, when equity = balance) and there are no further changes to your balance (deposits/withdrawals/trades closing).
 
Equity <=% of snapshot set to 90% will work as a 10% equity drawdown condition if you took your snapshot at the right moment - at the point from which you are measuring your drawdown. If you update your snapshot after that, it will be measuring drawdown from a new point. I don't know if you want that or not.

Floating loss as % of balance works the same as Equity <=% of snapshot if the snapshot was taken when there were no open trade (basically, when equity = balance) and there are no further changes to your balance (deposits/withdrawals/trades closing).
So there is no auto updating option where everytime a trade closes or is initiated that it updates the snapshot? That is only a manual thing - requiring manual updating each time?
 
So there is no auto updating option where everytime a trade closes or is initiated that it updates the snapshot? That is only a manual thing - requiring manual updating each time?
There are some auto-updating options (after all, there's an action in the Actions tab for that), but it's not needed in most use cases. What exactly are you trying to achieve?
 
There are some auto-updating options (after all, there's an action in the Actions tab for that), but it's not needed in most use cases. What exactly are you trying to achieve?
I want all open trades to close if the floating drawdown of equity exceeds 10% of the overall balance. Bascially protect the balance from losing more than 10% during excessive drawdown. I have a system that already incorrporates trailing stop, news filtration and such - but I need an equity protection / balance protection EA to help assist with auto closing trades once a floating drawdown exceeds 10%.