1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

The ‘Hedge’ Rocks Expert Advisor for MT4

Discussion in 'Forex Trading Systems and Strategies' started by AlphaOne, Mar 30, 2008.

  1. AlphaOne

    AlphaOne Recruit

    Joined:
    Oct 22, 2007
    Messages:
    3
    Likes Received:
    0
    The ‘Hedge’ Rocks Expert Advisor for MT4. I warn you now that I am more of a math dude than a MQL/MT4 programmer: my programming techniques are much like my surroundings… disorganized and messy. However, the math is sound and matches the FR trading system to a high degree of precision. Feel free to clean up my code if you wish.

    Now some caveats:

    1) This EA was never tested on the real thing… only demos. It is still somewhat buggy. Don’t run it on a live account unless you thoroughly test it on a demo account.

    2) I wrote this using the tradeviewforex.com demo account. It is calibrated to use 200:1 leverage with 100K lot sizes and roughly a 10K or 100K account balance.

    3) The sizes of your purchased lots (according to FR) should be no less than .5 to ensure that the ratios between the hedge groups are optimized. It still seems to work fine with less. If you choose the highest leverage or use 10K or ‘micro’ lot sizes to trade, the purchased lots will be higher. If you can’t change your lot sizes or your leverage… than you have to increase the amount you trade… via the Margin Percentage or the account balance… or both. It seems to work just fine with purchased lots of less than .5 but, that is what they say.

    4) I simply copied the FR system as best I could and have no opinion on its validity. They all seem a bit fanatical if you ask me… and that whole direct marketing thing is just not my cup of tea. It certainly can lose in spite what your Cool-Aide-Drinking friends at FR might tell you.

    BUGS:

    1) During the placing of the initial orders, sometimes one of two members of a currency group gets rejected by the broker which causes it to sell the remaining pair and reorder the group… causing you to eat the spread on the sold pair. It has something to do with the speed at which some brokers can accept orders.

    2) Rarely, it has a problem getting the historical data and crashes out my little Pearson Correlation routine at the end. I put in a bunch of catches but it still throws an error on rare occasion.


    Feel free to ask me questions. I will post some instructions next.
     

    Attached Files:

  2. ylberpatoku

    ylberpatoku Recruit

    Joined:
    Oct 25, 2007
    Messages:
    1
    Likes Received:
    0
    Hedge

    What is the process behind this hedge EA? After going +30 in one direction LONG (if TP=30 pips) and in oposite direction is -30 SHORT (we disregard the spread), is this EA going to open new trade in the LONG direction with same lot size, and leave SHORT open positon go on?
     
  3. Daniel Carter

    Daniel Carter Recruit

    Joined:
    Dec 3, 2008
    Messages:
    6
    Likes Received:
    0
    ea parameters

    Hi. By the way I would like to know which parameters in EA users are allowed to choose or modify. I wonder if it is not too risky leave orders at an EA mercy. If you could share with exactly which parameters are open to define before the EA starts its work, it’d be very helpful. Dan
     
  4. Christian Howard

    Joined:
    Dec 3, 2008
    Messages:
    10
    Likes Received:
    0
    that is why you have to set your own ea. This is the only way you can trust it, of course before you need to test it on a demo. Do you have mt4?
     

Share This Page