Maintaing an indicator across different timeframes

 

Hi folks,

I'm new to MQL4 and am trying to create a custom pivot indicator across daily, weekly, monthly calcs as an exercise in programming. My question is:

If I have an indicator value in say the D1 timeframe and move to the H4 timeframe how do I maintain the values of D1 in H4? For example, if the first bar of D1 has the value 1.32 and the second  has 1.42 then when I move to H4 I want the first 6 bars to show 1.32 and the next 6 bars to show 1.42. Currently, when I change timeframe it just redraws to to fit each bar.

Thanks for any help! 

 
satsujin: I'm new to MQL4 and am trying to create a custom pivot indicator across daily, weekly, monthly
Look at any of the MTF indicators.
 
Which one would you recommend? I can only look at the custom ones and they all rearrange themselves when the timeframe changes.
 

https://www.mql4.com/search#!keyword=mtf%20indicator&module=mql4_module_codebase

MTF MACD - MQL4 Code Base uses ArrayCopyRates like a lot do

My Inverse Distance Weighted Moving Average (IDWma) - MQL4 Code Base uses iBarShift


 
Thanks for that!