fxDreema

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

    Why "undeclared identifier" even though I've done everything correctly?

    Questions & Answers
    4
    6
    1171
    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
      kwasati last edited by

      2025-03-11_13-28-03.png

      I can't fix this kind of problem. I don't know what to do.
      Here is the code inside the custom MQL code.

      int ErrorCode;
      string RequestMethod = "POST";
      string Google_Sheets_API_URL = "xxxxxx"; 
      string headers, messagestring;
      char msgData[], result[];
      string result_headers;
      int timeout = 10000;
      
      //----- Create Header -----
      headers = "Content-Type: application/json\r\n";
      
      // ----- Create Message Char Array -----
      messagestring = "{"
                        "\"order_type\": \"" + position_type + "\","
                        "\"currency\": \"" + Currency + "\","
                        "\"timeframe\": \"" + timeframe + "\","
                        "\"open_price\": \"" + DoubleToString(pending_open_price, 5) + "\","
                        "\"tp\": \"" + DoubleToString(tp_price, 5) + "\","
                        "\"sl\": \"" + DoubleToString(sl_price, 5) + "\","
                        "\"trading_score\": \"" + IntegerToString(trading_score) + "\","
                        "\"trading_analyst\": \"" + trading_analyst + "\","
                        "\"ticket_number\": \"" + IntegerToString(ticket_number) + "\","
                        "\"time_stamp\": \"" + time_stamp + "\""
                      "}";
      
      StringToCharArray(messagestring, msgData, 0, WHOLE_ARRAY, CP_UTF8);
      ArrayResize(msgData, ArraySize(msgData) - 1);
      
      //----- Send HTTP Request -----
      int res = WebRequest(RequestMethod, Google_Sheets_API_URL, headers, timeout, msgData, result, result_headers);
      if (res == 1) {
          ErrorCode = GetLastError();
          Print("WebRequest Error:", ErrorCode);
          if (ErrorCode == 4060) {
              Alert("Add the address '" + Google_Sheets_API_URL + "' in the list of allowed URLs on tab 'Expert Advisrs' ");
          }
      } else {
          Print("Server response: ", CharArrayToString(result));
      }
      
      
      1 Reply Last reply Reply Quote 0
      • l'andorrà
        l'andorrà last edited by

        Are you suer all those variables you are showing were correctly created on fxDreema? I mean those exact names.

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

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

          @l-andorrà Yes, Im sure. this picture and code show this.

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

            Then I'm afraid I don't know the reason, sorry. Probably the reason is within that custom code. We need a programmer here, and I'm not I'm afraid.

            (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
            • B
              Byens last edited by

              Try OP_BUYLIMIT

              https://entrepreneurstart.pw | https://www.mql5.com/en/users/byens8199

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

                Everything you have there does work on FX I've done it many times, occasionally fx goes wrong and the way to fix is start from scratch. I would create a small test project just doing 1 variable, then move on until they all work

                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

                A
                S
                B
                A

                23
                Online

                146.7k
                Users

                22.4k
                Topics

                122.6k
                Posts

                Powered by NodeBB Forums | Contributors