Page 1 of 3 123 LastLast
Results 1 to 10 of 26
 5 Attachment(s)    

Thread: Every Bar EA

  1. #1

    Default Every Bar EA

    Hi,

    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
    rptrader

  2. #2
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Default I agree!

    Hey rptrader!

    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!

    KetV

  3. #3

    Default

    KetV,

    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.

    rptrader

  4. #4
    Junior Member
    Join Date
    Mar 2009
    Posts
    10

    Thumbs up EA

    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?
    Attached Files Attached Files
    Last edited by fab4x; 04-15-2009 at 17:26.

  5. #5

    Default

    Quote Originally Posted by fab4x View Post
    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?
    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.

    Thanks again,
    rptrader

  6. #6

    Default

    Quote Originally Posted by fab4x View Post
    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?
    fab4x,

    For some reason it doesn't open a trade at the beginning of every bar. It hasn't even opened one trade yet.

    rptrader

  7. #7
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Wink Awesome dude!

    Nice one Fab4x!

    Which time frame and currency is recommended?

    I will test, and post results - once I have them.

    Cheers!

    ps. woohoo - my 2nd post!!

  8. #8
    Junior Member
    Join Date
    Feb 2009
    Posts
    3

    Default Hmmmm........

    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!

    Cheers!
    Attached Files Attached Files

  9. #9
    Junior Member
    Join Date
    Mar 2009
    Posts
    10

    Default

    Quote Originally Posted by KETV View 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!

    Cheers!

    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.

  10. #10
    Junior Member
    Join Date
    Mar 2009
    Posts
    10

    Default

    Quote Originally Posted by rptrader View Post
    fab4x,

    For some reason it doesn't open a trade at the beginning of every bar. It hasn't even opened one trade yet.

    rptrader

    What broker are you using? Also use it on a mini account

Tags for this Thread

broker, change, coding, demo, eurusd, expert, hedge, hedging, how to, live, magic, magic number, metatrader, mq4, nfa, pips, profit, robot, simple, spread, stop, stoploss, support, system, test, time, trend

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •