GithubHelp home page GithubHelp logo

earnforex / account-protector Goto Github PK

View Code? Open in Web Editor NEW
76.0 10.0 55.0 731 KB

Automate emergency position closing and autotrading termination using a multi-setting expert advisor.

Home Page: https://www.earnforex.com/metatrader-expert-advisors/Account-Protector/

License: Apache License 2.0

MQL4 6.01% MQL5 93.99%
expert-advisor position chart mql5 mql4 mt4 mt5 trading metatrader metatrader-4

account-protector's Introduction

Support Ukraine Badge

Account Protector

Account Protector expert advisor for MT4 and MT5 by EarnForex.com.

Account Protector lets you automate emergency position closing and other important trade management functions using multiple settings available through an easy-to-use chart panel.

You can set one or several conditions from a long list of available ones, configure position/order filters, set trailing stop and break-even trailing, trigger various actions by timer, and have a special emergency button for a quick resolution of unwanted trading situations.

Account Protector - an example chart with Filters tab shown

A very detailed description of the expert advisor can be found here: https://www.earnforex.com/metatrader-expert-advisors/Account-Protector/

You can propose pull requests and fork this project at will.

account-protector's People

Contributors

earnforex avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

account-protector's Issues

Profit/Loss Calculations

I have noticed when using both floating & daily profit/loss with either percent or currency value, that if I have an account that a deposit/withdrawal is made that these values are calculate into the those values. Example is if I want take profit to be at 1,000 and my current trade is at 200 in profit but I deposit 800 the Account Protector will automatically close out all trades since the floating/daily profit has been hit of 1,000. The only way around this is to disable the EA while I wait for my broker to deposit the funds then re-enable after. Is there a way to only calculate profit/loss for trade that are executed and not for deposits/withdrawals that are in the account history?

Screenshot 2023-04-13 at 10 08 39 PM

Screenshot 2023-04-13 at 10 12 07 PM

Feature request: additional “Move SL to profit”

Hello,
Thank you again so much for this amazing EA!

I use the “Profit value (points) to move SL to breakeven” and “Breakeven extra profit value (points)” parameters/settings, and I'm wondering whether you would consider adding extra parameters like that (could be optional, controlled via EA settings window) that have the same purpose of moving SL to breakeven profit:

For example,
I use the existing parameters to set SL to 10 pips once it went over 13 pips. Kind of like TP 1, if you wish.
Then, I use the requested parameters to set SL to 100 pips once it went over 103 pips. Kind of like TP 2, if you wish.
image
And then maybe additional optional sets of parameters could be added for TP 3, TP 4, and so on.

What do you think?

Ea not attaching to any chat

I am using MT4, I added the whole folder to the Expert folder. I'm using other EAs also, they are working.

In the Expert tab, I;m getting an error which says

2022.03.19 02:04:26.418 cannot open file 'c:\Program Files\MetaTrader 4\MQL4\Experts\Account Protector\Account Protector.ex4' [2]

Can you add a action to limit the number of open active trades when a certain filter condition is met?

I use v 1.07 with great satisfaction, but there are 2 issues that bother me:

  1. I found that with certain EAs if there is a parameter that controls the MAX number of trades that the EA can open it can protect us from callout and margin calls. For example, if you make "MaxOrder" parameter = 2 in the Golden Elephant, this EA would not fail even during a large DD. However, when we do that the gains are limited when the market behaves well with minimal DDs. Also, most EAs don't have parameters that control this issue and for most EAs we don't have the source code. So is there a way, instead of turning off Autotrading at a free margin level of X (say 1000%), just to start limiting the number of new trades that can be opened to a certain number but not turning off Autotrading? If this is possible, when the free margin indicates impending peril, we could limit the risk but not shut off trading altogether. The opposite could be also useful - open the full throttle above a certain condition.

  2. The other issue that bothers me is that we cannot activate the EA in a pending mode. Suppose I set up a condition and action - the EA would not do the job if there are no open trades. For example, I mostly turn off auto trading below X free margin, but I can't set up the condition and action if there is no open trade. This requires me to periodically watch the EA and jump in to activate the action when the first trade is placed. This is a drag, because I may just miss an adverse action because of that. Also, if the EA closes all the trades with profits it triggers the action of Account Protector, and in the case above the Autotrade is turned off. This requires me to check periodically in order to reactivate the action when new trades are being placed. The lack of PENDING action that would remain active as long as a condition has not been met even if there are no active trades would make this excellent tool a superb one.

Thanks for considering - Yaron

how are open orders closed?

Hi, how is the order of closed trades in Account Protector?

for martingale systems (example: MG EA) the trade are open in this order:
0.01
0.02
0.04
0.08

If account protector close from first opened trade would be OK because the MG EA will not continue to open other trades.

If account protector close the trade from latest trade (example: 0.08), the MG EA will directly open an new trade with 0.08 if this trade is "no longer opened".

Export settings

Hi.
is possible to export and after import all settings?
if export presets, not export internal settings.
Thanks

(Possible) Issue with “Profit value (pips) to move SL to breakeven” in v1.05

Hello,
Thank you so much for this amazing EA!

I've been using it for the past few weeks.

“Profit value (pips) to start trailing SL” and “Trailing SL value (pips)” seem to be working as expected.
However, either there is an issue with “Profit value (pips) to move SL to breakeven” or I don't understand it right:

When I trade US30 and set this value to 500, I expect that once my profit gets to 500 pips my SL would be set to 0.
Is that correct?
However, instead of this, my SL gets set to -500 and I get kicked out right away with any slight movement of the price not in my direction.

Here are my trades from today, which I was originally placing with a 1,000-pip (point) TP and a 3,000-pip SL, but was getting kicked out with 500 pips in profit:
image

My Account Protector settings:
image

Can you please let me know whether I'm misunderstanding this setting or whether there is an actual issue with it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.