Termos de Referência
//Takes screenshot
string imgname="image.png";
bool first=ChartScreenShot(0,imgname,1920,1080);
// write the initial html code
int Report_File=FileOpen("report.html",FILE_WRITE|FILE_TXT,",");
FileWrite(Report_File,"<!DOCTYPE html>");
FileWrite(Report_File,"<html>");
FileWrite(Report_File,"<body>");
string timeString=TimeToString(TimeCurrent()|TIME_MINUTES);
FileWrite(Report_File,"<center>Report generated at "+timeString+"</center>");
FileWrite(Report_File,"</br>");
// file is referencing the location of the image
FileWrite(Report_File,"<center><a href="+imgname+" target=_blank>"+"<img src="+imgname +" alt=twx width=1920 height=1080 class=aligncenter></a></center>");
FileWrite(Report_File,"</br>");
FileWrite(Report_File,"<br>");
FileClose(Report_File);
The code above
1)take a screenshot
2) Creates a text file with .html extension (so its read by a web browser) and writes html text inside it.
3) The Yellow highlighted text uses href to reference and read the image that was taken at (1).
What I need you to do is to find a way to rather than reference the picture using href and require the image to be present ,to somehow convert the image to a base64 or some other string format that can be read by the web-browser and convert it into an image without the need for the image to exist.
In order to prove to me that you can actually do that please send me an html file that displays an mt5 image.
You can copy the above code in the init part of an EA/Script/Indicator and you will see it produce an html file with the chart image.
I have attached also the indicator