Code a custom criteria in mql5

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ม.ค. 2025

ความคิดเห็น • 35

  • @trustfultrading
    @trustfultrading  ปีที่แล้ว

    What criteria do you use for your optimizations? 🙂

    • @erickkillian5590
      @erickkillian5590 8 หลายเดือนก่อน

      Recovery Factor, Expected Payout, Drawdown, and Net Profit. See my below comment/code and let me know what you think please? Thank you.

  • @maffysmods9718
    @maffysmods9718 ปีที่แล้ว

    Fantastic video again Toby - great job - your the best on youtube

  • @bosand2347
    @bosand2347 ปีที่แล้ว

    Thank you so much for this lesson! This helped me a lot.
    I always use dynamic lots in my EAs (based on Balance) and the native MT5 optimization reports are based on Maximum DD. I needed the Relative DD, as the DD % and Recovery Factor in the MT5 optimization reports are calculated based on Max DD, which is irrelevant for a dynamic lots EA. The Relative DD is not included in any optimization reports by MT5, not even in the exported report Excel file, so I had to manually run individual tests to find the best Relative DD..
    My criteria now is the Max Profit / Relative DD% ratio.
    I'm wondering if you can make a video on how to show multiple input variables in an optimization chart - you mention in one of your videos you have that coded too.
    Thanks again - you're brilliant!

  • @Stisse12
    @Stisse12 10 หลายเดือนก่อน

    Thanks I learned so much from your videos. Awesome!

    • @trustfultrading
      @trustfultrading  10 หลายเดือนก่อน

      Thats nice to hear. I'm trying to make helpful content :)

  • @fredysoto8547
    @fredysoto8547 ปีที่แล้ว

    Hi Tobi, I wait for Your Video cause I know that are Important!! Thanks!

  • @davidabushnell
    @davidabushnell ปีที่แล้ว

    I plan to definitely include Recovery Factor since it = Profit / DD. That’s what I normally use for opt

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +2

      Yeah there are a lot more numbers you can use. Take a look at the ENUM_STATISTICS ;)

  • @androidiosdeveloper4771
    @androidiosdeveloper4771 ปีที่แล้ว

    Hi Tobi, I like Your Videos too much! Thanks!

  • @milkovivaldi
    @milkovivaldi หลายเดือนก่อน

    You have a different IDE, how can I get it?

  • @cybercaa7482
    @cybercaa7482 ปีที่แล้ว

    This is what I was looking for, thanks

  • @kamilzawislak3844
    @kamilzawislak3844 ปีที่แล้ว

    Hi, thanks for the content! Can you describe the issue how to detect if stoploss was triggered? About Ontradetransation event. Thanks

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Hmm, you could just check if you still have a trade open? But yeah, the Ontradetransation is a little bit hard to understand. Maybe I do this in the future.

    • @ebrahk8010
      @ebrahk8010 6 หลายเดือนก่อน

      @@trustfultrading perhaps use a position counter in the EA that updates as positions are opened or closed? suggested code snippet below; // Create the positions counter label
      if (!ObjectCreate(0, "PositionsCounter", OBJ_LABEL, 0, 0, 0)) {
      Print("Error creating positions counter label!");
      return INIT_FAILED;
      }
      ObjectSetInteger(0, "PositionsCounter", OBJPROP_CORNER, CORNER_LEFT_LOWER);
      ObjectSetInteger(0, "PositionsCounter", OBJPROP_XDISTANCE, 10);
      ObjectSetInteger(0, "PositionsCounter", OBJPROP_YDISTANCE, 20);
      ObjectSetInteger(0, "PositionsCounter", OBJPROP_COLOR, clrAqua);
      ObjectSetInteger(0, "PositionsCounter", OBJPROP_FONTSIZE, 12);

      return(INIT_SUCCEEDED);
      }
      Than you for teaching us how to code, learning from your videos

  • @PsYKeDeLiC69
    @PsYKeDeLiC69 9 หลายเดือนก่อน

    Hello, thank you for your video, very informative and helpful.
    Do you know if there is a way to add a column in the tester I could sort on. Like for example the EA is taking trades on several strategies, (setup1: breakout, setup2: EMA crossing or whatever else),
    The EA would take trades on each of these setups
    Then the tester could show which of these setups is the best strategy , how many times setup 1 has been taken, the average profit for each setup etc.
    Do you think this is possible ?

    • @trustfultrading
      @trustfultrading  9 หลายเดือนก่อน

      Hi, you could add a input for each strategy

    • @PsYKeDeLiC69
      @PsYKeDeLiC69 9 หลายเดือนก่อน

      @@trustfultrading Thank you for your reply. Yes, but the EA should take trades on every strategy/ setup, but then in the results I'd like to know which setup is the best happening more often etc. If I use an input parameter, I would have to run it several times right, and chage the input. but when ran together, when one trade is open, maybe it would disturb the process of taking another setup (trade already open etc), so not clear results if ran independently.
      I found a solution, I'd need to log every trades taken into a log in a file for example so I can have other statistics

  • @bigrichlegend5163
    @bigrichlegend5163 ปีที่แล้ว

    Very informative Toby. I wonder if you would be able to make an indicator from your "Range Breakout EA"? According to my rendition of the Range Breakout EA, it does not work if you start it at adhoc times. It seems as if it has to run continually

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว

      Thanks, I don't really understand your point. A EA always runs 24/5 on a server.

    • @bigrichlegend5163
      @bigrichlegend5163 ปีที่แล้ว

      suppose for whatever reason you are running your EA on your home computer and NOT using a VPN and you turn it on Monday at 7AM to start trading. You would want it to draw the required breakout lines and start trading from the point it was initiated on the chart. At the present the EA is not able to do that. I find if there was an indicator on the chart then it would be possible to modify the code to trade at whatever adhoc times you want to.

  • @dickychristian9821
    @dickychristian9821 ปีที่แล้ว

    great tutorial video as always, thanks!!
    I have a request for you, can you teach us how to convert single-symbol EA to multi-symbol EA?
    I think this is an important and interesting topic. It can help us see the equity curve and performance metrics/criterias of EA when applied to many symbols on strategy tester.
    Thank you.

    • @trustfultrading
      @trustfultrading  ปีที่แล้ว +2

      Great suggestion! I know of two ways to do this. There is something coming in a few weeks ;)

  • @khamilabubakar9439
    @khamilabubakar9439 ปีที่แล้ว

    Hi. Help code a moving average crossover robot based on moving average, the last moving average based on the first MA data (PID). THANKS

  • @XaviAndreu
    @XaviAndreu ปีที่แล้ว +1

    Bien juegado

  • @MQLwithBrian
    @MQLwithBrian ปีที่แล้ว

    Every tick takes forever to finish 😂