fxDreema

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

    A question about the http request

    Questions & Answers
    4
    13
    2253
    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.
    • Zackry
      Zackry last edited by

      When we use the http request function, does this function pass the values through url?
      Let's say we wanna send the account number "123456" to "xyz.com"
      Will the account number be sent by adding the account number inside of the url itself? Or is it some other way

      I am totally ignorant about the http request, and for some reason I can't understand it at all.
      So pardon me if it's a totally crappy question

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

        This is a question for roar and miro, obviously! 🙂

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

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

          @l-andorrà alright then, it seems I'll need to request the legend level players to have a look at this topic then 😆

          @miro1360 and @roar can you help out please 😄

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

            @zackry never used that block lol 😄

            Based on my tiny knowledge of http stuff, you have to use POST method for sending the account number, but yeah I'd guess its possible with that block.
            https://www.w3schools.com/tags/ref_httpmethods.asp

            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

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

              yes it should work
              or use the Custom MQL code block, compose a line of the WebRequest() function using this note:
              https://docs.mql4.com/common/webrequest

              Between trading and gambling is a very small gap, be careful.

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

                thanks @miro1360 and @roar
                okay so if the request sends the data in the form of a url , then does that mean the url needs to be interpreted at the receiving end using a server and some server side coding ?

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

                  yes, if it is your server, you can do all the stuff, just check some simple tutorials on youtube:
                  https://www.youtube.com/watch?v=dgvLegLW6ek
                  if it is a different server, you need to adapt to it

                  Between trading and gambling is a very small gap, be careful.

                  Zackry 2 Replies Last reply Reply Quote 0
                  • Zackry
                    Zackry @miro1360 last edited by

                    @miro1360 thanks Miro thanks a lot , will check it out

                    1 Reply Last reply Reply Quote 0
                    • Zackry
                      Zackry @miro1360 last edited by

                      @miro1360 hi miro, it took me a while to understand the http request to the python server, but I finally got a bit of understanding, I tested it and it's working, I created a simple http server on a vps and exposed it to internet via ngrok
                      And then sent the request via an ea made in fxdreema, the request was received splendidly....

                      A question about this whole cycle, let say the ea send the request to the server, does it wait for the response by default?

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

                        Waiting for the response is executed by a WebRequest() function which is part of the block "Send HTTP request" and sadly it is synchronous - it breaks the EA and waits for the response from the requested server in a specific delay (can be set). If the delay elapses without the response, EA continues in a normal cycle. If this whole thing works I can't confirm because I've never tried it 😄 If you want something more dynamic, you can try at least 2 possibilities:

                        • program your own waiting server outside MT4 (use something as simple as the python again)
                        • lazier (and still functional) workaround: create another EA - purely only as a waiting EA for the request 😄 and bridge it with your main EA using global variables 😄 (global variables in MQL == Terminal variable in fxdreema) ... if you need more "asynchronous" requests, simply open more waiting EAs and more variables 😄 😄

                        Between trading and gambling is a very small gap, be careful.

                        Zackry 2 Replies Last reply Reply Quote 0
                        • Zackry
                          Zackry @miro1360 last edited by Zackry

                          @miro1360 i never thought about creating another as a waiting EA, the thought never crossed my mind , and kept on hitting my head to find a way, thanks for the idea miro , definitely gonna try the waiting ea method cuz its much more simpler .....

                          1 Reply Last reply Reply Quote 0
                          • Zackry
                            Zackry @miro1360 last edited by

                            @miro1360 by the way is there any way of storing the response into a variable ?

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

                              do you mean this response? if so, you can try it and tell us if that worked 😄

                              0_1589160942536_bd17ba14-897b-4d14-8c33-06127288f4f1-image.png

                              Between trading and gambling is a very small gap, be careful.

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

                              Online Users

                              D
                              S
                              G

                              12
                              Online

                              146.7k
                              Users

                              22.4k
                              Topics

                              122.6k
                              Posts

                              Powered by NodeBB Forums | Contributors