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

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Print Thread

Similar Threads

The HOLY GRAIL 130 replies

Developing the "Holy Grail" Trading System 4 replies

Holy grail trading system wanted, or nearest thing to it! 43 replies

6 Steps To Finding Your Personal Holy Grail 6 replies

The Search for the Holy Grail 1 reply

  • Rookie Talk
  • /
  • Reply to Thread
  • Subscribe
  • 376
Attachments: Is This My Holy Grail EA :D
Exit Attachments

Is This My Holy Grail EA :D

  • Last Post
  •  
  • 1 7677Page 787980 87
  • 1 77Page 7879 87
  •  
  • Post #1,541
  • Quote
  • Oct 27, 2008 10:17pm Oct 27, 2008 10:17pm
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
1. I am looking for a script or an EA that monitors the entire account. It will close all trades and not allow them to open again when it reaches a profit target. I think someone posted one and I would like to use it for an idea I have. Please repost or tell me which post it is in.

2. I am also looking for a script or EA that will work like a trailing stop but monitor the entire account. Lets say we set it at 50 dollars for the entire account, if profit goes to 150 dollars it will protect 100 of it so if prices retrace it will close all orders and not let it restart once the 100 take profit is hit.

It needs to work with my EA.
 
 
  • Post #1,542
  • Quote
  • Oct 27, 2008 10:25pm Oct 27, 2008 10:25pm
  •  azjeff
  • | Joined Aug 2007 | Status: Member | 661 Posts
Hello Bob,

Here is my contribution to the thread. This may not be exactly what you are looking for but I had a programmer friend of mine modify your ea to give an option to trade two sets of start and end times. Also, I had the programmer put in max USDLOSS option if open trades reach that amount (example 1100) it will close out all trades and not trade until the next session. If anyone wants to modify this they can. It is open source.

Regards,
Jeff

Quoting nanningbob
Disliked
1. I am looking for a script or an EA that monitors the entire account. It will close all trades and not allow them to open again when it reaches a profit target. I think someone posted one and I would like to use it for an idea I have. Please repost or tell me which post it is in.

2. I am also looking for a script or EA that will work like a trailing stop but monitor the entire account. Lets say we set it at 50 dollars for the entire account, if profit goes to 150 dollars it will protect 100 of it so if prices retrace it will close all orders and not let it restart once the 100 take profit is hit.

It needs to work with my EA.
Ignored
Attached File
File Type: mq4 100+40 1D .01_V2.mq4   28 KB | 337 downloads
 
 
  • Post #1,543
  • Quote
  • Edited at 1:10am Oct 28, 2008 12:31am | Edited at 1:10am
  •  joeTrue
  • | Joined Sep 2008 | Status: Member | 45 Posts
Quoting nanningbob
Disliked
1. I am looking for a script or an EA that monitors the entire account. It will close all trades and not allow them to open again when it reaches a profit target. I think someone posted one and I would like to use it for an idea I have. Please repost or tell me which post it is in.

2. I am also looking for a script or EA that will work like a trailing stop but monitor the entire account. Lets say we set it at 50 dollars for the entire account, if profit goes to 150 dollars it will protect 100 of it so if prices retrace it will close all orders and not let it restart once the 100 take profit is hit.

It needs to work with my EA.
Ignored

Bob, i have include what you talk about for 1. and 2.
i have not test it though.

look for "//set my profit for one Day" to find changes for 1.
"//set trailing stop" to find new codes for 2.


to use 1.
set MyMoneyProfitTragey to true and the amount below it
to use 2.
set MyTrailingStop to true
AmountToProtect --> if profit falls below this amount, all trades will be close and no new trades will be started
TrailingStopAmount --> profit amount on top of TrailingStopAmount to hit before activiating function

1 thing i'm not sure about is the naming.
is it called TrailingStop? have i used a right name?
Attached File
File Type: mq4 100+40 1Dw1H filter_post1515.mq4   26 KB | 308 downloads
 
 
  • Post #1,544
  • Quote
  • Oct 28, 2008 1:05am Oct 28, 2008 1:05am
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
Quoting joeTrue
Disliked
Bob...
attached is for the 1.

only added
\" if (ContinueOpening)\" to the start of the program and close all trades
at the end of the EA. Also added the function all \"CloseAll()\" to
\"//set my profit for one Day\".

close all trades was copied from the close all EA.

//close all trades
void CloseAll()
{
int total1 = OrdersTotal();
int cnt1 = 0;

RefreshRates();
for (cnt1 = 0 ; cnt1 <= total1 ; cnt1++)
{
OrderSelect(0,SELECT_BY_POS,MODE_TRADES);
if(OrderType()==OP_BUY)
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_BID),5,Violet);
if(OrderType()==OP_SELL)
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(),MODE_ASK),5,Violet);
if(OrderType()>OP_SELL) //pending orders
OrderDelete(OrderTicket());
}
}
Ignored
Thanks, but I was looking for a separate program I could manage outside the EA. I am not sure putting this in would work??
 
 
  • Post #1,545
  • Quote
  • Oct 28, 2008 1:52am Oct 28, 2008 1:52am
  •  FrostCall
  • | Joined Aug 2008 | Status: Member | 265 Posts
Bob, I've looked at the same issue. From what I can find, the only way to do it when you are using multiple EA's is to use a DLL and pass variables to it. That's beyond my talent. They are supposed to be giving us a fix for this in MT5 when it comes out. Of course, that doesn't help us right now does it.
 
 
  • Post #1,546
  • Quote
  • Oct 28, 2008 1:53am Oct 28, 2008 1:53am
  •  joeTrue
  • | Joined Sep 2008 | Status: Member | 45 Posts
i have tried.. for 1
and it works... at least from a program/EA perspective
it will close all trades if the profit amount set is reached
 
 
  • Post #1,547
  • Quote
  • Oct 28, 2008 2:50am Oct 28, 2008 2:50am
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
I am sicker than a dog right now and cant think. If someone has a working one instead of trying to patch it in that would help. Thanks
 
 
  • Post #1,548
  • Quote
  • Oct 28, 2008 4:46am Oct 28, 2008 4:46am
  •  El Salon
  • | Joined Sep 2007 | Status: Member | 81 Posts
Quoting nanningbob
Disliked
I am sicker than a dog right now and cant think. If someone has a working one instead of trying to patch it in that would help. Thanks
Ignored
Sorry to hear you're not well.

This might be what you are looking for, I haven't used it so don't know if it works.

Get well soon

James
Attached File
File Type: mq4 CloseTrades_After_Account_Profit_Reached.mq4   3 KB | 268 downloads
 
 
  • Post #1,549
  • Quote
  • Oct 28, 2008 6:26am Oct 28, 2008 6:26am
  •  Toothman
  • | Joined Aug 2006 | Status: Member | 1,242 Posts
I'm pretty sure the EA you just posted (CloseTrades After Account Profit reached) allows trades to reopen after it shuts down.
 
 
  • Post #1,550
  • Quote
  • Oct 28, 2008 10:40am Oct 28, 2008 10:40am
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
My 100/40 using the 8 currencies posted earlier has done well the first two days this week. They are staying within range of the EA through all this turmoil. Here is a chart of the last 3 days. I have it set at .05 first level. The reason I am posting this is I am taking my profit before the week gets too exciting.
Attached Image (click to enlarge)
Click to Enlarge

Name: DetailedStatement.gif
Size: 5 KB
 
 
  • Post #1,551
  • Quote
  • Oct 28, 2008 10:42am Oct 28, 2008 10:42am
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
Quoting El Salon
Disliked
Sorry to hear you're not well.

This might be what you are looking for, I haven't used it so don't know if it works.

Get well soon

James
Ignored
thanks, this may work with what I am trying to do. I may not need the do not continue trading option if I write the code right for the entrances.
 
 
  • Post #1,552
  • Quote
  • Oct 28, 2008 1:42pm Oct 28, 2008 1:42pm
  •  Leomeister
  • | Joined Oct 2007 | Status: Member | 152 Posts
I've used the Close_Alll_Trades... script if it's the one that was posted on the T101 thread. It does close all open trades as described but can't prevent the 100+50 expert from kicking back in with new open trades. I think that in order for the expert to be shut down the commands need to come from within the expert rather than an outside script.

Thanks to Ajeff and others that posted an amended expert with shutdown option. I've been manually shutting down and re-opening the 100+40 and 60+45 experts to trade only 4-5 hour segments of the Asian and London session. It's been excellent until today when both experts got nailed for -$4000 drawdowns on .05 micro accounts. Its a nasty market out there.

One other option an earlier discussion had brought up was to have the expert edited to measure the daily cumulativeprofit made rather than the current running P/L amount. Every script or account manager I found could only monitor the P/L. The significance in the difference is that profits are being banked with these experts when one by one different pairs reach TP. During much of this time the P/L may be running at a negative $. This is particularly true of the 60+45 expert which has been very productive.

If the expert had an option to monitor the daily cumulative profit, it could either then, a.) close and stay closed, or b.) re-open with a new updated alignment to the changing intraday trend.

Quoting El Salon
Disliked
Quote:
Originally Posted by nanningbob http://www.forexfactory.com/images/buttons/viewpost.gif
I am sicker than a dog right now and cant think. If someone has a working one instead of trying to patch it in that would help. Thanks

Sorry to hear you're not well.

This might be what you are looking for, I haven't used it so don't know if it works.

Get well soon

James
Ignored
 
 
  • Post #1,553
  • Quote
  • Oct 28, 2008 6:28pm Oct 28, 2008 6:28pm
  •  toyoproxo
  • | Joined Aug 2008 | Status: Member | 159 Posts
Quoting nanningbob
Disliked
My 100/40 using the 8 currencies posted earlier has done well the first two days this week. They are staying within range of the EA through all this turmoil. Here is a chart of the last 3 days. I have it set at .05 first level. The reason I am posting this is I am taking my profit before the week gets too exciting.
Ignored
Hasn't the eur/usd just given you trouble. I just took a loss on eur/usd which was maxed out and eur/jpy which was a SEVERE death trade. The account I posted last week is now down around $900. I am restarting with the 8 pairs you posted last week.
 
 
  • Post #1,554
  • Quote
  • Oct 28, 2008 7:37pm Oct 28, 2008 7:37pm
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
Quoting toyoproxo
Disliked
Hasn't the eur/usd just given you trouble. I just took a loss on eur/usd which was maxed out and eur/jpy which was a SEVERE death trade. The account I posted last week is now down around $900. I am restarting with the 8 pairs you posted last week.
Ignored
No I close down every day when I see profit. I think the market is too volatile to trade the USA session especially the later afternoon runs. That is probably where you are getting into trouble. I wouldnt trade the EUR/jpy it has been going out of range for the last 3 weeks. I dropped that one the first week the volatility started.
 
 
  • Post #1,555
  • Quote
  • Oct 28, 2008 7:41pm Oct 28, 2008 7:41pm
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
Today is another dangerous trading day with an anticipated Interest rate change. This is one announcement that makes the market go more crazy than any other announcement. If the Fed does anything unexpected everything will move like crazy. I would not be trading during that time.
 
 
  • Post #1,556
  • Quote
  • Oct 28, 2008 9:52pm Oct 28, 2008 9:52pm
  •  joeTrue
  • | Joined Sep 2008 | Status: Member | 45 Posts
bob.. hope you are much better today...

You are right Leo.
I "patch" and added codes into the EA and not manage it from outside, is because I do not know how to stop the 100/40 EA from kicking in after the close all EA is activiated...

If some1 knows how to stop the 100/40 EA after all trade is closed, please do show us or post the EA here which does that
 
 
  • Post #1,557
  • Quote
  • Oct 28, 2008 9:53pm Oct 28, 2008 9:53pm
  •  joeTrue
  • | Joined Sep 2008 | Status: Member | 45 Posts
All the 8 pairs less AUD/NZD is out of the white line in the Pivot indicator
 
 
  • Post #1,558
  • Quote
  • Oct 28, 2008 11:54pm Oct 28, 2008 11:54pm
  •  Lincoln10
  • | Joined Nov 2007 | Status: Member | 54 Posts
Why were all 8 pairs traded? I started with only 6 pairs this week because the other two (EURUSD and EURCHF) were outside the white lines.
 
 
  • Post #1,559
  • Quote
  • Oct 29, 2008 12:07am Oct 29, 2008 12:07am
  •  nanningbob
  • Joined Jun 2007 | Status: Teach men to fish | 7,383 Posts
Quoting Lincoln10
Disliked
Why were all 8 pairs traded? I started with only 6 pairs this week because the other two (EURUSD and EURCHF) were outside the white lines.
Ignored
Good point If you start within the white lines you would have been safe. The Eur/Usd yesterday did two100 pip retraces before it did the long afternoon run but by then I had pocketed my profit and was done for the day.

I was playing with a 100x100 EA using nickels on a 50K account and made over 3000 dollars yesterday on 22 pairs. Dont have that kind of money but it was fun to watch. Imagine having a 1000 pip range and the stupid gbp/jpy and gbp/nzd almost broke it. Trying it without the high risk currencies today. Only the ones that stay within a 1000 pip range in one day. Sheeeeeeeeeeesh what a difference 30 days makes.
 
 
  • Post #1,560
  • Quote
  • Oct 29, 2008 12:19am Oct 29, 2008 12:19am
  •  joeTrue
  • | Joined Sep 2008 | Status: Member | 45 Posts
Quoting Lincoln10
Disliked
Why were all 8 pairs traded? I started with only 6 pairs this week because the other two (EURUSD and EURCHF) were outside the white lines.
Ignored
i closed out all trades yesterday...
when i reopen the charts today, all 8 paris less AUD/NZD are out of the white line.
So today I'm only trading AUD/NZD.
 
 
  • Rookie Talk
  • /
  • Is This My Holy Grail EA :D
  • Reply to Thread
    • 1 7677Page 787980 87
    • 1 77Page 7879 87
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