Thanks for your reply.
As we have previously discussed, your data series DemandPoint will only contain a value when it is written to so you will have to broaden your search for the last 5 entries by looping back more than 5 bars and testing to see if the barsago index of DemandPoint contains a value. Once you have count 5 then you can break from the loop.
Comment