Getting started with multi-timeframe analysis on TradingView is easy:
Step 1 - Add an indicator to your chart
Step 2 - Open the indicator's settings and find the Resolution parameter in Inputs
Step 3 - Adjust the resolution to the timeframe of your liking
This process works for most of the built-in indicators on TradingView. You can have several timeframes visible at once so you always know the most important price levels. MTF works by the minute, hour, day, week and month.
In addition, Pine coders can use the same `resolution` parameter we use in our built-in indicators in their own scripts. By simply adding it to a script’s `study` declaration statement, coders now have an easy way to add MTF functionality to scripts and let users decide the timeframe they want the indicator to run on.
We hope you enjoy this video tutorial and please press like if you find it helpful. If you're already an expert at multi-timeframe analysis, please leave some tips and educational lessons in the comments so others can learn from you.
A New ‘Resolution’ Parameter Makes Multi-Timeframe Analysis Easy (TradingView blog)
Learn more about multi-timeframe analysis from other traders
Explore the public library for scripts using multi-timeframe analysis
Technically, the MTF 20-Day MA of daily Close is computed once a day at the closing price. In the TLT 30-minute chart, the MA20 is represented as a continuously changing variable, shown as a smooth curve. Should it be? In my thinking, it would be a flat constant value changing only after the day's Close. It would be a stair-step variable. Similarly, the weekly Accum/Dist variable would show as three flat steps. It shouldn't change continuously through the trading day. (You could, I suppose, recalculate the 1-Week A/D as a 5-Day A/D to break it up into smaller daily steps -- Mon/Fri, Tues/Mon, Wed/Tues, etc.)
My question comes down to whether chart settings support drawing MTF values as a stair-step alternative to a continuous line? I couldn't tell that from the video.
NOTE: I am taking the MTF 20-Day MA as a running average of 20 daily bars. Your chart approximates a running average of 260 30-minute bars (20 days x 13 bars/day). They aren't the same.
This script shows the difference between using gaps or not when fetching HTF 1D data of an MA with period 20. The pink line uses no gaps, while the blue one does. So the blue line shows what you will get with the built-ins at higher TF's:
//@version=4 study("Gaps vs No Gaps", "", true) res = input("D", type = input.resolution) ma = sma(close, 20) maGaps = security(syminfo.tickerid, res, ma, gaps = barmerge.gaps_on) maNoGaps = security(syminfo.tickerid, res, ma) plot(maGaps, "maGaps") plot(maNoGaps, "maNoGaps", color.fuchsia)
While Pine coders can choose which display mode they will use when using `security()` instead of the new `resolution` parameter, there is currently no way for traders to choose between both plotting types when using the built-ins' automatic MTF feature. Could be a useful improvement to think of for the future. Feel free to ask if any of this isn't clear.
For your future improvement, maybe you can consider two check boxes in the Settings dialog -- Gap and No-Gap. Choose Gap as the default if you wish, but allow the user to override it or even to see both display modes.
Thanks for your reply.
Thx for asking the question. Will be useful to many other users.