Loop to delete
W1 bars start on Sundays. For D1 there's no Sunday so you get the bar of the previous week's Friday. So the loop should start with shift-1 and that's it, rest looks ok.
Thanks for the reply.
Funny I realized that mistake while out walking, it's great for that.
Before though I used,
Print(" i=", i);
And it was stuck on 2 and not printing 1
I have changed this since, but can't see what difference >= would make. It's working know anyway.
for (int i=shift;i>=1;i--)
And added,
shift=shift-1;
Hi
Trying to create a loop to check for a condition then act if meet. The loop does not seem to count down when I use print("i=",i); to error check