fixed bug by adding check when specific subarray element is not defined
 use ohlc to generated bars after entry and goes until exit
 made date range shown in candlestick chart automatic