Nicolas’ code dealt with Pinbars, which are simply like a house, you start from the ground, then fill them as data flow in, so it’s (apparently) easy to make a monthly pin bar our of intraday or weekly bars. I happend to display a 4-hour heikin-ashi bar on a 1-hour TF, but that’s just as simple. No special calculations are needed, just sumations.
But when you need to calculate data from a lower TF in a higher one, well… it’s almost impossible to do. You can do that with simple moving averages because they are just a sum of n values divided by n, it has also been done for Bollinger Bands. But when it comes to more complex calculations, like a Triangular (or Exponential) MA, or Stochastic and many more… you just have to give up because results will NEVER be the same!
You could simply multiply n (periods of your average) by 4, because there are 4 (or 4.5, or 4.3 or whatever else?) to convert a weekly Triangular average into a monthly one. No, a weekly Triangular average of 15 periods cannot be changed to 60 periods to make it a 15-period monthly Triangular average, becuse it will still be a 60-period weekly Triangular average!