There is a bug in plot() when StartDate is set in the format YYYYMMDD.

This script:
Code
function run(){
	
	set(PLOTNOW);
		
	StartDate = 20190201; 
	EndDate   = 2020;
	
	BarPeriod = 60;

	var K=ifelse(!(Bar%120),1,0);
	
	plot("WHL",K,BARS+NEW,RED);	
}
with StartDate=2019 plots as expected (screen 1) . But when StartDate is set as StartDate=20190201, plot() drops most items to be plotted (pic 2), even after enlargement of the plot area.

The problem can be reliably replicated for Bar%120 ( nothing is plotted), but is intermittent for lower values of the divisor (e.g. 24) (and can work for GBPUSD but not for EURUSD)


Attached Files Z_plot120barBug_StartDate2019.JPGZ_plotKbarBug_StartDate20190201.JPG
Last edited by Zheka; 08/19/20 15:45.