Isn't the following causing the scan to look forward at future data? SellPrice=ValueWhen(Sell,O,1); BuyPrice=ValueWhen(Buy,O,1); No! +ve values in Ref method indicate future prices.