history not in memory

 
I have an indicator which when first place on chart, much of it does not draw. Then if I remove it from the chart and reload it back on the chart it works. Also if I switch chart period, then switch back, it works. It looks like the required historical bars are not in memory at the first draw. I need some way to make sure the bars are in memory first. Any ideas?
 
Had this problem with one of my indis. WindowRedraw() solved it.