推送通知的延迟时间更长 - 页 8 12345678 新评论 tyup 2019.03.16 02:28 #71 Andrey777: bot.SendMessage() 已经被添加到各地,但我应该在哪里添加这个? #include <Telegram.mqh> CCustomBot bot; string Token="574958800:AAF222222CuFoe75BsSIwK9bqqw7rrfagIk"; int OnInit() { //--- bot.Token(token); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- bot.sendMessage(------); bot.sendPhoto(---); } //+------------------------------------------------------------------+ 我得看看发照片。我今晚会看一下。 Andrey777 2019.03.18 19:57 #72 tyup:与发送照片,你将不得不看它。我今晚会看一下。-在需要的地方 增加了bot.sendMessage(------);。 - 额外的 #include <Telegram.mqh> CCustomBot bot; string Token="574958800:AAF222222CuFoe75BsSIwK9bqqw7rrfagIk"; 上面的int OnInit(),但它并没有发送通知。会有什么问题呢? tyup 2019.03.19 05:58 #73 Andrey777:-在需要的地方 增加了bot.sendMessage(------);。 - 额外的 int OnInit(),但它并没有发送通知。可能是什么问题?在启动 bot.Token(Token)。 还添加了? 测试脚本是否正常? Andrey777 2019.03.19 09:21 #74 tyup:在启动 bot.Token(Token)。 还添加了? 测试脚本是否有效?测试脚本有效,结果就是这样。 //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ #include <Telegram.mqh> string Token="744665737:AAH5MhCME439HGQyFIbe2cqq1U1-R1804tU"; CCustomBot bot; int OnInit() { bot.Token(Token); SetIndexBuffer(0,DotUpbuf1); SetIndexStyle(0, DRAW_ARROW); SetIndexArrow(0, 108); SetIndexBuffer(1, Upbuf1); SetIndexStyle(1, DRAW_ARROW, EMPTY, WidthArr2); SetIndexArrow(1, 233); SetIndexBuffer(2,DotDnbuf1); SetIndexStyle(2, DRAW_ARROW); SetIndexArrow(2, 108); SetIndexBuffer(3, Dnbuf1); SetIndexStyle(3, DRAW_ARROW, EMPTY, WidthArr2); SetIndexArrow(3, 234); SetIndexBuffer(4,DotUpbuf2); SetIndexStyle(4, DRAW_ARROW); SetIndexArrow(4, 108); SetIndexBuffer(5, Upbuf2); SetIndexStyle(5, DRAW_ARROW, EMPTY, WidthArr2); SetIndexArrow(5, 233); SetIndexBuffer(6,DotDnbuf2); SetIndexStyle(6, DRAW_ARROW); SetIndexArrow(6, 108); SetIndexBuffer(7, Dnbuf2); SetIndexStyle(7, DRAW_ARROW, EMPTY, WidthArr2); SetIndexArrow(7, 234); SetIndexBuffer(8, Upbuf1_1); SetIndexStyle(8, DRAW_ARROW, EMPTY, WidthArr1); SetIndexArrow(8, 233); SetIndexBuffer(9, Dnbuf1_1); SetIndexStyle(9, DRAW_ARROW, EMPTY, WidthArr1); SetIndexArrow(9, 234); SetIndexBuffer(10, Upbuf2_1); SetIndexStyle(10, DRAW_ARROW, EMPTY, WidthArr1); SetIndexArrow(10, 233); SetIndexBuffer(11, Dnbuf2_1); SetIndexStyle(11, DRAW_ARROW, EMPTY, WidthArr1); SetIndexArrow(11, 234); ClearObjects(); ClearObjectsOfFilter(); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ //--------------------------------------------------------------------------------------------------------- datetime headT = iTime(Symbol(), Timeframe, 0); if (Period() > Timeframe) headT = Time[0]; if(Signal && iBarShift(Symbol(), 0, timeSignal) > CT(1)) { if (Upbuf1[CT(1)]<EMPTY_VALUE || (UseTime2&&Upbuf2[CT(1)]<EMPTY_VALUE)) { Alert("Signal BUY - "+Symbol()); SendNotification("Signal BUY - "+Symbol()); bot.SendMessage(337777772,"Signal BUY - "+Symbol()); ChartBringToTop(); timeSignal = iTime(Symbol(), 0, CT(1)); } if (Dnbuf1[CT(1)]<EMPTY_VALUE || (UseTime2&&Dnbuf2[CT(1)]<EMPTY_VALUE)) { Alert("Signal SELL - "+Symbol()); SendNotification("Signal SELL - "+Symbol()); bot.SendMessage(337777772,"Signal SELL - "+Symbol()); ChartBringToTop(); timeSignal = iTime(Symbol(), 0, CT(1)); } } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+ //================================================================================================================= Andrey777 2019.03.20 13:56 #75 tyup:在启动 bot.Token(Token)。 还添加了? 测试脚本是否正常?对吗? 12345678 新评论 您错过了交易机会: 免费交易应用程序 8,000+信号可供复制 探索金融市场的经济新闻 注册 登录 拉丁字符(不带空格) 密码将被发送至该邮箱 发生错误 使用 Google 登录 您同意网站政策和使用条款 如果您没有帐号,请注册 可以使用cookies登录MQL5.com网站。 请在您的浏览器中启用必要的设置,否则您将无法登录。 忘记您的登录名/密码? 使用 Google 登录
bot.SendMessage() 已经被添加到各地,但我应该在哪里添加这个?
我得看看发照片。我今晚会看一下。
与发送照片,你将不得不看它。我今晚会看一下。
-在需要的地方 增加了bot.sendMessage(------);。
- 额外的
上面的int OnInit(),但它并没有发送通知。会有什么问题呢?
-在需要的地方 增加了bot.sendMessage(------);。
- 额外的
int OnInit(),但它并没有发送通知。可能是什么问题?
在启动
bot.Token(Token)。
还添加了?
测试脚本是否正常?
在启动
bot.Token(Token)。
还添加了?
测试脚本是否有效?
测试脚本有效,结果就是这样。
在启动
bot.Token(Token)。
还添加了?
测试脚本是否正常?
对吗?