DislikedPost log again: Use below Code void OnStart() { // 1. Define the URL. Replace <my_token> with your actual bot token. // **REPLACE <my_token> BELOW WITH YOUR ACTUAL TELEGRAM BOT TOKEN** string url = "https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe"; // Replace with your bot token // 2. Prepare variables for the WebRequest. char result[]; // Array to store the result of the request. string result_headers; // String to store the response headers. string headers = "User-Agent: MetaTrader/4.0"; // Set a user agent. char dummyArray[];...Ignored
Inserted Code
0 17:12:51.071 Script Mw_telegram_test TRUMPUSD,M5: loaded successfully
0 17:12:51.088 Mw_telegram_test TRUMPUSD,M5: initialized
0 17:12:59.117 Mw_telegram_test TRUMPUSD,M5: WebRequest failed. Error: 5203
0 17:12:59.674 Mw_telegram_test TRUMPUSD,M5: Test WebRequest succeeded. Response: 200 Data: {"ip":"116.98.1.149"}
0 17:12:59.674 Mw_telegram_test TRUMPUSD,M5: This suggests the problem is specific to the Telegram API URL or your bot token.
0 17:12:59.674 Mw_telegram_test TRUMPUSD,M5: Double-check your bot token and ensure it's correctly placed in the URL.
0 17:12:59.674 Mw_telegram_test TRUMPUSD,M5: uninit reason 0
0 17:12:59.677 Script Mw_telegram_test TRUMPUSD,M5: removed I have also tried this on a live account. I have compiled for mt5 on both demo and mt4 accounts. I am really lost. Thanks again for the help.
DislikedPost log again: Use below Code void OnStart() { // 1. Define the URL. Replace <my_token> with your actual bot token. // **REPLACE <my_token> BELOW WITH YOUR ACTUAL TELEGRAM BOT TOKEN** string url = "https://api.telegram.org/bot123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11/getMe"; // Replace with your bot token // 2. Prepare variables for the WebRequest. char result[]; // Array to store the result of the request. string result_headers; // String to store the response headers. string headers = "User-Agent: MetaTrader/4.0"; // Set a user agent. char dummyArray[];...Ignored