ChartScreenshot not saved in VPS

 

Hi everyone,

I have tried to find a post that answers this issue, and I couldn't, but apologies if it already exists somewhere.


I would like to be able to send signals into a Telegram channel which also takes a screenshot of the chart.


It turns out that everything is running perfectly, when I operate it from my terminal on my PC, but it's not working when I move it to vps.


I have tried to find out what is happening, and it looks like the vps is not saving the screenshot for some reason.

below is my test code that I execute onInit

ChartRedraw(0);
ResetLastError();
if(TerminalInfoInteger(TERMINAL_VPS)==true){
   if(ChartScreenShot(0,"VPSChartTest.jpg",1024,768,ALIGN_RIGHT))
      Print("File Saved");
   else
      Print("File not Saved");
Print(GetLastError());   


on my terminal it works fine so I included the if statement to only execute it on the VPS, and the result on the vps is below

File not Saved
4110

It looks like the screenshot is saved locally when I run it on my terminal, but it's not saved online when I run it on the vps.

I know it's a minor issue as the rest of the code is fine, but I would really like to understand if there is a workaround or if I'm doing something wrong.

Any feedback or hints are greatly appreciated.

Many Thanks

 
VPS has no display; nothing to take a screenshot of.
 
William Roeder #:
VPS has no display; nothing to take a screenshot of.
Perfect, thank you for confirming 👌🏻👍🏻