See LTF Candles and VolumeThis indicator will show you the candles, wicks, and their volumes from a lower timeframe chart. You can also select a different symbol in inputs.
This indicator uses requests to receive data from different timeframe or symbols, and it simply draws boxes and lines from the requested data.
LTF
VEMA_LTFVEMA indicator is based on lower time frame volume data and it has 3 lines.
20, 50, 100 moving averages of the close price in each candle with the highest volume.
Effectively working fine and hence sharing.
Will Add more information with examples in next update
Sync Frame (MTF Charts) [Kioseff Trading]Hello!
This indicator "Sync Frame" displays various lower timeframe charts for the asset on your screen!
5 lower timeframe candle charts shown
Timeframes auto-calculated using the new timeframe.from_seconds() function
Heikin-Ashi candles available
Baseline chart type available
Dynamic Scaling for ease of use
User customizable timeframes
Simple script (:
The image above shows the baseline chart type.
Time image above shows a traditional candlestick chart.
The image above shows a hekin-ashi chart.
The image above shows the indicator when nearly zoomed in as much as possible. The lower timeframe charts adjust to my chart positioning.
The image above shows my screen fully zoomed out; the lower timeframe charts adjust in both height and width to accommodate my chart positioning!
Thank you for checking this out (:
Volume Delta Trailing Stop [LuxAlgo]The ' Volume Delta Trailing Stop ' indicator uses Lower Time Frame (LTF) volume delta data which can provide potential entries together with a Volume-Delta based Trailing Stop-line .
🔶 USAGE
Our 'Volume Delta Trailing Stop' script can show potential entries/Stop Loss lines
A trigger line needs to be broken before a position is taken, after which a Volume Delta-controlled Trailing Stop-line is created:
🔶 DETAILS
🔹 Volume rises when bought or sold
🔹 When the opening price appears on the chart, a buy/sell order has been executed.
If that order is less than the available supply of that particular price, volume will rise, without moving the price.
🔹 When the opening price is the same as the closing price, the volume of that bar can be seen as "neutral volume" (nV); nor "up", nor "down" volume.
Example
A buy order doesn't fill the first available supply in the order book. This price will be the opening price with a certain volume.
When at closing time, price still hasn't moved (the first available supply in the order book isn't filled, or no movement downwards),
the closing price will be equal to the opening price, but with volume. This can be seen as "neutral volume (nV)".
🔹 Delta Volume (ΔV): this is "up volume" minus "down volume"
🔹 Standard volume is colored red when closing price is lower than opening price ( = "down volume").
🔹 Standard volume is colored green when closing price is higher OR equal (nV) than opening price ( = "up volume").
🔹 Neutral Volume
The "Neutral-Volume" is considered "Up-Volume" - setting will dictate whether nV is considered as green 'buy' volume or not.
🔶 EXAMPLE
29 July 10:00 -> 10:05, chart timeframe 5 minutes, open 29311.28, close 29313.89
close > open, so the volume (39.55) is colored green ("up volume").
(The Volume script used in the following examples is the open-source publication Volume Columns w. Alerts (V) from LucF )
Let's zoom to the 1-minute TF:
The same period is now divided into more bars, volume direction (color) is dependable on the difference between open and close.
Counting up and down volume gives a more detailed result, it remains in an upward direction though):
(ΔV = +15.51)
Let's further zoom in to the 1-second TF:
The same period is now divided into even more bars (more possibility for changing direction on each bar)
Here we see several bars that haven't moved in price, but they have volume ("neutral" volume).
(neutral volume is coloured light green here, while up volume is coloured darker green)
When we count all green and red volume bars, the result is quite different:
(ΔV = -0.35)
In total more volume is found when price went downwards, yet price went up in these 5 minutes.
-> This is the heart of our publication, when this divergence occurs, you can see a barcolor changement:
• orange: when price went up, but LTF Volume was mainly in a downward direction.
• blue: when price went down, but LTF Volume was mainly in an upwards direction.
When we split the green "up volume" into "up" and "neutral", the difference is even higher
(here "neutral volume" is colored grey):
(ΔV = -12.76; "up" - "down")
🔶 CONCEPTS
bullishBear = current bar is red but LTF volume is in upward direction -> blue bar
bearishBull = current bar is green but LTF volume is in downward direction -> orange bar
🔹 Potential positioning - forming of Trigger-line
When not in position, the script will wait for a divergence between price and volume direction. When found, a Trigger-line will appear:
• at high when a blue bar appears ( bullishBear ).
• at low when an orange bar appears ( bearishBull ).
Next step is when the Trigger-line is broken by close or high/low (settings: Trigger )
Here, the closing price went under the grey Trigger-line -> bearish position:
🔹 Trailing Stop-line
When the Trigger-line is broken, the Trailing Stop-line (TS-line) will start:
• low when bullish position
• high when bearish position
You can choose (settings -> Trigger -> Close or H/L ) whether close price or high/low should break the Trigger-line
When alerts are enabled ("Any alert() function call"), you'll get the following message:
• ' signal up ' when bullish position
• ' signal down' when bearish position
After that, the TS-line will be adjusted when:
• a blue bullishBear bar appears when in bullish position -> lowest of {low , previous blue bar's high or orange bar's low}
• an orange bearishBull bar appears when in bearish position -> highest of {high, previous blue bar's high or orange bar's low}
When alerts are enabled ("Any alert() function call"), and the TS-line is broken, you'll get the following message:
• ' TS-line broken down ' when out bullish position
• ' TS-line broken up ' when out bearish position
🔹 Reference Point
Default the direction of price will be evaluated by comparing closing price with opening price.
When open and close are the same, you'll get "neutral volume".
You can use "previous close" instead (as in built-in volume indicator) to include gaps.
If close equals open , but close is lower than previous close , it will be regarded as " down volume ",
similar, when close is higher than previous close , it will be regarded as " up volume "
Note, the setting applies for the current timeframe AND Lower timeframe:
Based on: " open " (close - open)
Based on: " previous close " (close - previous close)
🔹 Adjustment
When the TS-line changes, this can be adjusted with a percentage of price , or a multiple of " True Range "
Default (Δ line -> Adjustment - 0)
Δ line -> Adjustment 0.03% (of price)
Δ line -> Mult of TR (10)
🔶 SETTINGS
🔹 LTF: choose your Lower TimeFrame: 1S (seconds), 5S, 10S, 15S, 30S, 1 minute)
🔹 Trigger: Choose the trigger for breaking the Trigger-line ; close or H/L (high when bullish position, low when bearish position)
🔹 Δ line ( Trailing Stop-line ): add/subtract an adjustment when the TS-line changes ( default: Adjustment ):
• Adjustment ( default: 0 ): add/subtract an extra % of price
• Mult of TR : add/subtract a multiple of True Range
🔹 Based on: compare closing price against:
• open
• previous close
🔹 "Neutral-Volume" is considered "Up-Volume" : this setting will dictate whether nV is considered as green 'buy' volume or not.
🔶 CONSIDERATIONS
🔹 The lowest LTF (1S) will give you more detail and will get data close to tick data.
However, a maximum of 100,000 intrabars can be used in calculations .
This means on the daily chart you won't see anything since 1 day ~ 86400 seconds. (just over 1 bar)
-> choose a lower chart timeframe, or choose a higher LTF (5S, 10S, ... 1 minute)
🔹 Always choose a LTF lower than the current chart timeframe.
🔹 Pine Script™ code using this request.security_lower_tf() may calculate differently on historical and real-time bars, leading to repainting .
See inside Candles: Directionality %; Constituent Bars & GapsSee inside candles based on user-input LTF setting: get data on 'Directionality' of your candle; Gaps (total and Sum; UP and DOWN); Number of Bull or Bear constituent candles
//Features:
-DIRECTIONALITY: compare length of the 'zig-zag' random walk of lower time frame constituent candles, to the full height of the current candle. Resulting % I refer to as 'directionality'.
-GAPs: what i refer to as 'gaps' are also known as Volume imbalances: the gap between previous candles close and current candle's open (if there is one).
--Gaps total (up vs down gaps). Number of Up gaps printed above bar in green, down gaps printed below bar in red.
--Gaps Sum (total summed UP gap, total summed down gaps. Sum of Up gaps printed above bar in green, Sum of down gaps printed below bar in red.
-Candles Total: Numer of LTF up vs down candles within current timeframe candle. Number of up candles printed above bar in green, Number of down candles printed below bar in red.
//USAGE:
-Primary purpose in this was the Directionality aspect. Wanted to get a measure of how choppy vs how directional the internals of a candle were. Idea being that a candle with high % directionality (approaching 100) would imply trending conditions; while a candle which was large range and full bodies but had a low % directionality would imply the internals were back-and-forth and => rebalanced, potentially indicating price may not need to retrace back into it and rebalance further. All rather experimental, please treat it as such: have a play around with it.
-Number of gaps, Sums of up and down gaps, ratio of up and down constituent candles also intended to serve a similar purpose as the above.
-Set the input lower timeframe; this must obviously be lower then your current timeframe. You will significant differences in results depending on the ratio your timeframes (chart timeframe vs user-input timeframe).
//User Inputs:
-Lower timeframe input (setting child candle size within current chart parent candle).
-Choose function from the four listed above.
-typical formating options: Bull color/bear color txt for gaps functions.
-display % unit or not.
-display vertical or horizontal text.
-Set min / max directionality thresholds; and color code results.
-Toggle on/off 'hide results outside of threshold' to declutter the chart.
-choose label style.
//NOTES:
-Directionality thresholds can be set manually; Max and Min thresholds can be set to filter out 'non-extreme' readings.
-Note that directionality % can sometimes exceed 100%, in cases where price trends very strongly and gaps up continuously such that sum of constituent candles is less than total range of parent candle.
-Personally i like the idea of seeking bold, large-range, full bodied candles, with a lower than typical directionality %; indicating that a price move is both significant and it's already done it's rebalancing; I would see this as potentially favourable for continuation (obviously depending on context).
---- Showcase of the other functions beyond Directionality percentage ----
Candles Total (bull vs Bear). ES1! Hourly; ltf = 5min: Candles total: LTF up candles and LTF down candles making up the current HTF candle (constituent number of UP candles printed above in green, Down candles printed below in red):
Gaps SUM. SPX hourly, ltf = 5min. Sum of 'UP' gaps within candle printed above in green, sum of 'DOWN' gaps printed below in red:
Gaps TOTAL: SPX hourly, ltf = 1min. Simply the total of 'up' gaps vs 'down' gaps withing our candle; based on the user input constituent candles within:
lower_tf█ OVERVIEW
This library is a Pine programmer’s tool containing functions to help those who use the request.security_lower_tf() function. Its `ltf()` function helps translate user inputs into a lower timeframe string usable with request.security_lower_tf() . Another function, `ltfStats()`, accumulates statistics on processed chart bars and intrabars.
█ CONCEPTS
Chart bars
Chart bars , as referred to in our publications, are bars that occur at the current chart timeframe, as opposed to those that occur at a timeframe that is higher or lower than that of the chart view.
Intrabars
Intrabars are chart bars at a lower timeframe than the chart's. Each 1H chart bar of a 24x7 market will, for example, usually contain 60 intrabars at the LTF of 1min, provided there was market activity during each minute of the hour. Mining information from intrabars can be useful in that it offers traders visibility on the activity inside a chart bar.
Lower timeframes (LTFs)
A lower timeframe is a timeframe that is smaller than the chart's timeframe. This framework exemplifies how authors can determine which LTF to use by examining the chart's timeframe. The LTF determines how many intrabars are examined for each chart bar; the lower the timeframe, the more intrabars are analyzed.
Intrabar precision
The precision of calculations increases with the number of intrabars analyzed for each chart bar. As there is a 100K limit to the number of intrabars that can be analyzed by a script, a trade-off occurs between the number of intrabars analyzed per chart bar and the chart bars for which calculations are possible.
█ `ltf()`
This function returns a timeframe string usable with request.security_lower_tf() . It calculates the returned timeframe by taking into account a user selection between eight different calculation modes and the chart's timeframe. You send it the user's selection, along with the text corresponding to the eight choices from which the user has chosen, and the function returns a corresponding LTF string.
Because the function processes strings and doesn't require recalculation on each bar, using var to declare the variable to which its result is assigned will execute the function only once on bar zero and speed up your script:
var string ltfString = ltf(ltfModeInput, LTF1, LTF2, LTF3, LTF4, LTF5, LTF6, LTF7, LTF8)
The eight choices users can select from are of two types: the first four allow a selection from the desired amount of chart bars to be covered, the last four are choices of a fixed number of intrabars to be analyzed per chart bar. Our example code shows how to structure your input call and then make the call to `ltf()`. By changing the text associated with the `LTF1` to `LTF8` constants, you can tailor it to your preferences while preserving the functionality of `ltf()` because you will be sending those string constants as the function's arguments so it can determine the user's selection. The association between each `LTFx` constant and its calculation mode is fixed, so the order of the arguments is important when you call `ltf()`.
These are the first four modes and the `LTFx` constants corresponding to each:
Covering most chart bars (least precise) — LTF1
Covers all chart bars. This is accomplished by dividing the current timeframe in seconds by 4 and converting that number back to a string in timeframe.period format using secondsToTfString() . Due to the fact that, on premium subscriptions, the typical historical bar count is between 20-25k bars, dividing the timeframe by 4 ensures the highest level of intrabar precision possible while achieving complete coverage for the entire dataset with the maximum allowed 100K intrabars.
Covering some chart bars (less precise) — LTF2
Covering less chart bars (more precise) — LTF3
These levels offer a stepped LTF in relation to the chart timeframe with slightly more, or slightly less precision. The stepped lower timeframe tiers are calculated from the chart timeframe as follows:
Chart Timeframe Lower Timeframe
Less Precise More Precise
< 1hr 1min 1min
< 1D 15min 1min
< 1W 2hr 30min
> 1W 1D 60min
Covering the least chart bars (most precise) — LTF4
Analyzes the maximum quantity of intrabars possible by using the 1min LTF, which also allows the least amount of chart bars to be covered.
The last four modes allow the user to specify a fixed number of intrabars to analyze per chart bar. Users can choose from 12, 24, 50 or 100 intrabars, respectively corresponding to the `LTF5`, `LTF6`, `LTF7` and `LTF8` constants. The value is a target; the function will do its best to come up with a LTF producing the required number of intrabars. Because of considerations such as the length of a ticker's session, rounding of the LTF to the closest allowable timeframe, or the lowest allowable timeframe of 1min intrabars, it is often impossible for the function to find a LTF producing the exact number of intrabars. Requesting 100 intrabars on a 60min chart, for example, can only produce 60 1min intrabars. Higher chart timeframes, tickers with high liquidity or 24x7 markets will produce optimal results.
█ `ltfStats()`
`ltfStats()` returns statistics that will be useful to programmers using intrabar inspection. By analyzing the arrays returned by request.security_lower_tf() in can determine:
• intrabarsInChartBar : The number of intrabars analyzed for each chart bar.
• chartBarsCovered : The number of chart bars where intrabar information is available.
• avgIntrabars : The average number of intrabars analyzed per chart bar. Events like holidays, market activity, or reduced hours sessions can cause the number of intrabars to vary, bar to bar.
The function must be called on each bar to produce reliable results.
█ DEMONSTRATION CODE
Our example code shows how to provide users with an input from which they can select a LTF calculation mode. If you use this library's functions, feel free to reuse our input setup code, including the tooltip providing users with explanations on how it works for them.
We make a simple call to request.security_lower_tf() to fetch the close values of intrabars, but we do not use those values. We simply send the returned array to `ltfStats()` and then plot in the indicator's pane the number of intrabars examined on each bar and its average. We also display an information box showing the user's selection of the LTF calculation mode, the resulting LTF calculated by `ltf()` and some statistics.
█ NOTES
• As in several of our recent publications, this script uses secondsToTfString() to produce a timeframe string in timeframe.period format from a timeframe expressed in seconds.
• The script utilizes display.data_window and display.status_line to restrict the display of certain plots.
These new built-ins allow coders to fine-tune where a script’s plot values are displayed.
• We implement a new recommended best practice for tables which works faster and reduces memory consumption.
Using this new method, tables are declared only once with var , as usual. Then, on bar zero only, we use table.cell() calls to populate the table.
Finally, table.set_*() functions are used to update attributes of table cells on the last bar of the dataset.
This greatly reduces the resources required to render tables. We encourage all Pine Script™ programmers to do the same.
Look first. Then leap.
█ FUNCTIONS
The library contains the following functions:
ltf(userSelection, choice1, choice2, choice3, choice4, choice5, choice6, choice7, choice8)
Selects a LTF from the chart's TF, depending on the `userSelection` input string.
Parameters:
userSelection : (simple string) User-selected input string which must be one of the `choicex` arguments.
choice1 : (simple string) Input selection corresponding to "Least precise, covering most chart bars".
choice2 : (simple string) Input selection corresponding to "Less precise, covering some chart bars".
choice3 : (simple string) Input selection corresponding to "More precise, covering less chart bars".
choice4 : (simple string) Input selection corresponding to "Most precise, 1min intrabars".
choice5 : (simple string) Input selection corresponding to "~12 intrabars per chart bar".
choice6 : (simple string) Input selection corresponding to "~24 intrabars per chart bar".
choice7 : (simple string) Input selection corresponding to "~50 intrabars per chart bar".
choice8 : (simple string) Input selection corresponding to "~100 intrabars per chart bar".
Returns: (simple string) A timeframe string to be used with `request.security_lower_tf()`.
ltfStats()
Returns statistics about analyzed intrabars and chart bars covered by calls to `request.security_lower_tf()`.
Parameters:
intrabarValues : (float [ ]) The ID of a float array containing values fetched by a call to `request.security_lower_tf()`.
Returns: A 3-element tuple: [ (series int) intrabarsInChartBar, (series int) chartBarsCovered, (series float) avgIntrabars ].
AfterHours Spike DetectorThe script pulls Lower Timeframe (30min) data to draw High/Low of Out-of-hours/AfterHours session (post-market session & next day pre-market session) on the Daily regular session chart. It then identifies significant AfterHours price changes and what happens to these price Spikes by the Open of the next day regular session.
You can change:
wether to show AfterHours High/Lows
wether to show AfterHours price Spikes
the AfterHours price Spike threshold (default = +/- 10%)
Magnifying Glass (LTF Candles) by SiddWolf█ OVERVIEW
This indicator displays The Lower TimeFrame Candles in current chart, Like Zooming in on the Candle to see it's Lower TimeFrame Structure. It plots intrabar OHLC data inside a Label along with the volume structure of LTF candle in an eloquent format.
█ QUICK GUIDE
Just apply it to the chart, Hover the mouse on the Label and ta-da you have a Lower Timeframe OHLC candles on your screen. Move the indicator to the top and shrink it all the way up, because all the useful data is inside the label.
Inside the label: The OHLC ltf candles are pretty straightforward. Volume strength of ltf candles is shown at bottom and Volume Profile on the left. Read the Details below for more information.
In the settings, you will find the option to change the UI and can play around with Lower TimeFrame Settings.
█ DETAILS
First of all, I would like to thank the @TradingView team for providing the function to get access to the lower timeframe data. It is because of them that this magical indicator came into existence.
Magnifying Glass indicator displays a Candle's Lower TimeFrame data in Higher timeframe chart. It displays the LTF candles inside a label. It also shows the Volume structure of the lower timeframe candles. Range percentage shown at the bottom is the percentage change between high and low of the current timeframe candle. LTF candle's timeframe is also shown at the bottom on the label.
This indicator is gonna be most useful to the price action traders, which is like every profitable trader.
How this indicator works:
I didn't find any better way to display ltf candles other than labels. Labels are not build for such a complex behaviour, it's a workaround to display this important information.
It gets the lower timeframe information of the candle and uses emojis to display information. The area that is shown, is the range of the current timeframe candle. Range is a difference between high and low of the candle. Range percentage is also shown at the bottom in the label.
I've divided the range area into 20 parts because there are limitation to display data in the labels. Then the code checks out, in what area does the ltf candle body or wick lies, then displays the information using emojis.
The code uses matrix elements for each block and relies heavily on string manipulation. But what I've found most difficult, is managing to fit everything correctly and beautifully so that the view doesn't break.
Volume Structure:
Strength of the Lower TimeFrame Candles is shown at the bottom inside the label. The Higher Volume is shown with the dark shade color and Lower Volume is shown with the light shade. The volume of candles are also ranked, with 1 being the highest volume, so you can see which candle have the maximum to minimum volume. This is pretty important to make a price action analysis of the lower timeframe candles.
Inside the label on the left side you will see the volume profile. As the volume on the bottom shows the strength of each ltf candles, Volume profile on the left shows strength in a particular zone. The Darker the color, the higher the volume in the zone. The Highest volume on the left represents Point of Control (Volume Profile POC) of the candle.
Lower TimeFrame Settings:
There is a limitation for the lowest timeframe you can show for a chart, because there is only so much data you can fit inside a label. A label can show upto 20 blocks of emojis (candle blocks) per row. Magnifying Glass utilizes this behaviour of labels. 16 blocks are used to display ltf candles, 1 for volume profile and two for Open and Close Highlighter.
So for any chart timeframe, ltf candles can be 16th part of htf candle. So 4 hours chart can show as low as 15 minutes of ltf data. I didn't provide the open settings for changing the lower timeframe, as it would give errors in a lot of ways. You can change the timeframe for each chart time from the settings provided.
Limitations:
Like I mentioned earlier, this indicator is a workaround to display ltf candles inside a label. This indicator does not work well on smaller screens. So if you are not able to see the label, zoom out on your browser a bit. Move the indicator to either top or bottom of all indicators and shrink it's space because all details are inside the label.
█ How I use MAGNIFYING GLASS:
This indicator provides you an edge, on top of your existing trading strategy. How you use Magnifying Glass is entirely dependent on your strategy.
I use this indicator to get a broad picture, before getting into a trade. For example I see a Doji or Engulfing or any other famous candlestick pattern on important levels, I hover the mouse on Magnifying Glass, to look for the price action the ltf candles have been through, to make that pattern. I also use it with my "Wick Pressure" indicator, to check price action at wick zones. Whenever I see price touching important supply and demand zones, I check last few candles to read chart like a beautiful price action story.
Also volume is pretty important too. This is what makes Magnifying Glass even better than actual lower timeframe candles. The increasing volume along with up/down trend price shows upward/downward momentum. The sudden burst (peak) in the volume suggests volume climax.
Volume profile on the left can be interpreted as the strength/weakness zones inside a candle. The low volume in a price zone suggests weakness and High volume suggests strength. The Highest volume on the left act as POC for that candle.
Before making any trade, I read the structure of last three or four candles to get the complete price action picture.
█ Conclusion
Magnifying Glass is a well crafted indicator that can be used to track lower timeframe price action. This indicator gives you an edge with the Multi Timeframe Analysis, which I believe is the most important aspect of profitable trading.
~ @SiddWolf
Liquidity Heatmap LTF [LuxAlgo]This indicator displays column heatmaps highlighting candle bodies with the highest associated volume from a lower user selected timeframe.
Settings
LTF Timeframe: Lower timeframe used to retrieve the closing/opening price and volume data. Must be lower than the current chart timeframe.
Other settings control the style of the displayed graphical elements.
Usage
It can be of interest to show which candles from a lower timeframe had the highest associated volume, this allows for the highlighting of areas where a candle body was the most traded by market participants.
The area with the highest activity is highlighted in the script with a yellow color (or another user selected color) and additionally by two lines forming an interval.
When the candle body with the highest volume is overlapped by a candle body with lower volume this one will be highlighted instead, hence why certain areas of high activity might not be highlighted by the heatmap.
It is recommended to hide regular candles or use a more discrete graphical presentation of prices when using this tool. Lines are also displayed to highlight the full candle range as well as if a candle was bullish (in green) or bearish (in red). These lines can be hidden if the user is only interested in the heatmap.
HTF Candle CloseThis draws a label to alert user when a higher timeframe candle closes on a intraday chart.
Purpose of it is so that people who mainly use lower timeframe charts do not forget to look at higher timeframe candle closes.