fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    USING THE TESTERWITHDRAWAL() FUNCTION FOR MODELING THE WITHDRAWALS OF PROFIT

    Questions & Answers
    3
    6
    2793
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Vinicius Pereira
      Vinicius Pereira last edited by Vinicius Pereira

      Hello guys
      I'm wonder if anyone has already implemented the TESTERWITHDRAWAL() function to simulate commission broker and slippage in your expert advisor and could help me how to insert it in my next Fxdreema EA to make ours Backtest more realist.

      What is IDEAL to our community, everyone will gain if you reader can explain how to do call TESTERWITHDRAWAL() and if possible insert constants as:

      • Comission
        ** Money ex: withdraw $1 dolar
        ** OR Points ex: withdraw 2 pips
        ** OR Percent ex: withdraw 0.5% of money on deal

      • Withdraw happens for every
        ** Lots, withdraw from every lot
        ** Deal, withdraw from deal

      • Withdraw Slippage
        ** Pips

      • Withdraw happens at
        ** OpenClose
        ** Open

      What I need to do right now: withdraw $1 every deal + slippage.

      Can someone help me please? 🙉
      Thanks!

      References: USING THE TESTERWITHDRAWAL() FUNCTION FOR MODELING THE WITHDRAWALS OF PROFIT

      Hello dear trader! I'm from Brazil and use to trade Commodities available here.

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        I think there is a Withdrawal block for MQL5, somewhere at the bottom. But in MQL4 there is no such function unfortunately, so if you are asking for MQL4.... I have no idea how to make anything like that 🙂

        Vinicius Pereira 1 Reply Last reply Reply Quote 0
        • Vinicius Pereira
          Vinicius Pereira @fxDreema last edited by

          @fxDreema mql5, I'll check it out
          Thank you

          Hello dear trader! I'm from Brazil and use to trade Commodities available here.

          1 Reply Last reply Reply Quote 0
          • Vinicius Pereira
            Vinicius Pereira last edited by Vinicius Pereira

            Hey Radoslav thank you for implementing it!

            I saw now new block in "More => Withdraw", I've implemented a expert advisor that uses it and I have another question

            I can see the equity curve it's different, this is a system with withdraw 0
            withdraw 0

            This is a system with withdraw 100
            withdraw 100

            In the screen below you can see I've optimized the widthdraw_money and it will impact the drawdown of the tradesystem, it's mean that you function works. But the "Result" still the same 😞

            withdraw

            The main point I want such function is to "penalize" and see it in the Results, but it does not change in tester "results => Result" or in the optimization process.

            This is a metatrader 5 limitation?

            Anybody know how to withdraw and change the "Result" of the equity?

            Thank you guys!!!

            Hello dear trader! I'm from Brazil and use to trade Commodities available here.

            M 1 Reply Last reply Reply Quote 0
            • fxDreema
              fxDreema last edited by

              You know, I have no idea. This "Withdraw" block only exists in MQL5, because only in MQL5 there is a function for that. But it is a simple function, so this block is very very simple. I checked it now, it shows some withdrawal action, but I don't know how it works when optimizing. You may find something more interesting in their website - https://www.mql5.com/en/search#!keyword=testerwithdrawal

              1 Reply Last reply Reply Quote 1
              • M
                moreirajbn @Vinicius Pereira last edited by

                @vinicius-pereira

                I haven't tried it, but you can add a custom optimization criteria to your EA.... if you set that to "profit minus withdrawal" you'll probably get what you need.

                CREATING CUSTOM CRITERIA - https://www.mql5.com/en/articles/286

                I'm not a programer and haven't had enough time to dig into and it to my EA's, but it's something I'm interested in as well (also trade BMF in Brazil). So if you know how to add it to the EA code, I really appreciate if you could show me the way...

                thanks a lot.

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post

                Online Users

                E
                N
                N
                F
                M
                A
                L
                O
                S

                24
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors