What is a good EA? - page 3

 
Mean-reversion entries + trend following filter
Huge TP + tiny trailing stop
Low volatility trigger + fast SL
Tight BB bands + M5 noise

    And the risk model does not match the strategy:

    200 pip TP is incompatible with M5 ranges
    10 pip trailing stop kills winners
    Only 1 year of data = curve fitting

      Mathematically, structurally, and logically, the EA is designed to fail.

       

      If you are completely new to mt5/trading in general here is the all the advice I would have wanted just starting out. All of this presupposes that along the way you are increasingly getting better at mql5 coding. 

      1. Don't quit your day job, having steady income is so nice and you don't realize how good it was until its gone. Don't quit your regular job until you make retirement levels of money 

      2. Be deathly scared of overfitting trading systems and always pursue statistical significance. This is a very good beginner playlist for avoiding overfitting that you should binge watch: https://www.youtube.com/playlist?list=PLv-cA-4O3y95J6xmwSaCILL4FlGJZO0PJ

      3. Learn to code multi symbol EAs based on this article: https://www.mql5.com/en/articles/234 (you don't have to follow the exact method, personally I use an extremely lean version)

      4. In normal trading systems you should also filter for news. There are plenty of different methods on the mql5 forum on how to do this. I recommend saving the economic events once from a live chart with a script using CalendarValue functions and then in the strategy tester environment loading them once into RAM and reading them to the EA that way. The reason you have to do it different compared to live news events is because Calendar functions do not work inside the strategy tester. (Also DST will be different in backtest vs live depending on your broker's data feed is setup when it switches from summer to winter. Using the cache method if I want to load events onto a chart and draw a line at each event then I have to apply a DST offset but in the strategy tester I do not. Why? I really don't know the exact reason lmao)

      5. Understand the differences in the strategy tester for Every tick Based on Real Ticks, Every Tick, 1 min OHLC, and open prices only. Real ticks are the actual incoming ticks but because forex is OTC ticks can be vastly different between brokers, especially during rollover, news, random spikes from banks doing something, etc. Every Tick is synthetically generated and I avoid using this because the ticks are not actually real and things like fast/tight trailing stops exploit how the ticks are generated and give extremely unrealistic results. 1 min OHLC is what I use and I force EVERYTHING inside my EAs to only react on new 1 min bars for that symbol on that chart (for multisymbol EAs) because forcing the EA to only react on new 1 min bars cuts down on noise/broker dependency ticks. This has given me the most realistic results in live vs backtest. Open prices only has a many caveats I don't feel like explaining right now. Read the documentation on your own time. 

      6. Download 1 min OHLC tick data from dukascopy (or whatever data provider) and set spread to something realistic or create your own algo/recording of spread prices at 1 min closes. 

      7. Don't write off grid/martingale trading. Manual grid trading with fixed daily/cycle loss and profit targets/limits is probably the most slept on edge in the wider trading industry. Also not all grid is martingale etc, also would recommend coding your entire grid system/panel management from scratch 

      8. Do not buy a mql5 product or any trading product if you do not know how it works. Also mql5/myfxbook/tradezilla results can easily be faked. 

      9. Everything you see on youtube relating to forex is 100% garbage designed to waste your time, sell you overpriced courses/discords/mentorships, or literally just rugpull you with unregulated prop firms/brokers that answer to no one. If you hear about them through Instagram, telegram, or tik tok they are 100% scamming you in some way shape or form. (Why would people sell their edges instead of just leveraging them to make supposed millions? People aren't even subtle about it anymore, youtube just recommended me a video "How I made 50,000,000 dollars forex trading" and its some bozo just selling a 100$ course hoping to feast on beginners that don't know better). Even stuff like No Nonsense Forex which got me into forex trading is lying to you about manual backtesting on daily chart by, not adding swaps that kill on the daily, adding 5 indicators and optimizing every parameter and pretending like it isn't overfit, incorrectly calculating % gain and using incorrect performance metrics to match. No one knows if that guy even makes a ton of money through trading because he has never posted verifiable broker statements. Just skip the whole NNFX phase. Skip the whole manual backtesting phase too.

      10. If you live in the USA don't trade forex, trade futures instead and leverage prop firms with above 10k reviews on trust pilot. Tax incentives are better for futures than forex for USA citizens. Plus you are leveraged capped and can't really grid/martingale because of hedging rules/FIFO/measly leverage, and you can't trade CFD gold. 

      11. Again, don't quit your day job please

      12. The Mql5 documentation is absolutely fantastic. I didn't realize how good it was until I starting learning ninjascript, their documentation is so fragmentated and bad compared to mql5. You can right click on functions in mt5 and such and hit "Go to Help" and it brings you straight to it. Also the ninjatrader backtesting engine is dogwater.

      13. Ctrl + F2 add books marks in the mql5 IDE and F2 lets you skip between them. 

      14. Use 1 min ohlc data and force everything in the EA to only react on new 1 min bars. (unless its a manual trading panel or grid/martingale) I don't think I stressed how important that was. You'd need around 200GB of RAM to do a 5 year backtest on real ticks across 28 forex pairs compared to 1 min ohlc that uses around 32ish GB for 28 pairs across 5 years. 

      15. Good luck, and don't listen to financial influencers about anything. The only one I found helpful for mql5 coding on youtube was Rene Balke. His 3 hour tutorials was a very nice introduction to mql5 for me. Also simple trading systems will always be king  

       
      Victor Paul Hamilton #:
      Mean-reversion entries + trend following filter
      Huge TP + tiny trailing stop
      Low volatility trigger + fast SL
      Tight BB bands + M5 noise

        And the risk model does not match the strategy:

        200 pip TP is incompatible with M5 ranges
        10 pip trailing stop kills winners
        Only 1 year of data = curve fitting

          Mathematically, structurally, and logically, the EA is designed to fail.

          Hi Victor,


          Thanks for the critique, I appreciate it.

          Although I have a background in programming it was mainly on large databases and I'm finding it interesting writing object oriented code.

          I agree that the EA as it stands needs a huge amount of work, but when you are working on your own you need to see what if what you are doing makes sense.

          I realise that I need to go back and do some more analysis before I start coding again.

          I'm retired so this will be background task, thanks for your input.

          Regards

          Mike

           
          Csquared #:

          If you are completely new to mt5/trading in general here is the all the advice I would have wanted just starting out. All of this presupposes that along the way you are increasingly getting better at mql5 coding. 

          1. Don't quit your day job, having steady income is so nice and you don't realize how good it was until its gone. Don't quit your regular job until you make retirement levels of money 

          2. Be deathly scared of overfitting trading systems and always pursue statistical significance. This is a very good beginner playlist for avoiding overfitting that you should binge watch: https://www.youtube.com/playlist?list=PLv-cA-4O3y95J6xmwSaCILL4FlGJZO0PJ

          3. Learn to code multi symbol EAs based on this article: https://www.mql5.com/en/articles/234 (you don't have to follow the exact method, personally I use an extremely lean version)

          4. In normal trading systems you should also filter for news. There are plenty of different methods on the mql5 forum on how to do this. I recommend saving the economic events once from a live chart with a script using CalendarValue functions and then in the strategy tester environment loading them once into RAM and reading them to the EA that way. The reason you have to do it different compared to live news events is because Calendar functions do not work inside the strategy tester. (Also DST will be different in backtest vs live depending on your broker's data feed is setup when it switches from summer to winter. Using the cache method if I want to load events onto a chart and draw a line at each event then I have to apply a DST offset but in the strategy tester I do not. Why? I really don't know the exact reason lmao)

          5. Understand the differences in the strategy tester for Every tick Based on Real Ticks, Every Tick, 1 min OHLC, and open prices only. Real ticks are the actual incoming ticks but because forex is OTC ticks can be vastly different between brokers, especially during rollover, news, random spikes from banks doing something, etc. Every Tick is synthetically generated and I avoid using this because the ticks are not actually real and things like fast/tight trailing stops exploit how the ticks are generated and give extremely unrealistic results. 1 min OHLC is what I use and I force EVERYTHING inside my EAs to only react on new 1 min bars for that symbol on that chart (for multisymbol EAs) because forcing the EA to only react on new 1 min bars cuts down on noise/broker dependency ticks. This has given me the most realistic results in live vs backtest. Open prices only has a many caveats I don't feel like explaining right now. Read the documentation on your own time. 

          6. Download 1 min OHLC tick data from dukascopy (or whatever data provider) and set spread to something realistic or create your own algo/recording of spread prices at 1 min closes. 

          7. Don't write off grid/martingale trading. Manual grid trading with fixed daily/cycle loss and profit targets/limits is probably the most slept on edge in the wider trading industry. Also not all grid is martingale etc, also would recommend coding your entire grid system/panel management from scratch 

          8. Do not buy a mql5 product or any trading product if you do not know how it works. Also mql5/myfxbook/tradezilla results can easily be faked. 

          9. Everything you see on youtube relating to forex is 100% garbage designed to waste your time, sell you overpriced courses/discords/mentorships, or literally just rugpull you with unregulated prop firms/brokers that answer to no one. If you hear about them through Instagram, telegram, or tik tok they are 100% scamming you in some way shape or form. (Why would people sell their edges instead of just leveraging them to make supposed millions? People aren't even subtle about it anymore, youtube just recommended me a video "How I made 50,000,000 dollars forex trading" and its some bozo just selling a 100$ course hoping to feast on beginners that don't know better). Even stuff like No Nonsense Forex which got me into forex trading is lying to you about manual backtesting on daily chart by, not adding swaps that kill on the daily, adding 5 indicators and optimizing every parameter and pretending like it isn't overfit, incorrectly calculating % gain and using incorrect performance metrics to match. No one knows if that guy even makes a ton of money through trading because he has never posted verifiable broker statements. Just skip the whole NNFX phase. Skip the whole manual backtesting phase too.

          10. If you live in the USA don't trade forex, trade futures instead and leverage prop firms with above 10k reviews on trust pilot. Tax incentives are better for futures than forex for USA citizens. Plus you are leveraged capped and can't really grid/martingale because of hedging rules/FIFO/measly leverage, and you can't trade CFD gold. 

          11. Again, don't quit your day job please

          12. The Mql5 documentation is absolutely fantastic. I didn't realize how good it was until I starting learning ninjascript, their documentation is so fragmentated and bad compared to mql5. You can right click on functions in mt5 and such and hit "Go to Help" and it brings you straight to it. Also the ninjatrader backtesting engine is dogwater.

          13. Ctrl + F2 add books marks in the mql5 IDE and F2 lets you skip between them. 

          14. Use 1 min ohlc data and force everything in the EA to only react on new 1 min bars. (unless its a manual trading panel or grid/martingale) I don't think I stressed how important that was. You'd need around 200GB of RAM to do a 5 year backtest on real ticks across 28 forex pairs compared to 1 min ohlc that uses around 32ish GB for 28 pairs across 5 years. 

          15. Good luck, and don't listen to financial influencers about anything. The only one I found helpful for mql5 coding on youtube was Rene Balke. His 3 hour tutorials was a very nice introduction to mql5 for me. Also simple trading systems will always be king  

          Hi,

          Thanks for the great information, I really appreciate it, I'll review the links and get back to some basics

          Although I have a background in programming it was mainly on large databases and I'm finding it interesting writing object oriented code.

          I agree that the EA as it stands needs a huge amount of work, but when you are working on your own you need to see what if what you are doing makes sense.

          I realise that I need to go back and do some more analysis before I start coding again.

          I'm retired so this will be background task, thanks for your input.

          Regards

          Mike

           
          Hossain Anan #:
          Mike, expectation and execution fidelity are significantly more important than the quantity of deals. A "good EA" exhibits the same behavior in forward and backtesting, a clean equity curve, a steady advantage across several market regimes, and little reliance on curve-fit parameters. You're headed in the correct direction if your reasoning holds up in tick-data testing with actual spreads and walk-forward validation.

          Hi Hossain,


          Thanks for your reply, I appreciate it.

          I'm still learning object oriented programming, and thanks to you and others I realise I have to do some more analysis before I start to code again.

          I'm retired so I have plenty of time to learn.

          Regards

          Mike

           
          Csquared #:
          Tax incentives are better for futures than forex for USA citizens.

          You've posted a great brochure for beginning traders.

          One minor correction if I may... If you're referring to 26 U.S.C. § 988 versus §1256 election, they both apply to Futures and FX.

          In any event, I prefer Futures over FX too.

           
          mimann #:

          Hi Victor,


          Thanks for the critique, I appreciate it.

          Although I have a background in programming it was mainly on large databases and I'm finding it interesting writing object oriented code.

          I agree that the EA as it stands needs a huge amount of work, but when you are working on your own you need to see what if what you are doing makes sense.

          I realise that I need to go back and do some more analysis before I start coding again.

          I'm retired so this will be background task, thanks for your input.

          Regards

          Mike

          Hi Mike , Yeah just trying to keep you on the straight and narrow so many fantasists in this game either jackpot chasers or coders who believe or want people to believe in hype . That's great you are interested in making Experts as a hobby and have taken your first steps  ,it is endless hours of fun and frustration . I started for fun and have made some cash from selling experts , so that is nice as well .

          Make your experts then stick them on demos and see them in action . Honestly back tests are not the best ,real back tests not curve fits ( which you can make unintentional or sinister lol ) If some of the experts I have (and traded live and made a profit)  had lovely looking back tests I could sell them but the irony is it is the ones that look good that are trash . 

           
          Ryan L Johnson #:

          You've posted a great brochure for beginning traders.

          One minor correction if I may... If you're referring to 26 U.S.C. § 988 versus §1256 election, they both apply to Futures and FX.

          In any event, I prefer Futures over FX too.

          I thought §1256 only applied to futures and not CFD forex? Not a taxman so idk. Futures prop firms definitely have a better reputation than forex prop firms.
           

          Good EA won't trade martingale or grid. It opens trade with TP/SL with a proper risk control. Last but not least, it trades a profitable strategy that provide the high winning rate.

           
          Csquared #:
          I thought §1256 only applied to futures and not CFD forex? Not a taxman so idk. Futures prop firms definitely have a better reputation than forex prop firms.
          No worries. Federal Income Taxation and Financial Regulation were part of my law school education.  For your info... CFD's are actually banned in the U.S. and FX trades in the U.S., by law, must ultimately be cleared in the interbank/wholesale FX market. In contrast, CFD's are only cleared by a broker-dealer's captive liquidity and retail pool. I wrote up a template for properly documenting the making of the election for Futures and FX. Both IRS Code Sections apply to both.