fxDreema

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

    Custom Code / Custom Block /HTTP

    Questions & Answers
    3
    8
    417
    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.
    • K
      kaifsajid last edited by kaifsajid

      Hi All,

      I checked through the fxdreema forum and couldn't find anwer's to this.

      Basically i want to send web request in plain text format. So i didnt know how to do this within fxdreema as each request i sent was always incorrect format. I watched few youtube videos online managed to create below mql5 syntax which works on its own in MT5.

      However ideally i want to know how i can send below using web request block or if someone can help me convert the below to custom mql5 code or explain how i can create a custom block and use it that way.

      Any help or guide to even convert the below to custom mql5 or custom block will be appreciated. Ideally would be great if i can use the existing send http block

      input string BASE_URL = "https://";
      input string Syntax_Info = "ENTER Syntax";
      
      
      int OnInit(){
         execute();
         return(INIT_SUCCEEDED);
      }
      
      int execute(){
         char post[], result[];
         string headers = "Content-Type: text/plain\r\n";
         StringToCharArray(Syntax_Info,post,0,StringLen(Syntax_Info));
         int res = WebRequest("POST",BASE_URL,headers,5000,post,result,headers);
        
         return res;
      }
      

      Thanks in advance

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

        This is a question for jstap or roar. I hope they can help.

        (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.

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

          In FX things work a little differently, although you can use code, much is already inside so you cannot add again, on init is all done on the on init tab, arrays although they work need to be set up separately, execute would be completed without execute() when everything. You will need has been populated

          input string BASE_URL = "https://";
          input string Syntax_Info = "ENTER Syntax"; THESE LINES WOULD NEED DELETING, AND STRING VARIABLES CREATING WITH THESE NAMES

          int OnInit(){
          execute();
          return(INIT_SUCCEEDED); THESE LINES NEED DELETING
          }

          int execute(){
          char post[], result[];
          string headers = "Content-Type: text/plain\r\n";
          StringToCharArray(Syntax_Info,post,0,StringLen(Syntax_Info));
          int res = WebRequest("POST",BASE_URL,headers,5000,post,result,headers); THIS WOULD NEED TO BE DELETED AND RECREATED AS A SEPARATE ARRAY

          return res; DELETE THIS
          }

          Learn fxDreema Without the Wait!

          My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

          The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

          Don’t miss out

          Click here➡️ https://mybook.to/fxDreema to get your copy today!

          Enjoy! 😊

          K 1 Reply Last reply Reply Quote 0
          • K
            kaifsajid @jstap last edited by

            @jstap thanks for your reply.

            i just dont understand how i would execute this part

            int res = WebRequest("POST",BASE_URL,headers,5000,post,result,headers); THIS WOULD NEED TO BE DELETED AND RECREATED AS A SEPARATE ARRAY

            any help on how to do this would be great.

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

              You will have to learn arrays, I am not great at them either. Create an array then fill it

              Learn fxDreema Without the Wait!

              My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

              The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

              Don’t miss out

              Click here➡️ https://mybook.to/fxDreema to get your copy today!

              Enjoy! 😊

              1 Reply Last reply Reply Quote 0
              • K
                kaifsajid last edited by

                @fxDreema are you able to help with the above by any chance?

                1 Reply Last reply Reply Quote 0
                • K
                  kaifsajid last edited by

                  This is now resolved. Thanks everyone helping

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

                    What did you do to resolve it?

                    Learn fxDreema Without the Wait!

                    My comprehensive book, available on Amazon, is packed with examples and invaluable insights to help you fast-track your learning journey.

                    The paperback and hardback editions include MT4 & MT5 QR codes for easy access to all prebuilt projects and robots, including my latest gold trading robot!

                    Don’t miss out

                    Click here➡️ https://mybook.to/fxDreema to get your copy today!

                    Enjoy! 😊

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

                    Online Users

                    H
                    S
                    M
                    E
                    G
                    D
                    A

                    18
                    Online

                    146.7k
                    Users

                    22.4k
                    Topics

                    122.6k
                    Posts

                    Powered by NodeBB Forums | Contributors