Hello everybody,
I am trying to make Zorro handing out proper .png files. Using a simple script to have a plotting on hand :

Code
vars Prices[0];
vars smas[0];

function run()
{
	//set(PLOTNOW);
	setf(PlotMode,PL_FINE|PL_FILE|PL_LONG);
	PlotWidth = 1000;
	PlotHeight1 = 500;
	PlotHeight2 = 500;
	StartDate = 20220101;
	EndDate = 20230401;
	BarPeriod = 1440;                 // Stooq EOD
	LookBack = 100;
	
	//My Asset File
	assetList("C:\\Zorro\\History-stooq-EOD\\assetlist-stooq-EOD.csv","PFE"); 

	int cnt = 0;
	int i;


	
	while(asset(loop(Assets)))
	{
		Prices[cnt] = series(priceClose());
		smas[cnt] = series(SMA(Prices[cnt],10));
		cnt++;
	}

	i = 2;                               //switching asset to asset_No like to plot...
	asset(Assets[i]);   
	assetSelect();
	
	
	plot(strf("Cl for %s",Assets[i]),Prices[i],NEW,RED);
	plot(strf("SMA for %s",Assets[i]),smas[i],0,BLUE);			
			

}


Compiling, pressing "Test" - no errors.
Then pressing "Result" (as PL_FILE is set), Z Chart Viewer opens and presents the requested plotting : attached AAAA.png great !!

BUT by adding plotChart() to my script ...

Zorros Manual :
Quote

Generates a chart or histogram from the previous plot calls, and displays it with the chart viewer or stores it in a .png file with the given FileName when PL_FILE is set. Exports it to a CSV file when PL_EXPORT is set. Deletes all plot elements so that new plots can be built afterwards. Use this function to update charts or histograms in real time (see PayOff.c). If this function is not used, the chart is generated at the end of a backtest or when clicking [Result].




Code



	i = 2;                             
	asset(Assets[i]);   
	assetSelect();
	
	
	plot(strf("Cl for %s",Assets[i]),Prices[i],NEW,RED);
	plot(strf("SMA for %s",Assets[i]),smas[i],0,BLUE);			
			
        plotChart(strf("C:\\Users\\jhxm\\Desktop\\test-%s.png",Assets[i]));   //  << ==============================

}


...the script takes ages to run, and then presents a file with missing 50% of plotting.
Yes, it correctly just writes the file as .png to the desktop and does not open the viewer, but!! half of the plotting is missing.

Datasource is/are local .t6 EOD files, there should be no problem with catching the plotting datas at speed.

So I guess, I am using the plotChart() command in wrong manner.
Did somebody solve this problem already or can provide a guide how to correctly use plotChart ?

Best Regards
Hendrix

Attached Files
AAAA.png (27 downloads)
test-MRK.png (27 downloads)