With the OnCalculate() method you can use any properties you wish without having to test for a null reference. As soon as the OnCalculate() function is called up by TradersYard X Script, an object will become available. If you wish to use these properties outside of OnCalculate(), you should first perform a test for null references using if (Bars != null)