Object reference not set to an instance of an object
Author: deepbuyer
Creation Date: 9/13/2008 5:44 PM
profile picture

deepbuyer

#1
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.
profile picture

Eugene

#2
The problem of course is not in the operations with dates. You're assigning a tag to position which does not yet exist. Should be:

CODE:
Please log in to see this code.
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).