the chart suggests this is still more often a better time to buy than waiting for prices to fall below trend.
That's true. So you should buy in any case at this point in time and in the near future, no matter where the spot is compared to the trendline. With the discretion of course that if the trendline has been exceeded greatly the odds are there will be a drawback. The data on how much "exceeding greatly" means, is sparse, but the 80x breakpoint figure is better than nothing to have handy when making decisions. However deferring your buying in a bull market situation like now you risk never getting in, or getting in at a very high price at the wrong time, making you pretty frustrated for the 6-12 month stagnant breathing periods that are likely to occur.
This script calulates rpietila's trendline for any given date >= 2009-01. I hope it works as expected

Nice, thanks! I'm not using it now, because the trendline values look so lame compared to the current spot. To avoid the depressing feelings arising from the fact that we must wait 3 to 4 months before the trendline reaches the current spot prices, I'm inclined to start drooling around with your script early next year
