I have the code below which is sending multiple telegram messages in 5 mins time frame.
Someone please update the code so it can send only 1 message per Candle BAR.
TelegramAlerts = ParamTrigger("Telegram Alert","Send Alert");
TelegramAPI_ID = ParamStr("Telegram Bot API Key","1046872120:wwwwwn_TVmddddGfUlmc"); //Get the Bot API key via BotFather in Telgram
TelgramCHAT_ID = ParamStr("Telegram Channel ID","4xxxxx5"); //Channel ID
Message = "Check this Stock "+Name();
TelegramAlerts1 = InternetOpenURL(" https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelgramCHAT_ID+"&text= "+Message );
AlertIf((Buy), "EXEC TelegramAlerts1","Tele Alert", 3);
Thanks a lot in advance
first you'll need to decide ... either you use AlertIf(EXEC ...), or InternetOpenURL()
lets consider we use only
and still i face multiple msg on telegram
I have managed to get proper Telegram messages with your HINT,.. I have a new problem .. it works properly in 1 min chart and i get 1 telegram message in 1 min. But when in 5 mins chart, I get 10 telegram messages till the bar is over. So need to minimize the number of telegram messages..PLEASE GUIDE...
HERE is the code
if( LastValue( Buy ) )
TelegramAlertsBuy = InternetOpenURL(" https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelgramCHAT_ID+"&text= "+MessageBUY );
if( LastValue( Sell ) )
Sell = ExRem (Sell,Buy);
TelegramAlertsSELL = InternetOpenURL(" https://api.telegram.org/bot"+TelegramAPI_ID+"/sendMessage?chat_id="+TelgramCHAT_ID+"&text= "+MessageSELL );
Can you please give me the correct working code.. i couldnt get it RIGHT ... plz plz guide
Search the forum
It is good idea to search the forum before asking same questions over and over. To search the forum just use magnifying glass icon in the upper right corner
Also it is good idea to use
Google and add +site:amibroker.com to your search term to limit the output to content of amibroker.com web site. Doing so will include results from Knowledge Base and Users' Guide
Enter the AFL code properly
It is of utmost importance as improperly formatted code results in syntax error…
A new custom badge for the forum has been introduced: License Verified.
On users profile page it is visible like this:
Users that have such badge in their profile page are verified holders of AmiBroker license.
The badge is automatically granted if forum account uses same email address as email used for purchase. Approximately 44% of forum users have that badge granted automatically.
If you use different email for the foru…