Send Alert to telegram

Good evening,
Firstly i already testing code with

AlertIf(condition,"EXEC https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelegramCHANNEL_ID+"&text=+"+message,"",1,4+8); 

But always open browser during run alert.

Secondly i tried with syntax internetopenURL. Its looks good, like this

_SECTION_BEGIN("Telegram Alerts");

TelegramAlerts = ParamTrigger("Telegram Alert","Send Alert");
TelegramAPI_ID = ParamStr("Telegram Bot API Key","xxxxxxxxx:yyyyyyyyy"); 
TelegramCHANNEL_ID = ParamStr("Telegram Channel ID","-zzzzzzz");

Message = " BUY: " +  "-" + Name();

URL = "https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelegramCHANNEL_ID+"&text="+Message;

if (TelegramAlerts)
{
ih = InternetOpenURL(URL);
 if (ih)
{
InternetClose(ih);
}
 else
     {
          printf("Your URL is bad !");
     }
}
_SECTION_END();

I interest with second method, but i dont know where is i put the buy/sell criteria?

Please help me...

Thank in advance

Regards

Your post is duplicate. The same thing is covered already in number of post on this forum:
https://forum.amibroker.com/search?q=Telegram

Thank you sir.
Unfortunately i can't find solution write buy/sell signal for alert send to telegram with second method.

Need your help sir
Thank in advance

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.