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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

EA "Close all positions at profit target" closed all positions at loss ? 8 replies

Help with EA to close all the open positions in profit pips 0 replies

EA or script close all trades at certain equity level 6 replies

Need close all open positions EA 5 replies

Help for Script to close all open positions 4 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 11
Attachments: EA Close out all open positions on certain level of equity
Exit Attachments

EA Close out all open positions on certain level of equity

  • Last Post
  •  
  • Page 1 2 3
  • Page 1 2 3
  •  
  • Post #1
  • Quote
  • First Post: Oct 22, 2014 6:56pm Oct 22, 2014 6:56pm
  •  superzeeshan
  • | Joined Mar 2009 | Status: Member | 29 Posts
I have an indicator that alerts me when my equity reaches a particular amount in $. Now I want EA to automate the process, I want an EA that should close out all open positions when my account reaches a certain amount of $ in equity Profit or Loss.

I have checked Swiss Army EA but it only closes one position at a certain amount of loss/profit rather than close all positions.

Your help would be highly appreciated.
Attached File
File Type: mq4 Equity Alert v3.mq4   2 KB | 1,718 downloads
  • Post #2
  • Quote
  • Oct 23, 2014 12:17am Oct 23, 2014 12:17am
  •  cja
  • Joined Feb 2007 | Status: Member | 1,848 Posts
I have combined your indicator Alerts into the EA so this should do everything you require. You can set the EA to :
1/ Alert and Close all trades
2/ Alert only
3/ Close all trades only

This EA has been compiled on MT4 build 625 if you have any issues let me know.

Attached File
File Type: ex4 Equity EA nmc.ex4   37 KB | 3,842 downloads
Trade what you see not what you hope
 
 
  • Post #3
  • Quote
  • Oct 23, 2014 8:34am Oct 23, 2014 8:34am
  •  superzeeshan
  • | Joined Mar 2009 | Status: Member | 29 Posts
Thank you so much.. can I get the mql file?
 
 
  • Post #4
  • Quote
  • Edited at 8:08pm Feb 14, 2015 6:13pm | Edited at 8:08pm
  •  Motiram
  • Joined Nov 2014 | Status: Member | 565 Posts
Quoting cja
Disliked
I have combined your indicator Alerts into the EA so this should do everything you require. You can set the EA to : 1/ Alert and Close all trades 2/ Alert only 3/ Close all trades only This EA has been compiled on MT4 build 625 if you have any issues let me know. {file}
Ignored
Hello cja, present Equity EA nmc.ex4 is working perfect on Equity, Please I need the EA that can close individual trade in row of the TERMINAL TRADE PROFIT COLUNM. When Profit or Loss reaches at X amount in the row. EA must be attached only to one chart, as above Equity EA does the work.

Thanks And Regards,
Moti
 
 
  • Post #5
  • Quote
  • Feb 15, 2015 2:01pm Feb 15, 2015 2:01pm
  •  Evggne
  • | Joined Feb 2015 | Status: Junior Member | 3 Posts
Maybe something from this will help...
Attached Files
File Type: mq4 CloseProfit v2.mq4   14 KB | 3,290 downloads
File Type: mq4 Equity_v7.mq4   26 KB | 2,879 downloads
File Type: mq4 e-VTrailingByProfit.mq4   17 KB | 2,094 downloads
 
1
  • Post #6
  • Quote
  • Feb 16, 2015 6:05am Feb 16, 2015 6:05am
  •  cja
  • Joined Feb 2007 | Status: Member | 1,848 Posts
Quoting Motiram
Disliked
{quote} Hello cja, present Equity EA nmc.ex4 is working perfect on Equity, Please I need the EA that can close individual trade in row of the TERMINAL TRADE PROFIT COLUNM. When Profit or Loss reaches at X amount in the row. EA must be attached only to one chart, as above Equity EA does the work. Thanks And Regards, Moti
Ignored
Attached File
File Type: ex4 Profit Loss EA nmc.ex4   38 KB | 2,962 downloads
Trade what you see not what you hope
 
 
  • Post #7
  • Quote
  • Feb 16, 2015 1:11pm Feb 16, 2015 1:11pm
  •  Motiram
  • Joined Nov 2014 | Status: Member | 565 Posts
Quoting Evggne
Disliked
Maybe something from this will help... {file} {file} {file}
Ignored
Evggne I tried but could not understand the input language any ways thank you for help

Regards,
Moti
 
 
  • Post #8
  • Quote
  • Feb 16, 2015 1:12pm Feb 16, 2015 1:12pm
  •  Motiram
  • Joined Nov 2014 | Status: Member | 565 Posts
Quoting cja
Disliked
{quote} {file}
Ignored
Thank you cja Ea is working as request perfectly, profit target was 12 and did closed trade when reached profit @ 12 image is attached

Regards,
Moti
Attached Image (click to enlarge)
Click to Enlarge

Name: Close Profit Trades.JPG
Size: 22 KB
 
 
  • Post #9
  • Quote
  • Jul 2, 2015 6:15am Jul 2, 2015 6:15am
  •  pax
  • Joined Jun 2014 | Status: Member | 366 Posts
Quoting Motiram
Disliked
{quote} Thank you cja Ea is working as request perfectly, profit target was 12 and did closed trade when reached profit @ 12 image is attached Regards, Moti {image}
Ignored
Hi Motiram:
so you'd have to set both below and above to the same $12
for the EA goes thru open trades and close any order that has $12 profit

What if an order has say $10 in profit - what does the 2nd variable "Close when order Profit below" = 12 do?
This is not clear to me - orders with $10 in profit will also be closed too?

Thank you

Attached Image
 
 
  • Post #10
  • Quote
  • Edited at 12:28pm Jul 4, 2015 12:13pm | Edited at 12:28pm
  •  Motiram
  • Joined Nov 2014 | Status: Member | 565 Posts
Quoting pax
Disliked
{quote} Hi Motiram: so you'd have to set both below and above to the same $12 for the EA goes thru open trades and close any order that has $12 profit What if an order has say $10 in profit - what does the 2nd variable "Close when order Profit below" = 12 do? This is not clear to me - orders with $10 in profit will also be closed too? Thank you {image}
Ignored
Hello pax, Firstly always turn False "Allow EA to Close Trades" after filling both field place on the chart
And read all you have filed is correctly and than modify the EA turn True "Allow EA to Close Trades" for the safety

Close when Order profit below--> this input mean close the open order if the trade is losing "X" amount
In other words close my order if trade is running below the , for example = $10 (Will be closed only losing trades)

Close when Order profit above--> this input mean close the open order if the trade is in the profit "X" amount
In other words close my order when the trade is running in profit above the, for example = $10 (Will be closed only profit trades)

Hope this help

Regards,
Moti
 
 
  • Post #11
  • Quote
  • Jul 4, 2015 12:36pm Jul 4, 2015 12:36pm
  •  pax
  • Joined Jun 2014 | Status: Member | 366 Posts
Quoting Motiram
Disliked
{quote} Hello pax, Firstly always turn False "Allow EA to Close Trades" after filling both field place on the chart And read all you have filed is correctly and than modify the EA turn True "Allow EA to Close Trades" for the safety Close when Order profit below--> this input mean close the open order if the trade is losing "X" amount In other words close my order if trade is running below the , for example = $10 (Will be closed only losing trades) Close when Order profit above--> this input mean close the open order if the trade is in the profit...
Ignored

Thanks Motiram for the clarification !
 
 
  • Post #12
  • Quote
  • Jul 4, 2015 1:40pm Jul 4, 2015 1:40pm
  •  pax
  • Joined Jun 2014 | Status: Member | 366 Posts
Quoting cja
Disliked
{quote} {file}
Ignored
Hi cja:
If it's possible, could you please add options to this EA to:

Allow EA to Close Trades
win
lose
both
Apply to All Symbols
true (so EA works on all open trades from all charts)
false (so EA works only on all open trades on the chart it's attached to)

Close when Order profit below = $ amount in loss
Close when Order profit above = $ amount in profit

I hope I made some sense... this would be very helpful I think.

Thank you for the consideration,
pax
 
 
  • Post #13
  • Quote
  • Jul 21, 2015 11:11am Jul 21, 2015 11:11am
  •  8finity
  • | Joined Jul 2015 | Status: Junior Member | 1 Post
Hello cja, can you please let me know if you can apply the ea to only a certain number of open positions? For example by restricting it to specified order numbers so if even though I have about 10 positions open, ea closes order #4 short eur/jpy and order #8 long gbp/usd if the total profit between these two hits £20 and leave all other orders opened? If it is possible can you help in modifying the ea by adding this function? Thank you
 
 
  • Post #14
  • Quote
  • Aug 18, 2018 2:20pm Aug 18, 2018 2:20pm
  •  tom922
  • | Joined Feb 2017 | Status: Member | 40 Posts
Hi,
i need help for an expert that close all open trade(in a specific loss) with magic number and also close all pending order
 
 
  • Post #15
  • Quote
  • Edited at 4:50am Jan 18, 2019 4:34am | Edited at 4:50am
  •  cja
  • Joined Feb 2007 | Status: Member | 1,848 Posts
This EA closes all trades on the platform if the Equity profit or loss levels are reached or the trailing profit closes the trades, you now have the option to have the EA turn off the MT4 AutoTrading button when the trades are closed.
NOTE : This will stop any other EA's from working on the MT4 plaform when the auto shutdown happens.
Attached Image

Attached Image

Attached File
File Type: ex4 Equity EA Auto shuftdown nmc.ex4   51 KB | 1,843 downloads
Trade what you see not what you hope
 
4
  • Post #16
  • Quote
  • Jan 18, 2019 5:17am Jan 18, 2019 5:17am
  •  goodways100
  • Joined Dec 2013 | Status: Member | 615 Posts
Thank you, I needed that. Regards
 
 
  • Post #17
  • Quote
  • Jan 18, 2019 9:37am Jan 18, 2019 9:37am
  •  ronwalt
  • | Joined Jan 2014 | Status: Member | 88 Posts
Quoting cja
Disliked
This EA closes all trades on the platform if the Equity profit or loss levels are reached or the trailing profit closes the trades, you now have the option to have the EA turn off the MT4 AutoTrading button when the trades are closed. NOTE : This will stop any other EA's from working on the MT4 plaform when the auto shutdown happens. {image} {image} {file}
Ignored
That's perfect. Thanks!
 
 
  • Post #18
  • Quote
  • Jan 31, 2019 5:48am Jan 31, 2019 5:48am
  •  ronwalt
  • | Joined Jan 2014 | Status: Member | 88 Posts
Quoting cja
Disliked
This EA closes all trades on the platform if the Equity profit or loss levels are reached or the trailing profit closes the trades, you now have the option to have the EA turn off the MT4 AutoTrading button when the trades are closed. NOTE : This will stop any other EA's from working on the MT4 plaform when the auto shutdown happens. {image} {image} {file}
Ignored
Hello CJA,

Here is another enhancement request to further automate the Equity EA Auto Shutdown. Would it be possible to enter a % input parameter that the EA would use for the shutdown criteria?

For example, enter 1.5% and the EA would shutdown open and pending trades when equity has increased by that % in today's session.

In testing, I have sometimes forgotten to change the equity profit and loss dollar levels and therefore shutdown accidently. Having a $ cutoff will automate the process.

Thanks in advance.
 
 
  • Post #19
  • Quote
  • Feb 1, 2019 4:35am Feb 1, 2019 4:35am
  •  cja
  • Joined Feb 2007 | Status: Member | 1,848 Posts
Quoting ronwalt
Disliked
{quote} Hello CJA, Here is another enhancement request to further automate the Equity EA Auto Shutdown. Would it be possible to enter a % input parameter that the EA would use for the shutdown criteria? For example, enter 1.5% and the EA would shutdown open and pending trades when equity has increased by that % in today's session. In testing, I have sometimes forgotten to change the equity profit and loss dollar levels and therefore shutdown accidently. Having a $ cutoff will automate the process. Thanks in advance.
Ignored

At the moment the EA has 2 methods of take profit, the hard take profit and the trailing profit either method when reaching their take profit activate the Auto Shutdown , so are you wanting the 3rd % take profit added or remove the 2 previous methods and have only the % take profit????
Trade what you see not what you hope
 
 
  • Post #20
  • Quote
  • Feb 1, 2019 5:53am Feb 1, 2019 5:53am
  •  ronwalt
  • | Joined Jan 2014 | Status: Member | 88 Posts
Quoting cja
Disliked
{quote} At the moment the EA has 2 methods of take profit, the hard take profit and the trailing profit either method when reaching their take profit activate the Auto Shutdown , so are you wanting the 3rd % take profit added or remove the 2 previous methods and have only the % take profit????
Ignored
Having only the % take profit would be fine. Thanks
 
 
  • Platform Tech
  • /
  • EA Close out all open positions on certain level of equity
  • Reply to Thread
    • Page 1 2 3
    • Page 1 2 3
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 / ©2022