Every Bar EA
I have an idea for an EA. I haven't done any testing because I don't know if it's even possible to do this manually. I know this isn't the protocol but I thought I'd try anyway.
I'd like to enter long and short the same currency on the open of every bar. The EA needs to have a Long Stop Loss (LSL), Long Take Profit (LTP), Short Stop Loss (SSL), and Short Take Profit (STP). The goal would be to have the LTP and STP 8 pips larger than the LSL and SSL on a currency with a 4 pip spread. The goal is to make 4 pips on every cycle, by cycle I mean one long and one short trade. So your short would get stopped out but your long trade would hit the take profit.
I would also like to have a basket close at $50. This means if you have a bunch of open orders from previous bars that haven't hit either the TP or SL and you have a profit of $50, all the trades will close and you will start fresh on the next bar. I would also like a magic number added.
I'm not sure if this is possible in one EA. It might have to be two separate EA's running on the same account.
I'm also not sure if I have explained my idea in the clearest way. If you have any questions please let me know.
Thanks for the help
I have been thinking about this very same idea for quite some time - my coding is nowhere in the league of Funyoo's though!
I was thinking of running the EA on a 30min chart and maybe to set the orders up to open at the median of the previous bar. It would actually be nice to have the option to place the trades at the open of the new bar or at the median of the previous bar.
A filter may also be a good idea in a trending market where I can see potentially more losses occurring.
Funyoo - do you think you could help us?!
Thanking you in advance!
Those sound like good options to test. I'd like to try the basics that I mentioned on the first version to keep it simple. Then hopefully we can continue to make new versions with the add-ons you mentioned to test those and see if we can come up with a pretty good EA. Hopefully we'll get something good.
Here is the EA. It trades a hedge order (buy/sell) on every bar with a same SL and TP+8 for each orders. But istead of losing on your SL. I added a pending limit to reverse at the SL. It will close all open orders when overall profit is over xx $ amount.
If you play with the SL then it can be successful?
Last edited by fab4x; 04-15-2009 at 16:26.
Originally Posted by fab4x
Thank you very much for the EA. I will start testing it and post my results. If anyone has any tweaks or suggestions we can now create additional versions.
Originally Posted by fab4x
For some reason it doesn't open a trade at the beginning of every bar. It hasn't even opened one trade yet.
Nice one Fab4x!
Which time frame and currency is recommended?
I will test, and post results - once I have them.
ps. woohoo - my 2nd post!!
Interesting EA Fab4X.......
I have back tested on EurUSD 15m (attached), and in one day it made over 4K until it closed all the open orders.
What does the FirstLot and MinProfit parameters mean? There seems to be some sort of money management system incorporated in the EA which works out the order size - possible to use fixed lots?.
I am forward testing this also and will let you all know how it gets on.
Incidentally, how much is this EA from your www.4xfx.biz website, and which product is it? - To be honest, this EA should be in the commercial section!
Originally Posted by KETV
First Lot is your intial lot size. So if you want to trade smaller sizes. change to 0.1 etc...
MinProfit is the min amount in $ amount the EA will close all open trades .
This was not intended to be sold. Just for fun. If you like to puchase it on the side let me know.
Originally Posted by rptrader
What broker are you using? Also use it on a mini account