Only cleaned up your code, it works fine (unfortunately it seems to not be possible to plot candles in all charts: "Candles and bands are only plotted in the main chart."
see https://zorro-project.com/manual/en/plot.htm)):

Code


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

function run()
{
	set(PLOTNOW);
	PlotWidth = 600;
	PlotHeight1 = 500;
	PlotHeight2 = 500;
	StartDate = 20220101;
	EndDate = 20220205;
	BarPeriod = 1440;
	//My Asset File
	assetList("AssetsXY"); 

	int cnt = 0;
	int i;


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

	asset(Assets[0]);

	for(i=0;i<cnt;i++)
	{
			plot(strf("Cl for %s",Assets[i]),Prices[i],NEW,BLACK);
			plot(strf("SMA for %s",Assets[i]),smas[i],0,BLUE);
	}
	
}



Attached Files
Last edited by Enivant; 04/14/23 11:49.