Jeff_Al

Trader
Apr 23, 2021
7
0
17
51
It appears that you are trying to compile the wrong file. Please compile Account Protector.mq4.

Hi. That is the file I am compiling. The mqh opens when I click on one of the errors.

I've gone back to version 1.04 now which has no problems.

Could you perhaps post here the .ex4 file for me of latest version?
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Hi. That is the file I am compiling. The mqh opens when I click on one of the errors.

I've gone back to version 1.04 now which has no problems.

Could you perhaps post here the .ex4 file for me of latest version?
Are you sure you overwritten all three files when copying? It looks like either Defines.mqh or Account Protector.mqh is from an older version.
Anyway, you can always download the release files from our GitHub repository:
https://github.com/EarnForex/Account-Protector
 

EnrichWave

Master Trader
May 15, 2018
382
98
74
India
Dear @Enivid can we use the account protector for the following conditions?

If I have SL for 1% risk and if the profit reach 2% all trades should be closed.

and If I have SL for $100 once the profit reach 2x ($200) it should close all the trades

Regards
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
If I have SL for 1% risk and if the profit reach 2% all trades should be closed.
That can be done using the floating profit % condition if you are talking about the combined profit of all trades.
and If I have SL for $100 once the profit reach 2x ($200) it should close all the trades
This can be done with the floating profit in currency units condition.
 
  • ℹ️
Reactions: EnrichWave

revenuehub

Trader
Nov 15, 2022
2
0
7
36
I have it set up for Equity <= 3060.00 which is -4% of my balance the thing is when it gets there or past it for example -3300.00 it takes no action at all. and on the floating loss rises to % of balance works but dont account for positive trades open for example negative trades open at -4% of balance but positive trades open make it really -3% down it will close all the trades just because the negative trades equal 4% without taking into consideration the open positive trades
 

FFC_JZ

Trader
Nov 15, 2022
3
0
6
46
I have it set up for Equity <= 3060.00 which is -4% of my balance the thing is when it gets there or past it for example -3300.00 it takes no action at all. and on the floating loss rises to % of balance works but dont account for positive trades open for example negative trades open at -4% of balance but positive trades open make it really -3% down it will close all the trades just because the negative trades equal 4% without taking into consideration the open positive trades
I too was wondering why mine didn't trigger. I set my conditions to Equity <= % of snapshot and under actions set it to close all 100%/delete pending orders/disable autotrading and nothing happened. Kept trading. Thankfully it's demo, but need to figure out why it didn't trigger as floating equity was at condition met.
 
Last edited by a moderator:

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
I have it set up for Equity <= 3060.00 which is -4% of my balance the thing is when it gets there or past it for example -3300.00 it takes no action at all.
Is your account balance 3188? How can your equity reach -3300?
and on the floating loss rises to % of balance works but dont account for positive trades open for example negative trades open at -4% of balance but positive trades open make it really -3% down it will close all the trades just because the negative trades equal 4% without taking into consideration the open positive trades
Are you sure? I've just checked and it didn't close until the total floating loss of all trades didn't rose to the given percentage value. Do you perhaps use any filters? Also, you can check the Account Protector's log file to see some info about the triggered condition.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
I too was wondering why mine didn't trigger. I set my conditions to Equity <= % of snapshot and under actions set it to close all 100%/delete pending orders/disable autotrading and nothing happened. Kept trading. Thankfully it's demo, but need to figure out why it didn't trigger as floating equity was at condition met.
A screenshot would be helpful, but did you tick the condition's checkbox after you've set the % value? Was the Status at the top of the panel saying "OK"? Did you apply any filters?
 

FFC_JZ

Trader
Nov 15, 2022
3
0
6
46
A screenshot would be helpful, but did you tick the condition's checkbox after you've set the % value? Was the Status at the top of the panel saying "OK"? Did you apply any filters?
1668530816504.png1668530782145.png

And equity drew dawn all the way to 800
 

Attachments

  • 1668530763869.png
    1668530763869.png
    41 KB · Views: 3
Last edited by a moderator:

Gulfstream550

Trader
Nov 15, 2022
2
0
6
68
Greetings from 34.052235N, -118.243683W

First, let me commend you on a job well-done and seriously needed piece of software; nicely done!
Second, I have taken the time to read the entire description/specification manual posted on EarnForex.com, as well as all 32 pages of the thread on this software; got a lot of questions answered there. So I have about a 98% clear understanding as to how it works and how to use it (takes a bit of mental gymnastics though). That said, I still have some questions that are not clear to me, so here they are in no particular order (I refer to your software as the "AP").


  1. Re: "Filters"---I found this to be the most confusing, least intuitive of the 4 tabs. And the 3 sentence explanation really didn't provide much help in understanding this section either. So here's the specific things that I found confusing in the description/spec sheet: Magic Numbers box; you show #'s separated by semi-colon (is this the official & only format to enter these numbers?), the 5 bullet points; "...trading instruments" (I assume you mean currency pairs?) although I know some brokers trade in more than just Forex, the 5 bullet points again; (I have no understanding exactly what to do with these 5 selections; explain how they're used), Filtering by “Commentary”; I don’t understand exactly what this means, especially since you've provided several ways of doing it (contains, excludes, equals, not equals), please explain further exactly how this operates), and finally, "ignore losing/profitable trades" How does this work. I assume that all the selections on the Filter tab, somehow, work in conjunction with other selections in the Main, Conditions and, Actions tabs, thus the confusion.
  2. Re: S-L’s (example scenario): If I am using a trading EA and I pre-set my S-L, B/E and/or T-S-L in the trading EA prior to a trade being opened…BUT, I have more controlling (stringent) settings in the AP, does the AP have the ability to override what’s set in the trading EA? OR…do the S-L, B/E, & T-S-L Input Variables of the trading EA have to be undesignated so the AP can control these functions solely without any software conflict?
  3. I had no problem installing the AP, however, under the “Conditions” tab, I have 14 Conditional choices displayed to control trading. However, in the AP description/ instruction manual on EarnForex.com, there are 33 Conditions displayed in that photo. It appears as though some of the operational functions are missing (or have been removed in a new updated version). Is my download displaying correctly? And if not, what exactly needs to be done to correct this issue? My download is Version is 1.08 (6-16-2022). I saw no version update listing beyond the version I have.
  4. Per posting # 310, page 16 in the Account Protector forum, you reply to an inquiry by stating “It failed to close some orders due to some temporary reason…” Questions: What are the temporary reason(s) that would be applicable to a situation like this? Furthermore, is the software coded for iterations (retry’s) to carry out a function until that operational function is 100% complete?
  5. Post #546---"AP can’t protect against a price spike if price spikes beyond the SL level that is set in the AP software." I'm assuming that all operational functions of the AP that can control any trade variable operation is being carried out by the software on the MT platform and never "talks" directly with the brokers server. If this is basically true, then.........Question: Since the AP does not actually place trade entries or settings, is the solution to this anomaly to always set a hard SL that is actually sent to the brokers server to protect against any possible spike that bypasses the Account Protector’s pre-set protection level? In other words, should the trade entry software (or a manual trade entry if done that way) always set a hard back-up SL (sent to the brokers server) by a small amount just beyond the selected AP level as back-up protection to the AP just in case price does spike and gets past the AP.
Thanks for your time and indulging me in my inquiries. I look forward to your responses.

Regards
 

FFC_JZ

Trader
Nov 15, 2022
3
0
6
46
Your condition, as you set it, will trigger when equity goes to or below 15% x 1209.35 = 181.40.
You probably need to input 85 there instead of 15.
OH! So in my head it's backwards thinking! So it's not 15% below the equity. It's how much is left of the equity. I see. Thanks! I'll make the adjustment
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Re: "Filters"---I found this to be the most confusing, least intuitive of the 4 tabs. And the 3 sentence explanation really didn't provide much help in understanding this section either. So here's the specific things that I found confusing in the description/spec sheet: Magic Numbers box; you show #'s separated by semi-colon (is this the official & only format to enter these numbers?), the 5 bullet points; "...trading instruments" (I assume you mean currency pairs?) although I know some brokers trade in more than just Forex, the 5 bullet points again; (I have no understanding exactly what to do with these 5 selections; explain how they're used), Filtering by “Commentary”; I don’t understand exactly what this means, especially since you've provided several ways of doing it (contains, excludes, equals, not equals), please explain further exactly how this operates), and finally, "ignore losing/profitable trades" How does this work. I assume that all the selections on the Filter tab, somehow, work in conjunction with other selections in the Main, Conditions and, Actions tabs, thus the confusion.
The Magic Numbers field will also recognize comma and space as a separator. Yes, "trading instrument" = "currency pair" if you trade Forex. The radio button choices do exactly what they say. The "Commentary" field can be used to filter trades by their commentary. If you set "Ignore losing trades", it will ignore them when calculating profit/loss and when closing trades.
Re: S-L’s (example scenario): If I am using a trading EA and I pre-set my S-L, B/E and/or T-S-L in the trading EA prior to a trade being opened…BUT, I have more controlling (stringent) settings in the AP, does the AP have the ability to override what’s set in the trading EA? OR…do the S-L, B/E, & T-S-L Input Variables of the trading EA have to be undesignated so the AP can control these functions solely without any software conflict?
Other EAs will still try to do their thing while the AP will be doing its thing. In case of SL/TP, it doesn't mean much trouble as the AP doesn't modify SL/TP explicitly. With trailing stop, they will likely compete with each other. The AP doesn't control what other EAs do. The best it can offer is to disable autotrading (one of the Actions), but it will disable autotrading for itself too, and close the platform, which will just turn off everything.
I had no problem installing the AP, however, under the “Conditions” tab, I have 14 Conditional choices displayed to control trading. However, in the AP description/ instruction manual on EarnForex.com, there are 33 Conditions displayed in that photo. It appears as though some of the operational functions are missing (or have been removed in a new updated version). Is my download displaying correctly? And if not, what exactly needs to be done to correct this issue? My download is Version is 1.08 (6-16-2022). I saw no version update listing beyond the version I have.
There are input parameters that disable showing those additional conditions. Switching those input parameters from true to false, will do the thing.
Per posting # 310, page 16 in the Account Protector forum, you reply to an inquiry by stating “It failed to close some orders due to some temporary reason…” Questions: What are the temporary reason(s) that would be applicable to a situation like this? Furthermore, is the software coded for iterations (retry’s) to carry out a function until that operational function is 100% complete?
Normally, the AP tries to close all orders and loops through the orders until it closes 100% of orders it is supposed to close. The situation described in that post has two parts. It will only stop doing it if the "Disable autotrading" action was ticked and it disabled autotrading before it succeeded closing all orders. It will do two attempts to close all orders before proceeding to the "Disable autotrading" action. If that action wasn't ticked, it will continue trying to close everything indefinitely.
Post #546---"AP can’t protect against a price spike if price spikes beyond the SL level that is set in the AP software." I'm assuming that all operational functions of the AP that can control any trade variable operation is being carried out by the software on the MT platform and never "talks" directly with the brokers server. If this is basically true, then.........Question: Since the AP does not actually place trade entries or settings, is the solution to this anomaly to always set a hard SL that is actually sent to the brokers server to protect against any possible spike that bypasses the Account Protector’s pre-set protection level? In other words, should the trade entry software (or a manual trade entry if done that way) always set a hard back-up SL (sent to the brokers server) by a small amount just beyond the selected AP level as back-up protection to the AP just in case price does spike and gets past the AP.
The SL you set to the trade explicitly is broker-side, whereas AP is executing client-side. That makes the normal SL more reliable than AP's implicit "SL". However, even a server-side stop-loss doesn't guarantee that the trade will be closed at a given level (see flash crashes).
 

Gulfstream550

Trader
Nov 15, 2022
2
0
6
68
The Magic Numbers field will also recognize comma and space as a separator. Yes, "trading instrument" = "currency pair" if you trade Forex. The radio button choices do exactly what they say. The "Commentary" field can be used to filter trades by their commentary. If you set "Ignore losing trades", it will ignore them when calculating profit/loss and when closing trades.

Other EAs will still try to do their thing while the AP will be doing its thing. In case of SL/TP, it doesn't mean much trouble as the AP doesn't modify SL/TP explicitly. With trailing stop, they will likely compete with each other. The AP doesn't control what other EAs do. The best it can offer is to disable autotrading (one of the Actions), but it will disable autotrading for itself too, and close the platform, which will just turn off everything.

There are input parameters that disable showing those additional conditions. Switching those input parameters from true to false, will do the thing.

Normally, the AP tries to close all orders and loops through the orders until it closes 100% of orders it is supposed to close. The situation described in that post has two parts. It will only stop doing it if the "Disable autotrading" action was ticked and it disabled autotrading before it succeeded closing all orders. It will do two attempts to close all orders before proceeding to the "Disable autotrading" action. If that action wasn't ticked, it will continue trying to close everything indefinitely.

The SL you set to the trade explicitly is broker-side, whereas AP is executing client-side. That makes the normal SL more reliable than AP's implicit "SL". However, even a server-side stop-loss doesn't guarantee that the trade will be closed at a given level (see flash crashes).

Thanks for the reply; they answered most of my questions.
 
Last edited by a moderator:

Crypto Beaver

Newbie
Dec 16, 2022
2
0
1
46
Hi!
Would it be possible to add just one option, to add a fix SL as well? Like this we could do quick trade and automatically have a fix SL applied in addition to the trailing SL.
Thanks!
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Hi!
Would it be possible to add just one option, to add a fix SL as well? Like this we could do quick trade and automatically have a fix SL applied in addition to the trailing SL.
Thanks!
I will consider that, but there are already scripts available for setting SL fast on all trades.
 

hinde.usr

Trader
Dec 15, 2022
7
2
8
8000 Belgium
Hi, first of all thanks for this great piece of software.

I would like to ask if it would be possible to include the following in the ea:
When the timer gets triggered it automatically gets turned off after the trigger.
Would it be possible to add: "DoNotDisableTimer" so the timer doesn't get disabled after it gets triggered.