Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Pattern Matching Concept EA - MT4/MT5 Resources

author EAcpu | 3 reads | 0 comments |
There isn't much activity online yet "Old Dogs New Tricks" thread saves posts that have started to stray away from the original topic. I noticed in the tick collection log that there were 110 unique users this week, so I guess these people are making money.

This is a newer concept EA that is programmed to find its own candle patterns. The pattern finding algorithm is simple: it checks the previous x closed bars and generates a string like "LLDSSL", which means that the bar from the right (nearest) to the left is long, short, short, doji, long, long.

The EA then scans the chart history looking for bar patterns with the exact same sequence. The EA checks x bars after the sequence to see if the bar is long or short. The results are then added to the statistics generated by the EA.

If the probability of an event occurring is greater than the threshold, the EA will trade accordingly.

set up:

  1. extern string Remark1 = "== Main settings==";
  2. external int MagicNumber = 0;

    1. This number should be unique when multiple EAs are connected to one terminal.

  3. extern bool SignalsOnly = False;

    1. If set to true, the EA will only use any combination of the following alerts to alert you to trades.

  4. extern bool alert = False;

    1. If set to true, the EA will send pop-up alerts when trading signals arrive.

  5. extern bool SignalMail = False;

    1. If set to true, the EA will send you an email when a trading signal arrives (assuming you have email set up in your MT4 terminal).

  6. extern bool PlaySounds = False;

    1. If set to true, the EA will play the file "alerts.wav" when a trading signal arrives.

  7. external boolean ECNBroker = False;

    1. Some brokers require the EA to first place the trade and then modify the trade via stop loss and take profit. If your broker requires this value, set this value to True.

  8. extern bool EachTickMode = True;

    1. If set to true, the EA will immediately place a trade when it sees a signal. If set to false, the EA will only trade when a signal appears at the end of the bar.

  9. External double lot size = 0;

    1. Fixed lot size

  10. extern bool MoneyManagement = False;

    1. Enable/disable batch size feature.

  11. outer integer risk = 0;

    1. The percentage of available margin you are willing to put into a trade.

  12. extern int slippage = 5;

    1. Maximum slippage allowed when placing an order.

  13. extern int stop loss = 100;

    1. Hard Stop Loss (measured in pips).

  14. extern int take profit = 60;

    1. Hard profit point.

  15. extern string Remark2 = "==Mode setting==";
  16. extern int number of bars = 4;

    1. The number of bars used when generating the pattern.

  17. external int PredictionBar = 1;

    1. The number of items following the pattern string used to check predictions.

  18. extern int HistoryBars = 500;

    1. The number of entries to check when searching for a matching pattern string. Set to 0 to use all bars.

  19. extern int time limit = 10;

    1. Maximum number of seconds for trading after the current bar is opened.

  20. extern int BarsClose = 1;

    1. Number of bars after opening and closing trades.

  21. outerdoublethreshold = 50.0;

    1. The minimum percentage required to make a trade.

  22. extern bool ReverseTrades = True;

    1. Change long signals to short signals and short signals to long signals.


raygun.GIF
raygun.GIF
raygun.GIF
raygun.GIF
raygun.GIF
raygun.GIF

Attachment to original post (1)

📦 Summary of post attachments (2)

Below are all the files (2) shared in the reply.

Verification code Refresh