//+------------------------------------------------------------------+ //| Publisher.mq5 | //| Copyright 2020, QUADRELION | //| https://www.quadrelion.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2020, QUADRELION" #property link "https://www.quadrelion.com" #property version "2.02" string botToken = "1072805610:AAEUeJJZ-mMr_7-2erUOuC6MVuyC1Fdr6QE"; string channelName = "Trading Signals"; // Channel or Group name datetime start_time; datetime previous_date; input int height = 768; // [Height of the snapshot taken] input int width = 1280;// [Width of the snapshot taken] struct TelegramMessage { long MessageId; string Text; datetime TimestampGMT; }; #import "Telegram Connector MT5.ex5" bool TelegramInit(const string botToken, const long channelId); bool TelegramInit(const string botToken, const string channelName); void TelegramGetUpdates(TelegramMessage& messages[]); string BuildReplyMarkup(const string keyboard, const bool resize = false,const bool selective = true); string BuildReplyKeyboardHide(); bool TelegramSendText(const string text, const bool htmlMode = false, const string replyMarkup = NULL); bool TelegramSendPhoto(const string path, const string title, const bool useCommonFlag = false, const int timeout = 10000); #import int current_positions; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { if(!TelegramInit(botToken, channelName)) { return INIT_FAILED; } start_time = TimeCurrent(); previous_date = TimeCurrent(); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- destroy timer EventKillTimer(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- // bool snap_shot_sent = false; datetime current_previous_date = previous_date; HistorySelect(start_time,TimeCurrent()); current_positions =HistoryDealsTotal(); //Print(current_positions); int i =0; while(i