There is a bug in plot() when StartDate is set in the format YYYYMMDD.
This script:
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)