cdhamo

Trader
Feb 25, 2021
14
0
12
44
Hi. Thank you I got Account Protector to install ok. But now I'm having trouble getting it to work correctly...

In the EA inputs, I have "donotresetconditions" set to to false.
I have conditions set up as: "if floating loss rises to % of balance = 30", and
actions as: "close 100% of losing positions" & "recapture snapshots".

So it was triggered with details, but there aren't any losing positions closed at that time, and the snapshots aren't recaptured, and the conditions haven't been reset.

Please help.

EDIT: Actually I've just found that there were some large losses at 13:50 opposed to 06:50, so this might be the EA closing losing positions. But can you please help me understand how to get the correct time in the Account Protector EA to sync with the time of trades. Also, why isn't it capturing snapshots and resetting?
 

Attachments

  • Account Protector.PNG
    Account Protector.PNG
    328.4 KB · Views: 9
  • 1.PNG
    1.PNG
    21.6 KB · Views: 9
  • 2.PNG
    2.PNG
    41.6 KB · Views: 6
  • 3.PNG
    3.PNG
    20.6 KB · Views: 5
  • Losses.PNG
    Losses.PNG
    106.1 KB · Views: 8

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Hi. Thank you I got Account Protector to install ok. But now I'm having trouble getting it to work correctly...

In the EA inputs, I have "donotresetconditions" set to to false.
I have conditions set up as: "if floating loss rises to % of balance = 30", and
actions as: "close 100% of losing positions" & "recapture snapshots".

So it was triggered with details, but there aren't any losing positions closed at that time, and the snapshots aren't recaptured, and the conditions haven't been reset.

Please help.

EDIT: Actually I've just found that there were some large losses at 13:50 opposed to 06:50, so this might be the EA closing losing positions. But can you please help me understand how to get the correct time in the Account Protector EA to sync with the time of trades. Also, why isn't it capturing snapshots and resetting?
The "Triggered at" message uses local computer time, while what you are seeing in the History tab of the Terminal is server time.
I don't know why recapturing snapshots didn't work in your case. I couldn't reproduce this. Perhaps, there are some hints in the log file (log.txt)?
When DoNotResetConditions = false, conditions are reset upon triggering, which means that the triggered condition becomes disabled.
 

cdhamo

Trader
Feb 25, 2021
14
0
12
44
The "Triggered at" message uses local computer time, while what you are seeing in the History tab of the Terminal is server time.
I don't know why recapturing snapshots didn't work in your case. I couldn't reproduce this. Perhaps, there are some hints in the log file (log.txt)?
When DoNotResetConditions = false, conditions are reset upon triggering, which means that the triggered condition becomes disabled.
Thanks for your reply.
Sorry, I'm confused with your last sentence.
"Do not reset conditions - false, means condition becomes disabled." So if I want to continue as is after a trigger with the same conditions, what should the setting be?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Thanks for your reply.
Sorry, I'm confused with your last sentence.
"Do not reset conditions - false, means condition becomes disabled." So if I want to continue as is after a trigger with the same conditions, what should the setting be?
Condition resetting (to its original state, which always means unticked for all conditions) means that it becomes unticked. So if you do not want a condition to get unticked (reset), but want it to remain ticked, you set DoNotResetConditions to true.
 

adrade

Newbie
Mar 17, 2021
1
0
1
42
Truly excellent EA for account protection. One little thing here... it seems that the Account Protector operates in the order of the list of actions, so it closes all open positions before it disables AutoTrading. In a situation I encountered (on a demo account), in the brief period between the moment it closed all open positions and it disabled AutoTrading, another EA open opened up a position. This case resulted in a stranded position open that the other EA wasn't able to close because AutoTrading was off. My small suggestion to an otherwise amazing tool is to change the order of actions such that AutoTrading would be disabled first, then all positions are closed -or- you just run through the action list twice, so it closes all open positions, then turns off AutoTrading, then again checks once more that all open positions are closed and that AutoTrading is off. Thank you again for an excellent tool!
 

cdhamo

Trader
Feb 25, 2021
14
0
12
44
Hi. I'm using AccountProtector and now using your tips above the EA is restarting after a trigger, but it's not taking a new snapshot of the equity after an event has triggered (even though it's ticked under actions.

(Before capturing these screenshots, I just manually clicked "New snapshot of equity" & New snapshot of free margin" to reset it...)

Any help would be much appreciated :)
 

Attachments

  • AccountProtector.PNG
    AccountProtector.PNG
    187.7 KB · Views: 3

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Truly excellent EA for account protection. One little thing here... it seems that the Account Protector operates in the order of the list of actions, so it closes all open positions before it disables AutoTrading. In a situation I encountered (on a demo account), in the brief period between the moment it closed all open positions and it disabled AutoTrading, another EA open opened up a position. This case resulted in a stranded position open that the other EA wasn't able to close because AutoTrading was off. My small suggestion to an otherwise amazing tool is to change the order of actions such that AutoTrading would be disabled first, then all positions are closed -or- you just run through the action list twice, so it closes all open positions, then turns off AutoTrading, then again checks once more that all open positions are closed and that AutoTrading is off. Thank you again for an excellent tool!
That would be an excellent idea (which of course had visited my mind when I developed the AP), if only it had been possible for the AP (which is basically an expert advisor) to close trades after it disables Autotrading (which means that no expert advisor can trade anymore). :)
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Hi. I'm using AccountProtector and now using your tips above the EA is restarting after a trigger, but it's not taking a new snapshot of the equity after an event has triggered (even though it's ticked under actions.

(Before capturing these screenshots, I just manually clicked "New snapshot of equity" & New snapshot of free margin" to reset it...)

Any help would be much appreciated :)
As I have told, you cannot reproduce this snapshot not recapturing issue. I could try to look for some potential reasons if you provided the log file for the time around triggering.
 

Heddfan

Newbie
Dec 9, 2020
4
0
2
61
Re Account Protector

I can't use the 'logging' option
By default - where is the file 'log.txt' stored?

In Experts Tab, I am only seeing 'Alert: Cannot open......'

Do I need to create a file first


PS Account Protector is really really good!!
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Re Account Protector

I can't use the 'logging' option
By default - where is the file 'log.txt' stored?

In Experts Tab, I am only seeing 'Alert: Cannot open......'

Do I need to create a file first


PS Account Protector is really really good!!
You don't need to create a file. The file is created inside /MQL4/Files/ subfolder (or /MQL5/Files/ if you are using MT5).
 

Heddfan

Newbie
Dec 9, 2020
4
0
2
61
Hello

I'm considering here, if I need to ask you / EarnForex, to see if I can get a custom version of this EA?


I currently run 3x EAs on one terminal

a) monitor Free Margin, when it's < xx.x% then disable auto trading (set doNotResetConditions = True)
b) monitor Free Margin, when it's > xx.x% then enable auto trading (set doNotResetConditions = True)
c) monitor Free Margin, when it's < xx.x% then send out a notification

But his is not ideal, as the FM% changes, of course it's difficult to log the events.

Ideally I would like a single EA that:

When started takes note of the free margin (= open balance)
stops A/T when FM% hits xx.x%,
sends out a single notification - A/T disabled
waits.... restarts when FM% = yy.y%
(and - resets the margin% (clean restart of FM%)
and sends out a single notification - A/T enabled
Loop re-starts

Writes the A/T activities and messages to a log file

xx.x% is typically 70-90%
yy.y% is a value > 100.1% - ie lossy trades are closed and profit has been added



Is that possible?
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Hello

I'm considering here, if I need to ask you / EarnForex, to see if I can get a custom version of this EA?


I currently run 3x EAs on one terminal

a) monitor Free Margin, when it's < xx.x% then disable auto trading (set doNotResetConditions = True)
b) monitor Free Margin, when it's > xx.x% then enable auto trading (set doNotResetConditions = True)
c) monitor Free Margin, when it's < xx.x% then send out a notification

But his is not ideal, as the FM% changes, of course it's difficult to log the events.

Ideally I would like a single EA that:

When started takes note of the free margin (= open balance)
stops A/T when FM% hits xx.x%,
sends out a single notification - A/T disabled
waits.... restarts when FM% = yy.y%
(and - resets the margin% (clean restart of FM%)
and sends out a single notification - A/T enabled
Loop re-starts

Writes the A/T activities and messages to a log file

xx.x% is typically 70-90%
yy.y% is a value > 100.1% - ie lossy trades are closed and profit has been added



Is that possible?
That's possible, but that would require a significant modification of the AP's code and this isn't something I envision as a part of the AP's core. You would probably need to hire someone to code this for you (https://www.earnforex.com/custom-coding-service/).
 

Gahuul

Newbie
Mar 28, 2021
1
0
1
51
Hi,
the EA works fine. Would it be possible to add a function to open a hedge position instead of closing all trades when a condition is hit?
Regards
Marcel
 

cdhamo

Trader
Feb 25, 2021
14
0
12
44
Hi. Could you please explain to me how to use the front panel with examples if you may. Particularly, tick 1, 3 & 4.
 

Attachments

  • 1616999115351.png
    1616999115351.png
    18.7 KB · Views: 2

CARPARK

Trader
Mar 29, 2021
67
23
24
46
Tallinn
Great EA! I have one question: in what order does it close positions? From highest (profitable) value to lowest? Or the other way around?
I am considering using this for FTMO but closing losing trades down first will probably eventually end up with account equity briefly going over my daily limit.

Any advice welcome! And thanks again for all the hard work on the development...
 

Enivid

Administrator
Staff member
Nov 30, 2008
18,533
1,355
144
Odesa
www.earnforex.com
Great EA! I have one question: in what order does it close positions? From highest (profitable) value to lowest? Or the other way around?
You can tell it to close either profitable or losing positions, but the exact order it deletes the actual positions is pretty random. The goal is to delete them as soon as possible without sorting them.
I am considering using this for FTMO but closing losing trades down first will probably eventually end up with account equity briefly going over my daily limit.
Closing an order normally shouldn't affect your equity, as its unrealized loss/profit has already been accounted for in equity. It only affects the balance.
 
  • 👍
Reactions: CARPARK