fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    1. Home
    2. kwasati
    K
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 3
    • Best 0
    • Controversial 0
    • Groups 0

    kwasati

    @kwasati

    0
    Reputation
    1
    Profile views
    3
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    kwasati Unfollow Follow

    Latest posts made by kwasati

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

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

      posted in Questions & Answers
      K
      kwasati
    • Why "undeclared identifier" even though I've done everything correctly?

      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));
      }
      
      
      posted in Questions & Answers
      K
      kwasati
    • Why still drawing line when position open with no position block?

      2024-12-18_9-07-47.jpg

      I encountered an issue with order execution and drawing lines. Normally, the EA works fine, but sometimes, after an position is placed, the EA continues to draw lines even though it's set not to draw when a position is open. I've also set the position-opening condition to 'no position,' but it still opens a position. I’m not sure what’s causing this or how to fix it.

      posted in Questions & Answers
      K
      kwasati