Zorro S 1.74.8 - Problems with plotting

Posted By: Hredot

Zorro S 1.74.8 - Problems with plotting - 02/10/18 17:06

With the currently newest Zorro S version I try to run the following simple script to plot the prices of a fixed number of assets in separate plots:

Code:
function run()
{
	set(LOGFILE+PRELOAD+PLOTNOW);
	BarPeriod = 1;	// 1 min bars
	LookBack = 0;	// no lookback period
	StartDate = 2018;
        assetList("HistoryMyAssets.csv"); // load asset list
 
	PlotWidth = 600;
	PlotHeight1 = 600;
	PlotHeight2 = 600;
	 
	var assetNum=0;
	while(loop(Assets))
	{
		asset(Assets[assetNum]);
		plot(Assets[assetNum],price(),NEW,BLACK);
		assetNum++;
	}

}


The above code only produces the first standard candle plot of the active asset, and the plot of the very first asset from the while loop. All remaining plots of assets in the while loop are simply missing.

Did I do something wrong in the above syntax? How should I go about plotting all of the prices of assets in the while loop properly?

Thanks for any suggestion!
Posted By: MatPed

Re: Zorro S 1.74.8 - Problems with plotting - 02/10/18 17:24

Just a guessing
Just a guess: first plot on MAIN than NEW. Ciao
Posted By: Hredot

Re: Zorro S 1.74.8 - Problems with plotting - 02/10/18 17:45

Added this before the while loop to try out the above suggestion:

Code:
plot("zero",0,MAIN,BLACK);


Unfortunately, it did not help. The output is still the same.
Posted By: Sphin

Re: Zorro S 1.74.8 - Problems with plotting - 02/10/18 18:40

You can try:
Code:
set(LOGFILE+PRELOAD+PLOTNOW);
setf(PlotMode,PL_ALL);

Posted By: Hredot

Re: Zorro S 1.74.8 - Problems with plotting - 02/10/18 19:49

Thank you Sphin, that fixed the issue!
© 2024 lite-C Forums