This is very cool and simple script I just play around with non security MTF and this is the end result:) buy period is lime, sell period is red since it based on the changes of the MTF by time it give us very nice signal of bullish or bearish period since no security is here so no repaint fear.. if you use 1 hour candle choose either daily (better for crypto ) or weekly MTF (better for stocks ) or even higher if you use lower TF then try to see which MTF is best suited for it simple and nice I think :) here on tesla facebook boeing nifty forex etc
You have bug in line #10 T_c = fixnan( ti ? close : na ) You need to change it to use close[1] so it should be T_c = fixnan( ti ? close[1] : na )
If you will plot T_c as i did you will see that instead of having the close price of previous higher time frame, it will take the 1st bar of the current 1st bar. For example lets say high time frame is one day, then in case the last bar lat day before the stock exchange close, it will take the 1st bar of the current day.
ezrakoper
⋅
looks very interesting
kurtsmock
⋅
That's really interesting the way you mapped that.
But isn't the output essentially just 2x the distance from the weekly open with the percentages rounded up to whole numbers?
Even still, the premise is still interesting because you could use this basic structure as a basis to analyze statistical measurements based on the weekly level.
You have bug in line #10
T_c = fixnan( ti ? close : na )
You need to change it to use close[1] so it should be
T_c = fixnan( ti ? close[1] : na )
If you will plot T_c as i did you will see that instead of having the close price of previous higher time frame, it will take the 1st bar of the current 1st bar.
For example lets say high time frame is one day, then in case the last bar lat day before the stock exchange close, it will take the 1st bar of the current day.