New to EA Development – Need Advice on Reading Telegram Signals From EA and Copying them Directly to EA
I have created a public AI-based Telegram channel that generates trading signals by analyzing charts using GPT-5.2 and Grok.com.
My goal is to have a MetaTrader EA read these signals directly from Telegram and execute trades automatically.
I would like to know:
-
Is it technically possible for an EA to read Telegram messages directly, I test the API methods, Telegram deleted the messages from the API after 10 requests!
-
Can this be done without any paid third-party apps or signal copier services?
-
What is the recommended architecture?
-
Are there any free or open-source solutions you would recommend?
I am looking for a clean, secure, and preferably free or open-source approach.
Any guidance, examples, or best practices would be greatly appreciated.
Thank you in advance!
https://github.com/yagop/node-telegram-bot-api?tab=readme-ov-file
Ok ,You are getting signals from A.I in the first instance then posting it on Telescam and you want an E.A to turn that from Telegram into signals for your EA , just get the A.I that is giving the signals in the first place to make an EA based on the logic .
A few structural points, because the wall you hit is not a bug in your code.
1) An EA cannot read a third-party channel by itself. The Bot API only sees chats where your bot is a member, and you cannot add a bot to someone else's VIP channel. Reading as a user needs MTProto with an authenticated user session, which is not implementable in MQL5: no raw sockets, and WebRequest is synchronous.
2) Messages vanishing after ~10 requests is the symptom of polling. Asking for history in a loop is rate limited. MTProto pushes new messages as events: you subscribe once and receive them for weeks without hitting limits.
3) The architecture that works is two pieces. Outside MetaTrader, a process (Python or Node with an MTProto client library) holds the user session, receives messages in real time, parses them and writes commands to a small queue. Inside MetaTrader, the EA only asks that queue for pending commands and executes them.
4) MQL5 details that bite, in order of how much they cost:
- WebRequest URLs must be whitelisted in Tools > Options > Expert Advisors, and the call blocks the thread. Poll from OnTimer with a short timeout, never from OnTick.
- Give every command a unique id and persist the ids you already executed. Any retry or terminal restart will otherwise duplicate orders.
- Persist a map of signal id to position ticket. When the channel later writes "close half" or "move SL to entry", that instruction belongs to the signal it replies to, not to "the last open trade". Getting this wrong closes the wrong position, and it is the most common defect in home-made copiers.
5) The Telegram part is the easy half. The parser is the hard half: the same channel writes TP1/TP2/TP3, "tp 1", entry ranges, and sometimes splits one signal across two messages. Test it against a stored corpus of that channel's real messages before going live.
One last thing: put a hard daily loss cap inside the EA. Automation does not make a bad day better, it makes it faster.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have created a public AI-based Telegram channel that generates trading signals by analyzing charts using GPT-5.2 and Grok.com.
My goal is to have a MetaTrader EA read these signals directly from Telegram and execute trades automatically.
I would like to know:
Is it technically possible for an EA to read Telegram messages directly, I test the API methods, Telegram deleted the messages from the API after 10 requests!
Can this be done without any paid third-party apps or signal copier services?
What is the recommended architecture?
Are there any free or open-source solutions you would recommend?
I am looking for a clean, secure, and preferably free or open-source approach.
Any guidance, examples, or best practices would be greatly appreciated.
Thank you in advance!
<Message edited by a moderator to fulfill the forum rules>