Skip to content

Instantly share code, notes, and snippets.

@marketcalls
Created June 11, 2019 19:51
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save marketcalls/f42f1d0a684eee96a89a134bad1ef3d0 to your computer and use it in GitHub Desktop.
Save marketcalls/f42f1d0a684eee96a89a134bad1ef3d0 to your computer and use it in GitHub Desktop.
Telegram Alerts - Modern Method
//Coded by Rajandran R
//Founder - Marketcalls - https://www.marketcalls.in
//CoFounder - Traderscafe - http://traderscafe.in
//Coded on 12th June 2019
/*
Note : Before Using this Code make sure you had followed the below mentioned steps
1)Create a Telegram public channel
2)Create a Telegram BOT via BotFather
3)Set the bot as administrator in your channel
*/
_SECTION_BEGIN("Telegram Alerts - Modern Method");
Version(6.17); //Code is Compatible with 6.17 and Higher
TelegramAlerts = ParamTrigger("Telegram Alert","Send Alert");
TelegramAPI_ID = ParamStr("Telegram Bot API Key","854431837:AAEeSAtL_rgRZAMfxgxxxxxxxxxx"); //Get the Bot API key via BotFather in Telgram
TelgramCHAT_ID = ParamStr("Telegram Channel ID","@marketcalls_in"); //Channel ID example : @marketcalls_in
Message = "This is a Test Message from Amibroker";
if (TelegramAlerts)
{
ih = InternetOpenURL("https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelgramCHAT_ID+"&text="+Message );
InternetClose(ih);
}
_SECTION_END();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment