Hello,
I have a script that make screenshots for me. Now I need I do it with a shortkey. I use the screenshots for my excel sheet. Is there any possibility to run a script every hour?
In the attached file you will the script
You can drop it on a chart and sleep for an hour inside of an infinite loop...
#property strict #include <charts/chart.mqh> #include <stdlib.mqh> #define HOUR_MS (60 * 60 * 1000) void OnStart() { CChart chart; while (!IsStopped()) { for (long cid=ChartFirst(); cid>=0 && !IsStopped(); cid=ChartNext(cid)) { chart.Attach(cid); string timeframe = EnumToString((ENUM_TIMEFRAMES)chart.Period()); string file_name = StringFormat("%I64d-%s.png", cid, timeframe); if (!chart.ScreenShot(file_name, chart.WidthInPixels(), chart.HeightInPixels(0))) { Print(ErrorDescription(GetLastError())); } chart.Detach(); } Sleep(HOUR_MS); } }
Hello,
I have a script that make screenshots for me. Now I need I do it with a shortkey. I use the screenshots for my excel sheet. Is there any possibility to run a script every hour?
In the attached file you will the script
Better create an indicator
You can drop it on a chart and sleep for an hour inside of an infinite loop...
is this the complete code?
is this the complete code?
So what is the code to make this work? I tried it in the code but I get errors.
So what is the code to make this work? I tried it in the code but I get errors.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have a script that make screenshots for me. Now I need I do it with a shortkey. I use the screenshots for my excel sheet. Is there any possibility to run a script every hour?
In the attached file you will the script