Automatic Equity Manager

 

Please find the attached EA.

I modified the original version of EquityManagerV2 by Don Perry and Gene Katsuro.

This will (should) automatically close all trades when your balance shows a gain of X percent.

I'm not a coder, feedback is appreciated, please make any corrections as necessary.

Just open another chart and attach the EA.

 

There was a bug in calculating percent! It must be difference between equity and balance, before dividing it by balance and multiplying with 100.

 

Hi all,

Would it be possible to change the above EA to close only the open orders and leave the pending orders?

Thanks in advance

Basza

 

I also posted another utility EA here.

https://www.mql5.com/en/forum/173000

This utility EA places Stoploss & TakeProfit automatically if there are positions without them.

Maybe this is a tool for lazy manual traders.

If you are interested, have a look.

 

Trailing Equity?

latimeria:
Here is an another Equity Manager.

Most Martingale or Grid systems only close positions with profit and leave losing positions.

Account balance keep increasing regardless of real profit / loss and it's meaningless to observe it.

This Equity Manager observes only Equity and close all existing positions and pending orders when it reaches specified profit or loss.

Profit and loss can be defined by an amount of money (for example $1000) or percentage.

Once everything is closed, initial equity will be reset to current equity and keep continue.

how to use:

Attach this on any chart.

Input initial (current) equity before you start systems.

Choose target method (money or percentage) and input profit / loss closing level.

Then, run systems.

*This utility has an "Emergency Stop" funcition also.

It's like an "abort" button.

If you turn it on, this utility close everything and keep closing even if the system is trying to open new orders.

This works for a system that uses pending orders, but it will generate many spread losses for a system that uses instant entry.

So you must be careful when you use this function.

Great EA. Is it possible for the initial equity to automatically change as the profit increases. That way the equity stop will trail profits.

Thanks

 

I Figured It Out

I figured it out. I'll just decrease my equity target and everything will reset.

 

Hi khari123,

Trailing Equity may be a good idea to add.

I may update in the future.

For the present, you can trail manually by moving up Equity Stop.

If you change it to zero when current equity is floating with profit, equity stop become breakeven.

If you change it to minus value, equity stop moves above initial equity (some profit will be locked up).

 

Hi guys,

I'me new here.Can anyone show me how to attach the EA to forward test it?I just can't get the smiley face.if the EA got involve indicators,must the chart also display the indicator required?I'm interested to learn how to write EA as well,can provide some information any website I can learn?Thanks so much in advance.I do hope to be able to contribute an EA in the near future.

 

Here is an another Equity Manager.

Most Martingale or Grid systems only close positions with profit and leave losing positions.

Account balance keep increasing regardless of real profit / loss and it's meaningless to observe it.

This Equity Manager observes only Equity and close all existing positions and pending orders when it reaches specified profit or loss.

Profit and loss can be defined by an amount of money (for example $1000) or percentage.

Once everything is closed, initial equity will be reset to current equity and keep continue.

how to use:

Attach this on any chart.

Input initial (current) equity before you start systems.

Choose target method (money or percentage) and input profit / loss closing level.

Then, run systems.

*This utility has an "Emergency Stop" funcition also.

It's like an "abort" button.

If you turn it on, this utility close everything and keep closing even if the system is trying to open new orders.

This works for a system that uses pending orders, but it will generate many spread losses for a system that uses instant entry.

So you must be careful when you use this function.

Latest version is available here in this thread. So I deleted old version.

 

Simple Basket Close EA (utility)

This utility EA simply closes all existing positions & pending orders

when floating p/l has reached specific percentage of your account (Balance, Freemargin or Equity, selectable).

I have not tested well if it works correctly, but I think it will.

Maybe you should test this on demo account.

how to use :

Just apply this on any chart.

Set Account Mode and TP & SL level you want.

*Function is off at default setting.

So turn it on when you use it.

Latest version is available here in this thread. So I deleted old version.

 

Hi darrenlck,

Make sure the followings.

1) Click the smiley and open common tab. Check "allow Live trading".

2) Open Tools menu --> options --> Expert Advisors tab. Check all except "Ask manual confirmation".

You don't need to apply any indicators on the chart even if EA uses them.

But if EA uses custom indicators, you need to place required indicators in your MT4 --> experts --> indicators directory.

I didn't learn mql here (I just read a book and made try and error), but there seem to be a course of lectures for begginers here. Maybe administrator can guide you.