Four EA's

Discussion in 'Forex' started by ElectricSavant, Jul 14, 2018.

There are no profitable EA's

  1. True

  2. False

  3. False, but periodic optimization is needed

  4. I do not trade Forex

Results are only viewable after voting.
  1. I have been forward testing various EA's this last month as I have taken a month off from my part time "medical transportation RideShare driving gig" while my car is being repaired from a rear-end collision (I am ok). It took the insurance company three weeks to decide if my MiniVan was totaled and the shop says it will take one week to fix. Anyways...

    I ended up with these four EA's (after forward testing and playing a few weeks before posting this thread here in ET) and now am publishing them here with $500.00 each within a few minutes from each other in 4 different ECN demo accounts on Friday afternoon 07/13/2018. I obtained these free EA's from the MQL5 Source Codes of Expert Advisors for MetaTrader5 https://www.mql5.com/en/code/mt5/experts

    Spreader 2 is a fascinating EA to me but remember that when the correlations "jump out" and create new levels there can be long periods of time when there is not any trading in this EA. I added a "Close All" routine to this demo as I want to be able to get a restart more often to keep aligned with correlations. The individual symbols can close at a static $8.00 but the entire basket can now close also at 1% of equity balance ($5.00 currently, adjustments will occur as the equity balance rises or falls). I am using 0.04 trade size for the EA inputs for this $500.00 account test. These close all amounts are subject to adjustment but I think they are reasonable and calibrated.
    Input Screen Spreader 2.png Input screen
    https://www.mql5.com/en/code/20397 (Spreader 2)
    Spreader 2.png

    GalacticExplosion is a stupid name for an EA and if you research and translate the Russian Forums you might understand that the author was making a joke but the coder used it as a serious recommendation. I added some other pairs to represent 8 currencies (remember we are testing). The individual symbols can close at a static $4.00 but the entire basket can now close also at 0.6% of equity balance ($3.00 currently, adjustments will occur as the equity balance rises or falls). I am using 0.01 trade size for the EA inputs for this $500.00 account test as the drawdowns grow to like 30% at times which is a little rich for my blood. These close all amounts are subject to adjustment but I think they are reasonable and calibrated. Note: that there is a time filter (dealer server time) in GalacticExplosion for placing trades. See input screen.
    Input Screen GalacticExplosion.png Input Screen
    https://www.mql5.com/en/code/19402 (GalacticExplosion)
    GalacticExplosion.png

    The coding in EMA Cross Contest Hedged does not seem to allow multiple pairs. Perhaps one of the coders in here can improve the EA. It is open domain so go for it, all I ask if you would share that would be awesome. I add balance equity graphs to all my platforms, but they redraw which is troubling as I would like a stamp of the history. I am testing on M2 but if you check the link to the EA forum it did rather well with M30 in the past.
    Input Screen EMA Cross Contest Hedged.png Input Screen
    https://www.mql5.com/en/code/19655 (EMA Cross Contest Hedged)
    EMA Cross Contest Hedged.png

    Hans123 v2 EA is rather tempestuous and drawdowns go deep, because I have added some unexpected symbols to represent 8 currencies. The balance can fluctuate up and down also. I am using 0.01 on $500.00 and am not sure I would ever trade this EA live, we shall see. Note: that there is a time filter (dealer server time) in Hans123 v2 for placing trades. See input screen. I adjust the settings of the three pair that I added to the EUR/USD test with an ATR spreadsheet.
    Input Screen Hans123 v2.png Input Screen


    https://www.mql5.com/en/code/19945 (Hans123_Trader v2)
    Hans 123 v2.png
     
    Last edited: Jul 14, 2018
  2. There was a little bit of trading that took place after I started these EA's in the final hours before the Forex Market closed on Friday 07/13/2018. Here is the Profit:

    Spreader 2 = $0
    GalacticExplosion = +$3.43
    EMA Cross Contest Hedged = $0
    Hans123 v2 = $0

    Folks, after examining the four EA's which one do you think will lose the most? No backtesting allowed.

    ES
     
    Last edited: Jul 14, 2018
  3. Spreader2 = $0 (-$8.13)
    GalacticExplosion = +$3.43 (-$15.46)
    EMA Cross Contest Hedged = $0 (-$3.85)
    Hans123 v2 = $0.76 (0)

    Parenthesis = float
     
  4. Spreader2 = $0 (-$18.39)
    GalacticExplosion = +$11.76 (-$9.30)
    EMA Cross Contest Hedged = $0 (-$2.75)
    Hans123 v2 = +$0.76 (0)

    Parenthesis = float
     
    Last edited: Jul 15, 2018
  5. 2018-07-16_Four EA's.png
     
  6. 2018-07-16_022541 Four EA's.png
     
  7. 2018-07-16_055945 Four EA's.png
     
  8. traider

    traider

    You need to write about the rough strategy each EA is trying to implement if you want good feedback. what you've provided doesn't give one much to work with.
    For example forex trends quite well. Does one of the EA try to use this with reasonable risk management?
     
  9. Traider,

    I wrote one sentence after each title and then quoted from MQL5. I hope this helps. Much of the text from MQL5 is translated from Russian, so it is not clear at times. I discovered that in the opening post these links got mixed around, but they are there (the composition of this thread was not an easy task and I really need unlimited time to edit rather than 1 hour). I can comment further with my opinions about the mechanics of these EA's if you would find that helpful, but lets wait for more input from other traders and for some more results to post.




    Spreader 2
    Correlation imbalance

    This is from MQL5:

    The EA calculates the direction and lot of a position to open. The calculation is optimized so that the EA will either quickly accumulate positive spreads and close with a profit, or if anything goes wrong the EA will hold a trade until the drawdown recovers. Drwadowns happen and sometimes last long. The EA does not use any indicators and performs calculations based on the last 60-bar history.
    • The initial required deposit for default settings is $10000
    • Timeframe: M1.
    Pairs should have a long-term positive correlation. The Expert Advisor cannot check if pairs are positively correlated.

    The pairs must have the same quote currency. For example, you can use EURUSD and GBPUSD, which have the same USD quote currency, as well as GBPJPY and CHFJPY having the same JPY quote currency. EURUSD and USDJPY cannot be used together, because they have different quote currencies, i.e. USD and JPY.

    Do not launch simultaneously two different Expert Advisors if at least one of their currency pairs match. The EA does not have a magic number. However, the magic number is not needed if you properly use the EA following the instructions, because you can easily find appropriate pairs for every Expert Advisor.

    Default settings allow selecting up to six pairs, which I found appropriate for testing on a demo account:
    1. Launch the EA on NZDJPY, write AUDJPY in the Second symbol parameter;
    2. Launch the EA on CHFJPY, write GBPJPY in the Second symbol parameter;
    3. Launch the EA on EURUSD, write GBPUSD in the Second symbol parameter;
    4. Launch the EA on USDJPY, write CADJPY in the Second symbol parameter.
    Input Parameters
    • Second symbol - the second currency pair;
    • Position volume for the current symbol - the volume of a position of the currency pair the EA is running on (the volume for the second pair specified in Second symbol will be calculated automatically);
    • Profit - profit in the deposit currency, after reaching which the EA will close positions of both pairs.
    Note: The Expert Advisor is not all the time in the market. Therefore it can be running without opening any position for a long time.

    Brief Description of the EA Operation
    The EA waits until both correlated pairs move up in one area of 30 bars, and then move down in the second area. If the movement is only up or down in both areas, the EA does nothing and only adds the "Trend found" comment. If pairs move apart, i.e. there is a negative correlation between pairs, the EA will do nothing and will add the "Negative Correlation" comment.

    Once the upward movement and the downward movement are found and the two pairs correlate, an optimization is performed, i.e. a calculation is made targeting a profit in both areas regardless of trend direction (either up or down). The optimization includes selecting an optimal lot size for the second pair and deciding which pair should be the main one and which one should be used for hedging in the first area, i.e. selecting pairs for the long and the short position. After that positions on both pairs are opened in accordance with calculations. Once the profit reaches the value specified in the Profit parameters, both positions are automatically closed, and the EA repeats the algorithm.

    One pair is considered to be main and the other one is hedging for an uptrend. The main pair takes the profit and the hedging one protects against drawdown. In a downtrend the pairs change their roles. A hedging pair reduces the risk, though it reduces profit. But without hedging risk won't be limited in case of trend change.

    An additional check has been added, since the market makes a lot of false signals, which can mislead any EA. If the check result is negative, then the EA assumes it can have a loss and considers the direction to be wrong, so it writes a comment "False testimony". The additional check allows limiting drawdowns and reducing the possibility of having uncovered positions.

    ___________________________________________
    GalacticExplosion
    Trading above/below MA200 exiting w/a specific pattern of steps

    This is from MQL5:

    The Expert Advisor was inspired by the forum topic Requests & Ideas (MQL5 only!), comment #299.

    Description of the System
    1. The Expert Advisor only performs actions on a new bar (calculations are performed at the moment of a new bar emergence, the EA does not work inside the bar).

    2. The EA operation is restricted by operation time, which is specified in hours. For example, operation hours can be set from 8 am to 5 pm:

      8 am - operation hours - 5 pm
      New positions can ONLY be opened in working hours. POSITION CLOSING is also allowed in non-working hours.

    3. Position volume is set manually in input parameters and is always equal to a fixed amount.

    4. When to open the first trade: BUY if the 200 EMA is below the new bar. SELL is the 200 EMA is above the new bar.

    5. A position (or positions) should be closed if the NET profit (commission + swap + profit) is equal to or greater than Minimum profit (specified in the account currency).

    6. If at the opening of the next new bar trading is not in profit, we do nothing with open positions until all trades together make a total profit.

    7. If there are open positions and the total NET profit is negative, open a new position at the opening of each new bar. Continue opening new positions until the Minimum profit value is reached.

    8. When there are more than 8 open positions, the following limitations apply:
      1. We continue opening new positions similar to the first 8 positions, but now a position can only be opened if the distance between the new bar price and the last open position is no less than 10 points.

      2. If the current bar price is at a distance of 500 to 999 points from the price of the first open position, we open a new position according to the rule 8.1, but now we skip a minimum of 3 candlesticks.

      3. If the current bar price is at a distance of 1000 to 2000 points from the price of the first open position, we open a new position according to the rule 8.1, but now we skip a minimum of 6 candlesticks.
    _______________________________________________
    EMA Cross Contest Hedge Entry with cross of 4MA and 24MA, Exit w/ Trailing SL, TP.

    This is from MQL5:

    The author of the idea: Scriptor, the author of the MQL5 code: bar
    abashkakvn.


    An intersection of two Moving Averages based on the data of two bars is searched for generating a signal:

    The number of the current bar can be specified in Trade bar: either bar #0 or bar #1.

    If Use MACD is set to true, the EA will also take into account the position of the main MACD line relative to zero (the Trade bar parameter).

    If a signal is generated when there are no open positions, a position is opened and four hedging orders are placed at a distance of Hedge level and the lifetime equal to Expiration pending orders: Buy Stop orders are placed in case of a BUY position; Sell Stop orders are placed in case of a SELL position.

    Positions can be closed by an opposite signal if Close the opposite positions parameter is set to true. For example, SELL positions will be closed if a BUY signal is generated.

    Once positions are opened, Trailing Stop with Trailing Step will be enabled for them.

    Input Parameters
    • Lots - the volume of position to open;
    • Stop Loss (in pips) - Stop Loss value;
    • Take Profit (in pips) - Take Profit value;
    • Trailing Stop (in pips) - trailing value;
    • Trailing Step (in pips) - trailing step value;
    • Hedge level (in pips) - distance between pending orders;
    • Close the opposite positions - the flag to close opposite positions;
    • Use MACD - the flag to use MACD;
    • Expiration pending orders (seconds) - pending order expiration time;
    • MA short: averaging period - fast MA calculation parameter;
    • MA long: averaging period - slow MA calculation parameter;
    • Trade bar - the bar number to trade on;
    • magic number - unique identifier for the EA.
    _____________________________________________
    Hans123 v2
    Entry w/breach of High/Low, Exit with Trailing Stop, TP

    This is from MQL5:

    A further development of the first version Hans123_Trader.

    The Expert Advisor places pending Buy Stop and Sell Stop orders. To place an order, the EA searches for the highest and lowest price within the given range of bars (set to 80 in this code). Buy Stop orders are placed at the highest price, Sell Stop orders are placed at the lowest one.

    The lifetime of pending orders lasts until the end of the current day. Once any of the pending orders triggers, all other orders are deleted.

    Max pending orders parameter has been added in the second version - it allows setting the maximum number of pending orders.
     
    Last edited: Jul 16, 2018
    #10     Jul 16, 2018