Previous High/Low MTFIndicator to plot higher time frame previous candle highs and lows.
One of the key factor in understanding the trend is to look at higher time-frames chart.
Parameters are explained below:
resolution : Chose resolution of higher timeframe. If set to same as symbol, it will consider next parameter HTFMultiplier for calculation of higher timeframe
HTFMultiplier : Multiply symbol timeframe to by HTFMultiplier to derive higher time-frame
Offset : Number of higher timeframe candles before to be plotted. 1 means - it will show highs/lows of previous higher timeframe candle.
Highertimeframes
Higher TF - Repainting + Limiting backtest resultsThis strategy is for illustration purpose only. Do not use this as there is massive repainting.
As usual, I was experimenting with adding different entry/exit filters to my main strategy. Thought of adding higher frame filter, picked the code for getting higher time frame supertrend from someone else's script and copied it without thinking much about it.
security(syminfo.tickerid, f_multiple_resolution(HTFMultiplier), supertrend(SupertrendMult, SupertrendPd), lookahead = true, gaps=true)
Started getting better results with this result. I was very much impressed and while trying to enhance further, I started disabling my other entry and exit filters which I generally use.
That worked pretty well without any of my other filters. Hence, thought I will forward test this on a smaller timeframe.
To my surprise, even in forward testing, i was not able to notice repainting very much. It also appeared that smaller timeframes yielded better results. (This wasn't the case with any of my strategies)
Which then prompted me to study the security function and lookahead and gap parameters. Learned that lookahead and gap when set to true will lead to massive repainting - specially if you are using higher timeframes. Hence, these parameters are not advisable to use in strategies.
Further information here: www.tradingview.com
I added three repaint options to further illustrate how security function will work:
Yes : Use security with lookahead and merge set to true
No - set lookahead false : Use security with lookahead and merge set to false
No - do not use security : Falls back to original command on current timeframe. Switch timeframe to HTF resolution to compare the difference.
Conclusion : Always set lookahead and gaps to false when using security function in strategies.
PS: Script also contains code to limit backtesting to certain days/months/years. This can be used as is in other scripts.
Market ProfileHello All,
This is Market Profile script. "Market Profile is an intra-day charting technique (price vertical, time/activity horizontal) devised by J. Peter Steidlmayer. Steidlmayer was seeking a way to determine and to evaluate market value as it developed in the day time frame. The concept was to display price on a vertical axis against time on the horizontal, and the ensuing graphic generally is a bell shape--fatter at the middle prices, with activity trailing off and volume diminished at the extreme higher and lower prices." You better search it on the net for more information, you can find a lot of articles and books about the Market Profile.
You have option to see Value Area, All Channels or only POC line, you can set the colors as you wish.
Also you can choose the Higher Time Frame from the list or the script can choose the HTF for you automatically.
Enjoy!
Multi Time Frame CandlesHello Traders,
This script can show (upto) 3 candles of another time frames without changing chart time frame realtime . You can choose the time frame and number of candles in the options. You have option to change body and wick colors as well.
in this example number of candles is 2:
You can set body and wick colors:
In this example, weekly candles are shown on 1h chart:
Enjoy!
Higher Timeframe Trend Indicator V3.0What is it?
An indicator that depicts the trend of up to 5 higher timeframes on the same chart without needing to context-switch between charts.
Features
- Supports up to 5 timeframes
- Trends indicated by 5 colored buttons: one for each timeframe
- Varying shades of green: uptrend
- Varying shades of red: downtrend
- White/silver: sideways/neutral
- Configurable length (time period) for each timeframe
- Increase length to capture long term trends; decrease it to capture only short term ones
- Configurable sensitivity for each timeframe
- Sensitivity determines what angle is considered trending and what is not
- Increase sensitivity to capture weak trends
- Decrease sensitivity to filter out weak trends and capture only strong/steep ones
- Sensitivity ranges from 1 (least sensitive) to 3 (most sensitive)
- Move the labels around vertically for better visibility by changing the "Location" and "Offset" parameters
How should one use it?
Use it to quickly browse through charts to understand the context across timeframes, and zero in on only those that have trends aligning on the higher and lower timeframes as per your strategy. For e.g., a chart that is trending up strongly on the 15min and 60min (indicated by dark green colored buttons), and trending down on the 1 and/or 5 min (indicated by red-colored buttons), can be shortlisted for a potential pullback trade. Use your favorite pullback strategy (Supply/Demand, Support/Resistance, Moving Averages, etc.) to hop in on the trend.
How are trends determined?
The indicator uses normalized %change in price of the linear regression line segment of the chosen price sources (close, high, low, MA, etc.) over a specified length to determine trend direction and intensity
Known Issues
Will indicate the trend correctly only for timeframes *higher* than the current (visible) resolution/timeframe of the chart. Might not indicate it correctly for lower timeframes ( i.e., lower than the current (visible) resolution/timeframe of the chart). For this reason, all timeframes lower than the current resolution will be hidden in the present release.
Future releases
- I am still experimenting with various sensitivity levels and the corresponding trend shades to make the tool as accurate and intuitive as possible. These modifications might come in
- Sensitivity levels might be increased.
- Bug fixes, if any
A Deeper Look Into Security Function & Possible ImprovementsThere is a link below that further explain the purpose of this publication.
A fresh new look into the limitations of the security() function and perhaps expand our horizons on having access to more accurate data no matter from what timeframe you are on.
docs.google.com
As always, it is my desire to help the community to continue reaching new highs.
Daily Moving Averages on smaller timeframeHi everybody, I've made an enhanced version of this indicator published by @veryevilone.
Here's the things I've added:
Now you can choose the type of the moving average between SMA and EMA.
Now you can have up to three moving averages, each with its own settings.
Now you can choose if the datas come from high, low or close.
Hope you enjoy this.
Moving Average - Higher TimeframeThis indicator let you choose between different Moving Average types while being able to adjust the plotted timeframe:
- Simple Moving Average
- Exponential Moving Average
- Weighted Moving Average
- Hull Moving Average
Set lengths according to your needs / your preferred moving average.
If you have any opinions or wishes feel free to contact me or simply leave a comment.
//@jnnkwnsch
Support Resistance MTFHello Traders,
This is Support Resistance script that uses Multi Time Frame. While getting Close/Open/High/Low values of Higher Time Frames the script does NOT use Security function , instead it calculates them.
while choosing Higher Time Frame, you can use "Auto" option so it uses predefined Higher Time Frames, or you can choose the Higher Time Frame Manually from the list. options for HTF => 15mins, 30mins, 60mins, 120mins, 180mins, 240mins, 720mins, Day, Week, 2 Weeks, Months, 3 Months, 6 Months, 12 Months.
You have option to use High/Low or Close/Open values while calculating support resistance levels.
"Period for Highest/Lowest Bars" option is used as loopback period to check if it's Highest/lowest bars. smaller numbers = more sensitive result.
You have option for transparency and coloring of support/resistance levels/zone => Red, Lime, Blue, White, Black, Olive, Gray
An example for 15 min chart, 4hours selected as HTF
You can set transparency and colors as you wish:
You can choose Close/Open prices while calculating S/R levels instead of High/Low
Enjoy!
Trend LinesHello Everyone! This is my new trend lines script (after beta version that was published almost one year ago)
The idea is to find Pivot Highs (PH) and Pivot Lows(PL) first.
Then, If current PH is smaller then previous PH (means no new higher high and possible downtrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.
Same idea when using Pivot Lows, If current PL is higher then previous PL (means no new lower low and possible uptrend) then draw trend line using them. and also it checks previous trend line (if exits) and if current angle is smaller then don't extend previous one.
Optionally style of old trend lines drawn as dashed.
Hope you enjoy it!
Bollinger Bands MTF [LonesomeTheBlue]With this script you can follow Bollinger Bands for current and higher time frame together. Higher time frame is calculated by script.
if current period
1m => higher period=5m
3m => higher period=5m
5m => higher period=15m
15m => higher period=1h
30m => higher period=1h
45m => higher period=1h
1h => higher period=4h
2h => higher period=4h
3h => higher period=4h
4h => higher period=1day
1day => higher period=1week
HTF Candle R1.2 by JustUncleLDescription:
This indicator creates a representation of a Higher Time Frame (HFT_) candlestick which is overlaid onto the Current chart. You can optionally show Body and/or Wicks.
Warning:
Be aware the current HTF_ candle does not back update the bar representation and chart needs be refreshed to update properly. I don't know of a way around this issue.