fxDreema

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

    Write unrealizad profit and loss when test

    Questions & Answers
    2
    7
    1333
    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.
    • A
      arturoroberto last edited by arturoroberto

      Hello everyone:

      I want to test an EA in mt4 that when opens a trade, write in excel the following: (open price, maximum profit not made, maximum loss not made, closing price)
      how can I do?

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

        There is a block to write information "Write on file". But I used "Comment" for this example: https://fxdreema.com/shared/ooSeSTUHb

        A 1 Reply Last reply Reply Quote 1
        • A
          arturoroberto last edited by arturoroberto

          ok !! I get the Variables max profit and max loss.

          but can you tell me if in a trade suppouse I open a buy position at 19.0000 and my SL is when PSAR cross the price.. during the trade the highest profit reached was at 19.20000 but, closes at 18.80000 because the close of the PSAR reversal condition.

          so, I want to study my EA in the strategy tester of mt4 writing into an excel file this results to have like this columns:

          [trade number][Open Price][close price][high profit unrealized (and it will be the max profit of the variable you create in the example)]

          then I can make some changes in the parameters.

          I hope I explain my self because I have a poor english ๐Ÿ™‚

          Regards.

          ArtPatFX

          1 Reply Last reply Reply Quote 0
          • A
            arturoroberto @fxDreema last edited by

            @fxdreema ok !! I get the Variables max profit and max loss.

            but can you tell me if in a trade suppouse I open a buy position at 19.0000 and my SL is when PSAR cross the price.. during the trade the highest profit reached was at 19.20000 but, closes at 18.80000 because the close of the PSAR reversal condition.

            so, I want to study my EA in the strategy tester of mt4 writing into an excel file this results to have like this columns:

            [trade number][Open Price][close price][high profit unrealized (and it will be the max profit of the variable you create in the example)]

            then I can make some changes in the parameters.

            I hope I explain my self because I have a poor english ๐Ÿ™‚

            Regards.

            ArtPatFX

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

              I don't understand what you want to do now. You got the max loss and max profit values? ๐Ÿ™‚

              A 1 Reply Last reply Reply Quote 0
              • A
                arturoroberto @fxDreema last edited by arturoroberto

                @fxdreema 0_1534737545494_2018-08-19.png

                Ok, Iยดll try to explain...

                I use a PSAR indicator to open and close trades.

                on the chart, the first text on red is the open trade condition at 19.02059 and that trade reaches the max profit at 19.16433 but then the price falls and closes at 18.96956 because the closing trade condition.

                I want to know if when I backtest my EA on the strategy tester on MT4, the results can be writed in an excel file for each trade with how many profit and loss in pips or money was reached .

                like the second image.

                0_1534738315784_2018-08-19 (1).png

                I hope it can... and thanks for your time to reply...

                Regards

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

                  But I posted some example above to calculate this max profit. The EA doesn't collect such profits otherwise. I have 2 variables - maxProfit and maxLoss - and they collect the maximum profit and loss as a money amount. The problem is that those are only 2 variables and it will not work if you want to collect the profits from multiple trades at the same time. To do this, arrays of data will need to be used. But if you have only 1 trade at a time, those 2 variables will work good.

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

                  Online Users

                  F
                  M
                  N
                  H
                  K
                  W
                  S

                  17
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors