I posted this in old thread on WL4, moving it to WL5 forum where it belongs.
limiting a similar script by date gives "Object reference not set to an instance of an object". If I comment out //if (Bars.Date[bar] >= date1) and //if (Bars.Date[bar]<=date2) then the error goes away (but i don't limit by date of course).
CODE:
Please log in to see this code.