fxDreema

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

    Write To File: Swing

    Questions & Answers
    2
    6
    1808
    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.
    • B
      Bigape last edited by

      From a link on Tutorial By User (FxDreema) I have extrapolated this fantastic listing for the calculation and use of the swing (ZigZag). I managed to plot the values (high - low) of the previous swing on the graph. In addition, the differential (Delta) of the two previous values was always shown on the graph.
      Now I would like to back-test the EA, write a file, in .cvs format, which reports the differential (Delta) for each generated swing, in order to make some statistical processing on the .csv file, so generated.
      This is the link, with the work to finish ...
      https://fxdreema.com/shared/NPjU0bSib

      Thanks to those who will help me, correcting my mistakes.

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

        I think the "write to file" needs a specific file path, like "D:\Metatrader..."
        I am too lazy to have ever figured it out, instead I have used my own dirty stop-gap solution:
        Just write the variables to your mt4 journal tab, with fxdreema block "Log message". Then generate the .log file and use some other programs (notepad++, excel) to further arrange the data

        Need small help? Tag me in your post
        Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

        B 1 Reply Last reply Reply Quote 0
        • B
          Bigape @roar last edited by Bigape

          @roar

          Thanks for the reply
          For these things I'm pretty inexperienced.
          Could you use the link I posted to write an example of what you say?
          I would be very grateful; it is several days that I work on this listing and I still have not been able to get what I want.

          Thanks a lot

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

            Like, just add these blocks to your current project:
            0_1548865577129_b51292e7-14f9-4223-b8e4-1fd0bee49d39-image.png

            Then, run mt4 backtest
            0_1548865611322_7cad004d-25ee-4178-b810-e9fc9304006b-image.png

            The data will be in the journal now
            0_1548865649969_92407ad6-a943-4d13-bef2-6784f899267d-image.png

            Use notepad++ to open the .log file
            0_1548866632782_06b93e9f-e8e8-4ed1-bf2c-2eaeb0f31941-image.png

            Paste it to excel, the format will be messy at this point, we can use formula =RIGHT(C1;(LEN(C1)-51)) to pick only the interesting part to column L.
            Hit Ctrl+enter to apply the formula to entire column.
            0_1548866421097_0ddb9783-4518-45ec-b92b-a160498d26f9-image.png

            I know, this is not optimal approach by any means, but it works in a pinch 😄

            Need small help? Tag me in your post
            Need big help? https://www.fiverr.com/big_algo/automate-your-winning-strategy-in-mql4-or-mql5

            B 1 Reply Last reply Reply Quote 0
            • B
              Bigape @roar last edited by

              @roar

              Wow! You are the Man!

              Many, many thanks.
              I will try what you have indicated / programmed and I will let you know about the outcome.

              B 1 Reply Last reply Reply Quote 0
              • B
                Bigape @Bigape last edited by

                @bigape

                Hi Roar,

                it works perfectly!

                Thanks again

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

                Online Users

                F
                R
                S
                D
                V
                O

                15
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors