Please do a search before posting. Already discussed.
You don't have to include the full path in your filename.
Please do a search before posting. Already discussed.
You don't have to include the full path in your filename.
I changed the line to:
screenshot_path = TimeToString(curTime, TIME_SECONDS) + ".png";
But still get the same error:
2023.04.27 20:33:09.317 CandlestickScreenshots (EURUSD,H1) Failed to save screenshot: 23:45:00.png
Wrong file name.
So i've fixed everything and it is taking the screen shots.
I have just a doubt, it is taking the screenshots with the first candle on the left being the input StartTime, but I wan't it so the first candle on the right on the screenshot is the input StartTime. I've tried ALIGN_RIGHT it doesn't work (just takes multiple screenshots of the most recent chart).
I've searched online but can't find anything.
So i've fixed everything and it is taking the screen shots.
I have just a doubt, it is taking the screenshots with the first candle on the left being the input StartTime, but I wan't it so the first candle on the right on the screenshot is the input StartTime. I've tried ALIGN_RIGHT it doesn't work (just takes multiple screenshots of the most recent chart).
I've searched online but can't find anything.
I don't understand why you can't find the answer if you are searching ? How are you searching ?
I know the answer is on the forum, several times. It's also in the documentation by the way.
screenshot_path = FolderName + "\\" + TimeToString(curTime, TIME_SECONDS) + ".png";
You can't have colons in filenames.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hey guys. I'm doing a simple mql5 script that does the following:
Given 2 parameters: 1) start time 2) end time, take screenshots of every candle between start time and end time (inclusive). Save the photos as a png to a specified folder (name of the folder is parameter 3). The name of the file should be the time of the candle. Dimensions of the screenshot equal to the size of the window.
I always get the error "Failed to save screenshot". I think the issue might be related to line:
But I'm not sure.