• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:12am
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:12am
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

Difference between Total equity and Realized equity? 4 replies

Equity growth calculator 6 replies

Leverage Equity....Bigger Bets, More Reward, Less Risk?!?! 3 replies

Traling Equity STOP Feature? 0 replies

Newb question about equity and Wealth builder 3 replies

  • Trading Systems
  • /
  • Reply to Thread
  • Subscribe
  • 28
Attachments: Equity Guardian EA
Exit Attachments

Equity Guardian EA

  • Last Post
  •  
  • Page 1 23456 8
  • Page 1 234 8
  •  
  • Post #1
  • Quote
  • First Post: Edited Feb 23, 2021 5:54am Jun 2, 2020 5:08am | Edited Feb 23, 2021 5:54am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Equity Guardian EA

This little EA is designed to protect your account from unexpected drawdowns and/or lock in profits.

Note:

  1. It does NOT place orders.
  2. It does NOT amend existing orders.
  3. It can be used alongside any other EA or manual strategy that you care to use.


Features

  1. Monitors EQUITY, not simply floating profit/loss.
  2. Can monitor all trades, trades submitted by any EA or trades submitted by a specific EA.
  3. Closes all monitored trades if equity falls below a specified loss limit (expressed in either an amount or a percentage of the opening balance)
  4. Closes all monitored trades if equity reaches a specified profit target.
  5. Can disable auto trading when close is triggered.


Example Information Panel

Attached Image


Parameters
Attached Image (click to enlarge)
Click to Enlarge

Name: Screenshot1.png
Size: 71 KB


The parameters should be self-explanatory, but for clarification:

Currency pairs

  1. All pairs
  2. Current pair only

Magic Number to Monitor for

  1. 0 = None : The EA will monitor ALL trades regardless of their magic number.
  2. -1 = All EA trades : The EA will monitor and control only trades submitted by an EA, i.e. trades opened manually will not be affected or included in the profit/loss calculations.
  3. >0 = Only trades for the requested magic number will be monitored.

Date of opening balance
The date and time that EA is to calculate the initial balance from.

Refresh interval
How often the EA checks the equity (in seconds).

Close values

  1. Percentage of balance - the profit and loss figures are a percentage of the initial balance.
  2. Amount of money - the profit and loss figures are a specific amount (in the account currency).

Profit target
The profit point at which the EA will be triggered (e.g. 10% profit or $100 profit, depending on the Close Basis).
If set to zero, the EA will not check for a profit amount, and will never close while the account is in profit.

Loss limit
The loss point at which the EA will be triggered (e.g. 5% loss or $100 loss, depending on the Close Basis).
If set to zero, the EA will not check for a loss amount, and will never close while the account is in loss. THIS IS NOT RECOMMENDED!

Include commission?
Whether or not to include commission ans swap fees when calculating the current profit amount.

Close based on date/time?
Whether or not to close all trades (regardless of profit or loss) at a specific date and time.

Date and time to close
Self-explanatory.

Close pending orders?
Whether or not to close pending orders when the close is triggered.

Disable AutoTrading?
When set to true, the EA will disable AutoTrading when triggered.

Enable trailing profit?
Whether or not to enable the trailing profit feature.

Trailing profit trigger level
The point (in either percentage of opening balance or a specific amount - see Close values parameter) at which the trailing profit is triggered.

Trail profit by
The distance behind the current profit the trailing profit should be kept at.

Trailing profit step
The amount by which the trailing profit is to be moved each time.


Version 1.141:

  1. Expiry date extended to end June 2021.

Attached File
File Type: ex4 Equity Guardian 1.141.ex4   99 KB | 36 downloads | Uploaded Feb 23, 2021 5:53am


Version 1.14:

  1. Tidy up processing around profit target being hit.
  2. Don't check if profit target has been reached is set to zero.
  3. Don't check if max loss reached if zero.

Attached File
File Type: ex4 Equity Guardian 1.14.ex4   97 KB | 922 downloads | Uploaded Jun 28, 2020 7:58am



Version 1.13:

  1. Bug fix: stop current trailing profit resetting itself.
  2. Bug fix: when resetting by turining on AutoTrading, use today's date for calculation of opening balance.

Attached File
File Type: ex4 Equity Guardian 1.13.ex4   96 KB | 697 downloads | Uploaded Jun 6, 2020 8:46am



Version 1.12:

  1. Bug fix: corrected trailing profit function (properly this time!).
  2. Corrected calculation of opening balance for new accounts.
  3. Corrected the trigger for scheduled close.
  4. Added details to notifications.

Version 1.11:

  1. Bug fix: stop crash on new accounts.
  2. Bug fix: corrected trailing profit function.

Version 1.10:

  1. Added option to monitor just the current symbol.
  2. Added option to close pending orders.
  3. Added option to trail profit.
  4. Added option to send notifications.
  5. Added option to include commission and swaps in profit calculation.
  6. Added option to trigger close on specific date and time.
  7. Various changes to the information panel.
  8. Corrected the calculation for the opening balance.

Version 1.00:

"Pips are vanity. Profit is sanity."
  • Post #2
  • Quote
  • Jun 2, 2020 5:38am Jun 2, 2020 5:38am
  •  Degolep
  • Joined Oct 2017 | Status: Member | 932 Posts
Good job as always.

You run it only on monday? The default settings are the ones you are using?
Anything above the line is an uptrend, below the line is a downtrend.
  • Post #3
  • Quote
  • Jun 2, 2020 6:01am Jun 2, 2020 6:01am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting Degolep
Disliked
Good job as always. You run it only on monday? The default settings are the ones you are using?
Ignored
Thanks buddy!

I assume that you're talking about this EA, yes?

I start it on Sunday evening (it can be earlier if you wish) with the Monday start date for the initial balance. Once it's active, it will stay active until the desired profit or loss is hit, and will then deactivate AutoTrading (if you have it set). After that, I simply wait until the weekend (or following Sunday) and then activate AutoTrading again, and the EA resets itself automatically, calculating the new balance as of the point you reactivate AutoTrading.

The settings are simply down to what profit target and loss limit you want to use.
"Pips are vanity. Profit is sanity."
3
  • Post #4
  • Quote
  • Jun 2, 2020 6:44am Jun 2, 2020 6:44am
  •  Aar
  • Joined Nov 2015 | Status: Happy New Year | 486 Posts
So simple and at the same time very effective. Thank you very much for sharing.

One question, when closing at loss does it consider the closed/realized losses? What i mean say i don't want to lose more than 500$ after activating the ea, so when will all the orders get closed, at -500$ floating equity? Or, say due to stoploss already 200$ loss realized, so -300$ floating equity ea will close all orders?

Best Regards.
How big can you think!
  • Post #5
  • Quote
  • Jun 2, 2020 7:27am Jun 2, 2020 7:27am
  •  rskdev
  • | Joined May 2018 | Status: Member | 38 Posts
Thanks man. This will come in very handy. Looks easy to use also.
  • Post #6
  • Quote
  • Jun 2, 2020 8:31am Jun 2, 2020 8:31am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting Aar
Disliked
So simple and at the same time very effective. Thank you very much for sharing. One question, when closing at loss does it consider the closed/realized losses? What i mean say i don't want to lose more than 500$ after activating the ea, so when will all the orders get closed, at -500$ floating equity? Or, say due to stoploss already 200$ loss realized, so -300$ floating equity ea will close all orders? Best Regards.
Ignored
The loss you enter is the loss it will monitor for.

So, to use your example:
Opening balance is, say, $10,000.
You set max loss to $500.
The close won't trigger until your EQUITY (i.e. both realised and floating profit/loss) reaches $9,500.

So, if you have some trades that close, realising $200 profit, your balance will be at $10,200, but the EA is still looking to close if the EQUITY touches $9,500.

Hope this helps.
"Pips are vanity. Profit is sanity."
3
  • Post #7
  • Quote
  • Jun 2, 2020 9:50am Jun 2, 2020 9:50am
  •  Aar
  • Joined Nov 2015 | Status: Happy New Year | 486 Posts
Quoting PaulDV
Disliked
{quote} The loss you enter is the loss it will monitor for. So, to use your example: Opening balance is, say, $10,000. You set max loss to $500. The close won't trigger until your EQUITY (i.e. both realised and floating profit/loss) reaches $9,500. So, if you have some trades that close, realising $200 profit, your balance will be at $10,200, but the EA is still looking to close if the EQUITY touches $9,500. Hope this helps.
Ignored
Amazing. Thank you.

Best Regards.
How big can you think!
  • Post #8
  • Quote
  • Jun 2, 2020 11:47am Jun 2, 2020 11:47am
  •  driven18
  • | Joined Jul 2012 | Status: Member | 752 Posts
Paul, I have used it already and works great....

I am treating every day as a new day....is there anyway to have a parameter

"Start Guarding Equity at " " 0000(as an example)
"Close All Trades at = " " 2259(as an example)

Guardian then will start anew everyday and exit all trades at specific time, profit or loss.
  • Post #9
  • Quote
  • Jun 2, 2020 1:23pm Jun 2, 2020 1:23pm
  •  blamshakk
  • Joined Mar 2010 | Status: Member | 2,006 Posts
thanks for the EA PaulDV. I think maybe this thread would be better placed in the 'platform tech' section

blam
1
  • Post #10
  • Quote
  • Jun 2, 2020 5:44pm Jun 2, 2020 5:44pm
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting blamshakk
Disliked
thanks for the EA PaulDV. I think maybe this thread would be better placed in the 'platform tech' section blam
Ignored
I think you’re right, but I don’t seem to be able to find how to move the thread. Any ideas?
"Pips are vanity. Profit is sanity."
1
  • Post #11
  • Quote
  • Jun 2, 2020 7:31pm Jun 2, 2020 7:31pm
  •  Erebus
  • Joined Jul 2011 | Status: Member | 5,715 Posts | Online Now
Quoting PaulDV
Disliked
{quote} I think you’re right, but I don’t seem to be able to find how to move the thread. Any ideas?
Ignored
I reported it, and you’re still here

The two most powerful warriors are patience and time. Leo Tolstoy
  • Post #12
  • Quote
  • Jun 2, 2020 10:22pm Jun 2, 2020 10:22pm
  •  timidave
  • | Joined Nov 2007 | Status: Member | 459 Posts
This is really cool. Well done Paul.
  • Post #13
  • Quote
  • Jun 3, 2020 2:49am Jun 3, 2020 2:49am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting Erebus
Disliked
{quote} I reported it, and you’re still here
Ignored
Yup, still here!
"Pips are vanity. Profit is sanity."
1
  • Post #14
  • Quote
  • Jun 3, 2020 3:03am Jun 3, 2020 3:03am
  •  goodways100
  • Joined Dec 2013 | Status: Member | 609 Posts
Could it have a time close, like close on next date 4 gmt in the morning whatever the prof or loss..
I have to wake up by alarm early in the morning to close trades.
Thanks and reggards
  • Post #15
  • Quote
  • Jun 3, 2020 3:13am Jun 3, 2020 3:13am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting goodways100
Disliked
Could it have a time close, like close on next date 4 gmt in the morning whatever the prof or loss.. I have to wake up by alarm early in the morning to close trades. Thanks and reggards
Ignored
Already on the list of improvements!
"Pips are vanity. Profit is sanity."
  • View Post
  • Disliked by Thread Starter
  • dokopy
  • Post #17
  • Quote
  • Jun 3, 2020 4:07am Jun 3, 2020 4:07am
  •  baaao
  • | Joined Apr 2020 | Status: Member | 11 Posts
thanks for posting this do yu have semi martingale ea?
  • Post #18
  • Quote
  • Jun 3, 2020 5:09am Jun 3, 2020 5:09am
  •  falanca
  • | Joined Sep 2007 | Status: Member | 320 Posts
Can we add 'partially trail stops' option for the orders eitherly to that EA.
And if we say false for' disable trade on close option',it would work uninterruptly isnt it
  • Post #19
  • Quote
  • Edited at 6:18am Jun 3, 2020 5:43am | Edited at 6:18am
  •  PaulDV
  • Joined Jan 2018 | Status: Member | 748 Posts
Quoting falanca
Disliked
Can we add 'partially trail stops' option for the orders eitherly to that EA. And if we say false for' disable trade on close option',it would work uninterruptly isnt it
Ignored
The next version includes a trailing profit option.

This works similar to a trailing stop, except that it keeps a track of profit, not stop levels.

e.g.:
Trailing profit trigger = $250
Trailing distance = $100
Trailing step = $10

In this example, when the profit hits $250, the trailing profit is triggered.
The trailing profit is moved to $100 behind the current profit ($150)
When the profit increases to $260 (so, +$10 - the 'step'), the trailing profit will be moved again to within $100 of the new profit ($160).

If the price retraces, and the profit falls below the trailing profit, the close is triggered.

You can set the profit target to zero, and use the trailing profit to lock in as much as possible.
"Pips are vanity. Profit is sanity."
3
  • Post #20
  • Quote
  • Jun 3, 2020 8:24am Jun 3, 2020 8:24am
  •  falanca
  • | Joined Sep 2007 | Status: Member | 320 Posts
No ı ment 'partial trail stops option for the orders merely
  • Trading Systems
  • /
  • Equity Guardian EA
  • Reply to Thread
    • Page 1 23456 8
    • Page 1 234 8
0 traders viewing now
  • More
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021