Here is how to achieve this as @spuzy showed me (fully credit to @spuzy).
First download telegram.zip file given at the bottom of this page: https://www.mql5.com/en/articles/2355
Then place the .mqh files within the zipped folder into Include folder of your MT4 data folder.
Then you need to make a custom block of code as follows:

This is the code of the big white area:
if(current_chart)
{
_symbol = Symbol();
_period = Period();
}
if(is_channel) { SendScreenShotChannel(channel_name,_symbol, _period,text,x_axis,y_axis,current_chart,token); }
else { SendScreenShot(_chat_id,_symbol, _period,text,x_axis,y_axis,current_chart,token); }
And include following line in the global variable area:
#include <Telegram.mqh>
Here are the two custom functions codes:
1.SendScreenshot:
int SendScreenShot(const long _chat_id,
const string _symbol,
const ENUM_TIMEFRAMES _period,
string text,
int x_axis,
int y_axis,
bool current_chart,
string token)
{
CCustomBot bot;
bot.Token(token);
int result=0;
long chart_id;
if(!current_chart)
chart_id=ChartOpen(_symbol,_period);
else
chart_id=ChartID();
if(chart_id==0)
return(ERR_CHART_NOT_FOUND);
if(!current_chart)
ChartSetInteger(ChartID(),CHART_BRING_TO_TOP,true);
//--- updates chart
int wait=60;
while(--wait>0)
{
if(SeriesInfoInteger(_symbol,_period,SERIES_SYNCHRONIZED))
break;
Sleep(500);
}
string filename;
if(!current_chart)
{
ChartRedraw(chart_id);
Sleep(500);
ChartSetInteger(chart_id,CHART_SHOW_GRID,false);
ChartSetInteger(chart_id,CHART_SHOW_PERIOD_SEP,false);
filename=StringFormat("%s%d.gif",_symbol,_period);
}
else
{
filename=StringFormat("%s%d.gif",Symbol(),Period());
}
if(FileIsExist(filename))
FileDelete(filename);
if(!current_chart)
ChartRedraw(chart_id);
Sleep(100);
if(ChartScreenShot(chart_id,filename,x_axis,y_axis,ALIGN_RIGHT))
{
Sleep(100);
bot.SendChatAction(_chat_id,ACTION_UPLOAD_PHOTO);
//
wait=60;
while(!FileIsExist(filename) &&
Sleep(500);
//
if(FileIsExist(filename))
{
string screen_id;
result=bot.SendPhoto(screen_id,_chat_id,filename,text);
}
}
if(!current_chart)
ChartClose(chart_id);
return(result);
}
- SendScreenShotChannel
int SendScreenShotChannel(const string _chat_id,
const string _symbol,
const ENUM_TIMEFRAMES _period,
string text,
int x_axis,
int y_axis,
bool current_chart,
string token)
{
CCustomBot bot;
bot.Token(token);
int result=0;
long chart_id;
if(!current_chart)
chart_id=ChartOpen(_symbol,_period);
else
chart_id=ChartID();
if(chart_id==0)
return(ERR_CHART_NOT_FOUND);
if(!current_chart)
ChartSetInteger(ChartID(),CHART_BRING_TO_TOP,true);
//--- updates chart
int wait=60;
while(--wait>0)
{
if(SeriesInfoInteger(_symbol,_period,SERIES_SYNCHRONIZED))
break;
Sleep(500);
}
string filename;
if(!current_chart)
{
ChartRedraw(chart_id);
Sleep(500);
ChartSetInteger(chart_id,CHART_SHOW_GRID,false);
ChartSetInteger(chart_id,CHART_SHOW_PERIOD_SEP,false);
filename=StringFormat("%s%d.gif",_symbol,_period);
}
else
{
filename=StringFormat("%s%d.gif",Symbol(),Period());
}
ChartSetInteger(chart_id,CHART_SHOW_GRID,true);
ChartSetInteger(chart_id,CHART_SHOW_PERIOD_SEP,false);
if(FileIsExist(filename))
FileDelete(filename);
if(!current_chart)
ChartRedraw(chart_id);
Sleep(100);
if(ChartScreenShot(chart_id,filename,x_axis,y_axis,ALIGN_RIGHT))
{
Sleep(100);
bot.SendChatAction(_chat_id,ACTION_UPLOAD_PHOTO);
//
wait=60;
while(!FileIsExist(filename) &&
Sleep(500);
//
if(FileIsExist(filename))
{
string screen_id;
result=bot.SendPhoto(screen_id,_chat_id,filename,text);
}
}
if(!current_chart)
ChartClose(chart_id);
return(result);
}
And given below are each of the parameters:










Then make the settings as follows:

Now you have got the custom block in fxdreema, which you can use in your EAs.

Here are the options which are self explanatory. You can post screenshots with custom text to Telegram channels and groups automatically.
