How To Set-Up A Telegram Service with cTrader
Bots are simply Telegram accounts operated by software and not people, they can also have AI features. They can do anything – teach, play, search, broadcast, remind, connect, integrate with other services. We use the Telegram service with the cTrader & NinjaTrader Alarm Manager application to broadcast alarm signals to any of your devices that have the Telegram software installed.
An alarm message will pop-up on your desktop PC, phone or any other device you install the Telegram software giving you instant free alerts.
You can download the software at their main website for the device you would like to use. Please note for this service to work you will need an internet connection. If you feel you will not always have an internet connection you may want to use the SMS service for your alarms.
Creating a Telegram Bot for Alarm Notifications
If you are not already using the Telegram service, head on over to https://telegram.org/ and pick a client to use. The sign-up process is very easy, and it should not take longer than a few minutes.
When you have one client set-up, its even easier to install on all your other devices like smartphone, tablet and even web browser, telegram will send you an authentication code, you will need this to set-up your alarm bot.
Creating a bot in Telegram involves talking to another Bot, called The BotFather, follow these steps to create your chatbot to be used with the Alarm Manager software. In this example, we are showing how to create the bot using the PC software we installed. Open your telegram app you installed and click on BotFather as shown below.
Then where it says "Write a message", type the /NewBot command, then follow the instructions to create a new bot.
- Choose a name for the new bot, we used "cTraderAlarmManager"
- Choose a username for the bot
- When the bot is created you will be given a token as shown below, keep this safe, you will use it in the Alarm Manager.
Now you have your telegram bot set-up and a unique token, the next step is to get your ChatBot ID, this is a little tricky, but we will show you how to get it, if you really get stuck then we have a video explaining the whole process.
First, we need to start a simple chat with new bot
You need to go to the bot you just created and start a simple chat, just type "hello", you can access the new bot by clicking on the link shown in the image above, we called our example t.me/ghgw_bot. Once you have started a simple chat we can now get the chat id by following the steps below.
- Click on this URL https://api.telegram.org/bot$TOKEN/getUpdates
- Replace the word $TOKEN with your token that you got when you created your bot as shown above in this example. 375045553:AAHUk33d3L5APN9sejQlwusEmaH2FD0BJ38
- The new URL would be like this: https://api.telegram.org/bot375045553:AAHUk33d3L5APN9sejQlwusEmaH2FD0BJ38/getUpdate
Paste the URL into a web browser and you should see similar results, but you will see your own name and unique id.
That's It, All Done
Now we should have the information to start using the Telegram service in the Alarm Manager, the two values we need access token and chat id which should look like the example values below.
Access Token: 375045553:AAHUk33d3L5APN9sejQlwusEmaH2FD0BJ38
Bot Token = Access Token
Just enter your Bot Token and Chat ID into the boxes in the settings tab of the alarm manager and you are all set to go
To test if it works just click on the "Send Test Telegram" and the application will send you a telegram straight to any device you have the Telegram software installed.
You can have notifications within notifications, the Telegram service will do any of the following when a message arrives, so you do not even need to be looking at any screen.
Watch a Video Demonstration
The video has been uploaded to 1080p High Quality, so do not forget to set your U-Tube video quality to 1080p HD.
Please do not use the values above as they are a dummy account we created and do nothing.