Timeframe
Example - Custom Defined Dual-State SessionThis script example aims to cover the following:
defining custom timeframe / session windows
gather a price range from the custom period ( high/low values )
create a secondary "holding" period through which to display the data collected from the initial session
simple method to shift times to re-align to preferred timezone
Articles and further reading:
www.investopedia.com - trading session
Reason for Study:
Educational purposes only.
Before considering writing this example I had seen multiple similar questions
asking how to go about creating custom timeframes or sessions, so it seemed
this might be a good topic to attempt to create a relatively generic example.
MTF Trend WidgetThis indicator identifies trends in multiple higher timeframes (D, W, M) and shows them in a widget off to the right of the chart.
It's meant to be used as an alternative filter for "trading with the trend." Typically people use moving averages of varying lengths for this (i.e. if over 200 MA it's an uptrend, etc.), but I wanted to see if it might be more effective to see if the higher timeframes were actually trending or not in a certain direction.
For the purposes of this indicator, an uptrend is defined as higher highs and higher lows. So if currently in a downtrend and the highs are broken, the indicator will flip to an uptrend because now we have a higher high. Vice versa for downtrends.
The user can choose the lookback period for defining these highs/lows (the pivot points). A smaller lookback number will give you more frequent pivot points.
The user can toggle on visibility of all historical pivot points to make sure the frequency and placement of the swing highs/lows is to their liking.
The user can show the support/resistance lines of those most recent swing high/low points on the multiple timeframes as well.
When these lines are breached, that is when the trends change, so you can see if you are close to changing any longer term trends.
My hope is that this gives people a quick glance at the overall trend without having to cycle through different timeframes.
Multi-VWAPVolume Weighted Average Price (VWAP) Definition
What is the Volume Weighted Average Price (VWAP)?
The volume weighted average price (VWAP) is a trading benchmark used by traders that gives the average price a security has traded at throughout the day,
based on both volume and price. It is important because it provides traders with insight into both the trend and value of a security.
-Investopedia By JASON FERNANDO Reviewed by SOMER ANDERSON Updated Feb 24, 2021
-Choose from 5 different Timeframes (lower or higher)
HTF Candles by DGThigher timeframe (multi timeframe) candles
a simple study introducing new pine function box.new
MTF Bars Back FunctionDesigning higher timeframe tools is challenging. Particularly when you want to apply the higher timeframe lookback to the viewing timeframe.
Here are the problems you run into when you want to use a higher timeframe input:
The output is a string.
On the daily, weekly, or monthly timeframes, the output of the input.resolution variable is "1D", "1W", and "1M".
The 1 minute, 1 day, 1 week, and 1 month timeframes all have an output of 1. Same for the 2m, 2d, 2w, 2m and so on.
I designed this function to automatically calculate the number of candles back that you would need to go back on the timeframe you're viewing to cover the lookback distance on the higher.
It checks if there's a letter on the end of the string and cuts it off, leaving just the number, then converts it from a string to a number.
From there it converts the viewing timeframe and higher timeframe into minutes, divides the two to determine their relationship to one another, then it multiplies the lookback distance of the higher timeframe with the factor and the output is the higher timeframe lookback distance converted into the equivalent bar count on the lower timeframe.
I tried to write it in a way that would make what the function does clear to coders and non-coders so it can be modified to suit your purpose. My initial use case was to us this as way of determining a lower timeframe offset for lines that were cast based on previous high timeframe bars. You could use it for any kind of MTF indicator where you want to know how many bars back you need on the low timeframe to achieve the higher timeframe equivalent. For example, if you wanted to create a multi-timeframe moving average, you would use the output as the length of the moving average.
I used a tuple output for the purpose of demonstration, but this can be reduced to a single relevant output.
Hope you find it useful. It's nice when you don't have to fight against multiple resolutions.
Let me know what you think. Is there a better way to go about it?
Trade well.
Multiple Timeframe RSI with 2 MA by GodtrixHi guys, how ya doing!
I know sometimes you'll need multiple timeframe RSI to study your chart, so do I, therefore I'll share my multi RSI tool for you.
There are total 3 RSI for you to use, you can turn each ON or OFF
I've added more colored value lines for your better view
Also provided a choice for smooth line or step line where there's no gap for higher timeframe RSI on a smaller timeframe chart
MA (SMA) is provided for smoother, less noise lines
Indicator Tips:
Bullish - When it is above 50, this is where you might want to decide whether to close your short order or new short order at top
Bearish - When it is below 50, this is where you might want to decide whether to close your long order or new long order at low
Main MAs and EMAs multi-timeframe for supportObjective is to map out different multi-timeframe support/resistance , all at once. Includes weekly, daily and 4H EMAs and MAs, as per the follow (allowing customization)
WEEKLY (in pink/purple variations):
- 13 EMA
- 21 EMA
- 34 EMA
- 50 M.A
DAILY (in green variations):
- 21 EMA
- 50 EMA
- 120 M.A.
- 200 M.A.
4H (in yellow/golden colors):
- 400 EMA
- 500 EMA
- 675 EMA
- 715 EMA
- 920 EMA
- 1150 EMA
Notes:
- Quite useful to all types of assets; crypto, commodities , stocks, etc...
- Ideally not to be visible all the time, as it can "pollute" the charts. But very helpful in moments of great volatility
ITF_MASimple script to plot inter-time frame moving averages on a chart. ie: plotting a daily MA on a 1 hour chart. Any questions on the parameters, don't hesitate to ask.
Squeeze Momentum Indicator MTF with alerts [lazy bear]MTF version of the popular squeeze momentum indicator, created and shared by Lazy Bear
Stepping MAInput desired timeframe and etc
Ex: Timeframe Daily
Input 100
Will display daily moving of 100 on every timeframe
NSDT Heiken-Ashi Direction Bar MTFA simple script that places a bar at the bottom of the chart to indicate the direction of Heiken-Ashi candles - while still using traditional candles on the main chart. Try setting the bar on a higher timeframe to see the overall direction of the trend, while using traditional candles for entries/exits.
Multi Resolution RSIThis is a Multi resolution or multi Time frame RSI.
This indicator is made to see 3 different time frames RSI in a single Band.
User can input all 3 timeframes on input section.
The Highest time RSI is denoted in BLACK color.
The Medium time RSI is denoted in BLUE color.
The Smaller time RSI is denoted in GREEN color.
The overbought and oversold region is 70 and 30.
The best way to trade using this indicator is when Higher and medium RSI is above 60 and lower is below 40.
RK's 15 ∴ Timeframed Multiple MA Types RibbonI developed this indicator focusing on the KISS (Keep It Simple, Stupid) to help me in a more direct and visual way when enteringand exiting my market position.
The idea is to configure the indicator with your favorite Moving Averages and Lengths and Enter Long when the price is above and Short when the price is below.
I put the setup that I am testing now in the tooltips to give an example.
NSDT MTF Moving AverageThis script allows you to choose a movingaverage type and length, and then choose two different chart time frames. It will plot a movingaverage line for each time frame you select (total of 2). Choose between EMA, SMA, and WMA.
For example:
You can be looking at a 5-min chart, but have an EMA for a 1-min timeframe and a 10-min timeframe be displayed.
Multi_TF_EMAMultiple TimeFrame EMA
In a single indicator, up to 6 EMAs can be displayed in 6 different time frames.
En un solo indicador se puede visualizar hasta 6 EMAs en diferentes TImeFrames.
Volume Info from Lower Time FramesHello Traders,
We are now able to get info from lower time frames, Many Thanks to Pine Team .This script gets volume info from lower time frames and give alert if there is extreme volumes on last X lower time frame candles (if last X volumes are higher than volume moving average). so that if you set alerts on different securities then you will be able get alert if there is extreme volume moves and you can check the chart immediately.
The options:
Timeframe in Seconds : you can set lower time frames in seconds. by default it's 5 seconds. if you set it 60 then it will show 1min volumes, if you set it 1 then it will show 1 seconds volumes
MA Length : The script draws simple moving average using this length info. by default it's 20.
Number of Bars to Check for Alert : by default it's 5. meaning that if last 5 candles is greater than moving average and if you set alert then you get the alert "Extreme Volume"
Other options are for colors and line width.
As you can see in following example, chart time frame is 1 hour and the script shows volume info of 5 seconds candles:
Enjoy!
Previous Period Levels - X Alerts====== ABOUT THIS INDICATOR
- A simple but highly customisable display of previous higher time-frame
OHLC values, drawn using line.new and label.new. Nothing fancy but...
- Customised resolution input which excludes time frames lower than 1 hour
while extending the common higher reference inputs to include:
• 6, and 12 Hour
• 5 Day
• 3, and 6 Month
• 1 Year
- Alert conditions using an adjustable SMA to help reduce false positive
spam.
- Full visual customisation options for (almost) every aspect, so it can be
tuned to suit most individual preferences.
- In line with the miriad visual customisation options is the ability to
change the display format of the Labels, to show more or less information,
or disable them altogether.
====== REASON FOR STUDY
- To practice advanced user input option handling to allow for a full visual
customisation experience without stepping outside of, or interfering with,
the intended function of the indicator.
- Provide reasonably clear code commenting and structure in order to be
useful as a potential learning aid for others, and future reference for
myself.
====== DISCLAIMER
Any trade decisions you make are entirely your own responsibility.
I've made an effort to squash all the bugs, but you never know!
MTF Ichimoku Signal [Takazudo]A multi timeframe Ichimoku Signal indicator. This indicator shows the status of each Ichimoku Signals.
1. TK-Cross
Tenkan-Sen & Kijun-Sen cross status
2. Future Kumo
The newest Kumo color
3. Kumo & Current Relation
The relation between current price & Kumo.
4. Kumo & Chikou-Span Relation
The relation between Kumo & Chikou-Span.
5. Chikou-Span & Candle Cross
Chikou-Span & Candle cross status
Multi Timeframe Moving Average [xdecow]This indicator plots a moving average of 4 different timeframes.
The types of averages available are: SMA, EMA, DEMA, VWMA, RMA, WMA.
Machine Learning: kNN-based Strategy (mtf)This is a multi-timeframe version of the kNN-based strategy.