fxDreema

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

    Save .csv file to a different location.

    Questions & Answers
    3
    7
    1483
    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.
    • F
      fabiobioware last edited by

      Hello friends, I can save the file generated by fxdreema in a subfolder inside the files folder just by placing foldername\filename

      But i want to save the file in a file folder of another metatrader how can i do this?

      l'andorrà 1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà @fabiobioware last edited by

        @fabiobioware Not sure what you mean. Can't you install the mq4 file on one specific MT4 platform? All files are ti be installed in the 'expert' folder.

        (English) I will try to help everyone in these fxDreema forums. But if you want to learn how to use the platform in depth or more quickly, I can help you with my introductory fxDreema course in English at https://www.theandorraninvestor.eu.

        (Català) Miraré d’ajudar tothom en aquests fòrums d’fxDreema. Tanmateix, si vols aprendre a fer servir la plataforma amb més profunditat o més de pressa, t’hi puc ajudar amb el meu curs d’introducció a fxDeema en català a https://www.theandorraninvestor.eu/ca.

        (Español) Intentaré ayudar a todo el mundo en estos foros de fxDreema. Sin embargo, si quieres aprender a usar la plataforma en profundidad o más deprisa, te puedo ayudar con mi curso de introducción a fxDreema en español en https://www.theandorraninvestor.eu/es.

        F 1 Reply Last reply Reply Quote 0
        • F
          fabiobioware @l'andorrà last edited by

          @l-andorrà Excuse me friend, I was wrong.
          You are working with that block "Write to file" that is inside the menu "Output and Communication"

          This block has submitted files to the .csv extension that are to be excelled.

          I realized that this file can only be saved within the "Files" paste or then I can create a sub-pasture within this "Files" paste to be able to work with it.

          I want to save the file that was generated by this block in a local file for "File".

          F 1 Reply Last reply Reply Quote 0
          • F
            fabiobioware @fabiobioware last edited by

            @l-andorrà Sorry buddy, I think I expressed myself badly.
            I am working with that "Write to file" block that is inside the "Output and Communication" menu

            This block works only with files in the .csv extension which is from excel.

            I realized that this file can only be saved inside the "Files" folder or else I can create a subfolder inside this "Files" folder to be able to work with it.

            I want to save the file that is generated by this block in a location outside the "File" folder.

            M 1 Reply Last reply Reply Quote 0
            • M
              miki @fabiobioware last edited by miki

              @fabiobioware if you want save file in other location on your pc , on the header of mql5 file you must add these lines:

              #import "shell32.dll"
              int ShellExecuteW(int hwnd,string operation,string file,string parameters,string directory,int showCmd);
              #import

              and when you want to copy, in the project:

              string strFrom = "C:\\Path\\you\\want\\copy\\namefile.csv";
              string strTo = "C:\\Path\\where\\copy;
              string strParameters = "/c copy " + strFrom + " " + strTo;

              int result = ShellExecuteW(0, "open", "cmd.exe", strParameters, NULL,1);
              if (result <= 32) Alert("Shell Execute Failed: ", result);

              Important double backslash in the path.

              F 1 Reply Last reply Reply Quote 0
              • F
                fabiobioware @miki last edited by

                @miki thank you, sorry i'm very lay programming.

                Let's see if I understand ...

                1. First step is to generate my .mq5 source code file, open it and insert the codes below at the beginning before all the programming it already has.

                #import "shell32.dll"
                int ShellExecuteW (int hwnd, string operation, string file, string parameters, string directory, int showCmd);
                #import

                1. Second step is to generate within my project 3 constants all as data type "string" and insert in the first 2 the paths of origin and destination and in the third insert the data as you wrote.
                  Place a block of fxdreema's mql code and place this code below it in one piece linked to a "pass" in ONTICK.

                string strFrom = "C: \ Path \ you \ want \ copy \ namefile.csv";
                string strTo = "C: \ Path \ where \ copy;
                string strParameters = "/ c copy" + strFrom + "" + strTo;

                int result = ShellExecuteW (0, "open", "cmd.exe", strParameters, NULL, 1);
                if (result <= 32) Alert ("Shell Execute Failed:", result);

                can you confirm that I got it right?

                M 1 Reply Last reply Reply Quote 0
                • M
                  miki @fabiobioware last edited by

                  @fabiobioware first step is open a custom mql code block, copy past the second part of code and use it in your project when you want copy file. If for example you want copy at start put the block in OnInit tab otherwise in OnTick tab.
                  Download source file .mql5 open it and add first part of code on the top after #define section. Stop.

                  0_1614965389831_Immagine.png

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

                  Online Users

                  A
                  F

                  14
                  Online

                  146.7k
                  Users

                  22.4k
                  Topics

                  122.6k
                  Posts

                  Powered by NodeBB Forums | Contributors