Originally posted by yrwyddfa
You can derive the relevant expression from the code posted. Look at the last two loops of the Trend function.
Do you intend to add this capability? It would be very useful to me if you would be willing to share it.