dMartijn Rikkert:
Hello,
I have a script: for making screenshots. I want to run it automatically instead of clicking on the script. Does anyone know how I can change this script so it will run every 15 min?
Thanks in advance.
int OnStart(void) { if(!EventSetTimer(15 * PeriodSeconds(PERIOD_M1))) { Print("error setting timer : ",GetLastError()); return(-1); } return(0); }
And in OnTimer all logic
void OnTimer(void) { //-- // if(TimeCurrent() >= D'2018.12.15'){ // MessageBox("Testing Period is finished!"); // return ; // } //-- long chartId = ChartFirst(); while(chartId != -1) { string fileName = ChartSymbol(chartId) + "-M" + string(ChartPeriod(chartId)) + ".png" ; int width = 1871;(int) ChartGetInteger(chartId, CHART_WIDTH_IN_PIXELS); int height = 871;(int) ChartGetInteger(chartId, CHART_HEIGHT_IN_PIXELS); ChartScreenShot( chartId, fileName, width, height ); //-- chartId = ChartNext(chartId); } }did not try and did not compile
** sorry, of course OnStart and not OnInit. Updated source
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I have a script: for making screenshots. I want to run it automatically instead of clicking on the script. Does anyone know how I can change this script so it will run every 15 min?
Thanks in advance.