Telegram TradeNotifier
- 实用工具
- Shuang Gang Wang
- 版本: 1.0
- 激活: 10
将 MetaTrader 4 平台的交易信息发送到 Telegram ,可以记录交易者的每一笔详细信息。这些信息包括常规的交易账户、余额、净值等,还包括全部的订单数量、总的交易手数和最大损益。此外,每日的交易信息也会记录在内,包括当天的交易订单数量、交易利润和最大损益。每一笔订单的记录都会记录本地时间和 UTC 时间。
电报机器人配置
1 、获取 Token
打开 Telegram 应用程序,搜索“ BotFather ”。
在 BotFather 聊天中,键入或单击 /newbot 。
根据提示创建机器人。(用户名必须以 “ _bot ”结尾)。
得到 API TOKEN 。
2 、获取 Chat_id
打开 Telegram 应用程序,搜索“ userinfobot ”。
在 userinfobot 聊天中输入 “ hello ”
获取到的 Id 就是 chat_id
EA 运行说明:
1、 将 URL “ https://api.telegram.org ” 添加到 Tools > Options > Expert Advisors > Allow Web Request for listed URL:
2、 添加 EA 到视图界面,并且对 EA 进行配置。
EA 配置说明
1 ) Remark information : 自定义信息,允许给账户填写自定义信息发送到 Telegram 。
2 ) Your token : 将 Telegram 中新创建的 Telegram Bot 的 API TOKEN 填入其中。
3 ) Your chat_id : 将 Telegram 中获取到的 Id 填入其中。
3 、当 Telegram 中收到 "Loading Successful!" ,表示程序已经加载成功。
如何配置 Telegram 机器人
一、获取 API Token
打开 Telegram 应用程序:
在你的手机或电脑上打开 Telegram 应用程序。
搜索 “ BotFather ”:
在 Telegram 的搜索栏中输入“ BotFather ”并点击搜索。
选择 “ BotFather ”并开始聊天。
创建新机器人:
在与 BotFather 的聊天中,输入或点击指令 /newbot 。
BotFather 会提示你输入机器人名称。输入一个你喜欢的名称,比如“ MyNewBot ”。
接着, BotFather 会要求你输入机器人用户名。请注意,用户名必须以“ _bot ”结尾,例如“ MyNewBot_bot ”。
获取 API TOKEN :
一旦你成功创建了机器人, BotFather 会给你一个 API Token 。这是一个长字符串,用于你的程序与 Telegram 服务器进行通信。
请将这个 Token 保存好,因为你将在后续步骤中需要使用它。
二、获取 Chat_id
打开 Telegram 应用程序:
如果你已经关闭了 Telegram 应用程序,请重新打开它。
搜索 “ userinfobot ”:
在 Telegram 的搜索栏中输入“ userinfobot ”并点击搜索。
选择 “ userinfobot ”并开始聊天。
获取 Chat_id :
在与 userinfobot 的聊天中,输入“ hello ”。
userinfobot 会回复一条消息,其中包含你的 Chat_id 。这个 ID 是一个唯一的数字标识,用于在 Telegram 中识别你的聊天。
总结
通过上述步骤,你已经成功获取了 Telegram 机器人的 API Token 和 Chat_id 。这两个重要信息可以帮助你配置并开始使用你的 Telegram 机器人。确保将这些信息妥善保存,以便在编写机器人代码时使用。