Relative Price Volume
Relative Price Volume is an indicator which shows anomalies between price and volume on a chart over a given period. The goal is to identify potential reversal and/consolidation areas for price as it relates to volume. It is a simple variation of a Volume at Price indicators. It can also be used to mark potential support and resistance lines on the chart as the areas it signals is where the price battles are waged.
Settings:
Period = length for which to calculate average candle body and average volume
Long Factor = relative size multiplier to determine if a candle is larger than average or if volume is higher than average
Short Factor = relative size multiplier to determine if a candle is smaller than average or if volume is lower than average
Anomaly Conditions
1. If a candle is larger than average and volume is lower than average, then this is an anomaly, and we should be on alert for a change in momentum.
2. if a candle is smaller than average and volume is higher than average, then this too is an anomaly and should put us on alert.
The indicator will draw a cross on the chart indicating the candle is that is flashing the warning that the run is done and a potential consolidation and/or reversal is pending. Used in conjunction with support and resistance levels this could signal a time to enter or exit a trade.
The default size factors considers a candle or volume:
1. Larger than average if it is 60% or more (.6) larger than average.
2. Smaller than average if it is 40% or less (.4) smaller than average.
Hope this helps! Happy trading!
حجم التداول
Volume and vPOC InsightsThe vPOC or volume point of control shows where most of the volume was traded. This is important because this is where the institutions and market makers have opened their positions, and these are the ones that move the markets!
This indicator is designed to cut through the volume noise, and enable the hiding of lower volume data.
The main setting allows you to define a lookback, and obscure the candles whose volume is less than x % of the highest volume in this lookback.
Of the remaining candles, their vPOC will be displayed. There are extra settings to extend naked vPOCs, as well as the highs and lows of these high volume candles, plus an EMA based on the vPOC price levels.
I must credit quantifytools @quantifytools who allowed me to utilize his code, for finding vPOCs using lower timeframe candles - there are comments in the code also. It works perfectly so why reinvent the wheel?
VWOP: Volume Weighted & Oscillated PriceWhile playing around with the standard "ta.vwap" I wondered why there was no length input, so I did some research on what the underlying calculation actually is, and did my best to augment it so as to allow for a variable length based on an oscillator value.
Normal VWAP = (Number of Shares Bought x Typical Price) / Total Volume
In my VWOP Calculation, typical price is replaced by selected moving average type or "matype" and then multiplied by the volume.
Then a total value is calculated using math.sum with a length value that changes according to a selected oscillator's value. The total is then divided by
the sum of just volume using the same oscillating length value. Result is then passed through the selected"matype" once more to give the final result.
Indicator designed for use as a entry/exit indicator in conjunction with more traditional moving averages and/or signal filters. Useful for taking volume + an oscillator into account along with price, instead of just the price as with a simple moving average.
Two Days Auto Anchored VWAPEasier way to set anchors to today and last trading day's open.
All you need to do is to select today from the dates picker in Setting ➔ Inputs ➔ Anchor Today .
If last workday is holiday for the market, then overwrite by selecting Manually Set Prev Day
Next update: auto set today's anchor, so completely automatic
ADX Volume Trend
Thie indicator is a modified and upgraded version of the popular ADX tool.
ADX is used to determine the strength of a trend, and also to determine the direction in which the trend is likely to go.
With this script, I have added in the formula the usage of volume, leading to the following functionality.
The length is used to determine the period to calculate the trend strength and direction, and the average is used to then determine the oscillator and to confront the previous line.
The volume average determines how many volumes bars the indicator should use to determine if a volume bar is above or below average if volume mode is selected.
With the volume mode on, you'll get the DI+ and DI- lines, which are by default displayed as a histogram that calculates the difference between the two lines, called "Directional difference", are calculated using also the volume in the formula, multiplying the normal output by the volume multiplier. I suggest using this mode in high-volume markets.
The trend strength difference is the area calculated using the difference between the ADX line and his moving average and can be used to analyze divergences in the swing points.
It has a lot of improvements and new functionalities, like:
- Histogram to show the output at best
- Averages to compare the data
- The option to include the volume inside of the formula
- Other options and esthetic changes
This indicator is created to improve the usability of the popular ADX indicator, including the very important variable of the volumes, in fact, it's the best to use for the Volume Spread Analysis.
Volume Spread Analysis IchimokuThis version of the popular Ichimoku indicator is modified to let the user choose between his classic mode and the volume-weighted mode.
Every line of the indicator is customizable with this function.
The Kijun and Tenkan lines are choosable from:
1. The normal version, so the average of the high and the low of the selected period
2. The volume mode, so the average price of the selected input ponderated to the volume
The Senkau Span A is the average from the Kijun (fast line) and the Tenkan (slow line) lines and it's choosable from:
1. The normal price version
2. The volume mode
3. The average between points 1 and 2
4. The automatic average between the two fast lines that you've chosen
The Senkau Span B is the slowest line of the indicator, used to determine the long-term trend, and can be chosen from:
1. The normal average price between the high and the low of the selected period
2. The volume average price, using the Volume Weighted Moving Average
The Trama Backline is the popular "LUX Algo" T.R.A.M.A. indicator, which I'm thankful for, and can be fantastically used to display the current trend strength and condition. This line is readable in the following way:
- If the line is moving sideways, the trend may be in a consolidation phase
- If the line is moving upwards or downwards, the trend may be in a trend phase
Last Price minus Open Price Intraday VolumeLast Price minus Open Price Intraday Volume
Change in price from day Open price to Last Price indicate the stock price movement. Last Price minus Open Price Intraday Volume indicator is framed on volume change during change in price from day Open price to Last Price. It takes into account the average intraday volume based on intraday length of bars and actual volume attributed to change in price from day Open Price to Last Price. The indicator reflects the change in trend .By analyzing the position of price on the basis of average change in volume during intraday with that of volume attributed to change in price from day open Price to Last price one may decide upon the course of trade.
DISCLAIMER: For educational and entertainment purposes only. Nothing in this content should be interpreted as financial advice or a recommendation to buy or sell any sort of security or investment including all types of crypto.
Kitti-Playbook Request.Volume X Price R0.00Date Jan 31 2023
Objective : To display value of Volume X Last Price for Stock Market and Necessary Symbol information such as Listed Shares , Volume
Calculation :
Volume X Price = Volume X Last Price ( Market Cap )
Liquidity Swings [LuxAlgo]The liquidity swings indicator highlights swing areas with existent trading activity. The number of times price revisited a swing area is highlighted by a zone delimiting the swing areas. Additionally, the accumulated volume within swing areas is highlighted by labels on the chart. An option to filter out swing areas with volume/counts not reaching a user-set threshold is also included.
This indicator by its very nature is not real-time and is meant for descriptive analysis alongside other components of the script. This is normal behavior for scripts detecting pivots as a part of a system and it is important you are aware the pivot labels are not designed to be traded in real-time themselves.
🔶 USAGE
The indicator can be used to highlight significant swing areas, these can be accumulation/distribution zones on lower timeframes and might play a role as future support or resistance.
Swing levels are also highlighted, when a swing level is broken it is displayed as a dashed line. A broken swing high is a bullish indication, while a broken swing low is a bearish indication.
Filtering swing areas by volume allows to only show significant swing areas with an higher degree of liquidity. These swing areas can be wider, highlighting higher volatility, or might have been visited by the price more frequently.
🔶 SETTINGS
Pivot Lookback : Lookback period used for the calculation of pivot points.
Swing Area : Determine how the swing area is calculated, "Wick Extremity" will use the range from price high to the maximum between price close/open in case of a swing high, and the range from price low to the minimum between price close/open in case of a swing low. "Full Range" will use the full candle range as swing area.
Intrabar Precision : Use intrabar data to calculate the accumulated volume within a swing area, this allows obtaining more precise results.
Filter Areas By : Determine how swing areas are filtered out, "Count" will filter out swing areas where price visited the area a number of time inferior to the user set threshold. "Volume" will filter out swing areas where the accumulated volume within the area is inferior to the user set threshold.
🔹 Style
Swing High : Show swing highs.
Swing Low : Show swing lows.
Label Size : Size of the labels on the chart.
Note that swing points are confirmed after Pivot Lookback bars, as such all elements are displayed retrospectively.
[blackcat] L1 Volume DynamicsLevel: 1
Background
Use the difference of Jurik MA and SMA equivalent (ALMA) to observe something new for volume.
Function
Trading volume is an important technical indicator that is not easy to see the law. I try to match the trading volume with the deduction theory, and the deduction double-average theory is matched with the measurement capacity. I will compare the two moving averages of ultra-short-term, short-term, medium-term and long-term. The faster moving average I choose is Jurik MA (JMA), because it is faster than EMA under the same parameters, and the smoothing effect is very good. In addition to the slow moving average, I use ALMA to benchmark SMA. Because the smoothing properties of ALMA are better. A law is used here, that is, the equivalent relationship between ALMA and SMA is approximately a Fibonacci sequence. I can dynamically apply this amount to the Bitcoin market and see some interesting phenomena.
What is double average volume? According to normal circumstances, JMA will follow the transaction volume faster than SMA. The transaction volume is normally rising above the double average volume, and the transaction volume is normally falling below the double average volume. When the SMA follows the trading volume faster than the JMA, it is abnormal (usually occurs in the divergence segment), that is, the JMA is above the SMA, but the trading volume is below the SMA (the bottom divergence volume pile), the top divergence volume pile is the opposite process. The trading volume is between the double average volume, which is the finishing volume energy. It can be used in the breakthrough of the box and the bottom of the pot. By comparing the strength of the current trading volume with the strength of the trading volume on the upper edge of the box or bottom structure, it can improve the success rate of predicting the breakthrough, especially for the observation effect of large funds latent.
Remarks
Feedbacks are appreciated.
VolumeFlowVolume & price have a direct correlation with each other. If the fundamental value changes, the price changes and volume follows. If the technicals change, volume changes and price follows.
Because the relationship between volume and price is so connected, I created a script highlighting important volume flow measurements.
The VolumeFlow indicator combines several volume measurements into 1 indicator.
1) Volume net inflow / outflow
2) Volume total flow change
3) Volume cumulation flow
The VolumeFlow indicator uses a scale from 100 high to -100 low, with the zero level being neutral.
The VolumeFlow indicator has 4 inputs:
1) +Volume-
2) VolumeFast
3) VolumeSlow
4) Accum/Dist
Default inputs:
+Volume-
length = 1, color = + green or - red
VolumeFast
length = 2, color = blue
VolumeSlow
length = 3, color = white
Accum/Dist
length = 5, color = brown
Horizontal lines
length = 100, 50, 0, -50, -100, color = white
* The VolumeFlow indicator uses altered pieces of code from my Options360 FibVIP indicator, Tradingview "Up / down volume" indicator and Tradingview "Accumulation/Distribution" indicator. *
RS: Market ProfileA Market Profile (time price opportunity) implementation with an option to mark a point of control (POC) based on volume.
Config: Hide default candles. Select a session time using exchange timezone. Experiment with tick multiplier value to achieve desired level of detail. Choose the symbols of your choice, e.g. squares or A-Z chars. For multiple sessions you will have to add additional instances of this script with a different time configuration.
Limitations: TradingView has a hard limit for the number of characters (500), if it's reached, label rendering stops. Try increasing tick multiplier value to reduce the number of labels rendered or reduce the window size.
Features:
Use symbols or A-Z chars for TPOs
Mark POC
Calculate Value Area (volume or time based)
Highlight single prints (SP)
Highlight VWAP
Show daily bar
Highlight Open and Close
Highlight current price row (during live market)
Highlight initial balance (IB)
VWAP 3x Session Reset- This VWAP aims to be used with futures and forex.
- The VWAP is reset at the beginning of each session.
- 3 different sessions can be specified.
- The lines are not drawn when there is no active session.
- The upper and lower bands with standard deviation 2 are also drawn.
Info: The time zone of the picture is Europe/Berlin
Open Interest Delta - By LeviathanThis script plots Open Interest Delta (change in OI). It also draws a heatmap and colors chart's candles to help you identify bars with large OI increase or decrease and apply Open Interest analysis concepts to your trading.
Positive OI Delta = net increase in open/unsettled positions
Negative OI Delta = net decrease in open/unsettled positions
Volume Price Balance by serkany88This idea has been in my mind for a while. We all know how important volume is to technical analysis but volume and price itself doesn't mean much when volatility and momentum of the current trend is not taken into account. With this oscillator we try to combine all these factors into one indicator and provide a simplified interpretation of this relationship with spread analysis. This indicator can be used in all timeframes but higher timeframes like 1 hour and above will provide most stable results.
How it works?
This oscillator tries to analyze volume spread along with price spread based on wyckoff methods and attains certain "strength value" for each candle and it's relationship with the volume. After this calculation preferably we remove detected rejection candles from overall calculation and draw them as plots. The multipliers of the strengths can be changed from the settings.
Green Line Above Red Line = Bullish momentum stronger
Red Line Above Green Line = Bearish momentum stronger
Top circles mean possible bullish reversal candle detected. Gray is weak, White is normal and Red top circle means strong possible reversal detected.
Bottom circles mean possible bearish reversal candle detected. Gray is weak, White is normal and Green bottom circle means strong possible reversal detected.
Let's check the example below
As you can see we see a green dot appear in a somewhat weakening bullish momentum, this can mean possible reversal can happen soon and it does.
Below is a bearish example
In this example we see a possible strong reversal signal in a increasing bullish momentum and the price reacts immediately after the candle.
We also have a table that shows the current non-smoothed result of trend strength based on calculated price-volume spread at top right of the oscillator.
[WRx450] FED net liquidityThis indicator show the net liquidity of the FED.
Net Liquidity = FED balance sheet (total asset) - Treasury General Account - Reverse Repo
Net liquidity and Net liquidity changes are shown on wednesday. Total asset and TGA report are on weekly basis, thus a daily basis would be inacurate.
it is possible to add this indicator twice and move one of them in another graphic below and show the change. It gives a clear view of the liquidity.
[WRx450] FED net liquidityThis indicator show the net liquidity of the FED.
Net liquidity = Fed balance sheet (total asset) - Treasury General Account - Reverse Repo
All sources can be select otherwise in parameter.
It is possible to show only the weekly changes in Net liquidity.
Net liquidity and Net liquidity changes are shown only on wednesday because Total asset and TGA reports are updated only on Wednesday. (updating the Net liquidity on a daily basis would be inacurate)
High/Low VolumeIn this indicator, I show you a better way to define high/low values of volume (or any other indicator).
Quite often, I get requests from my clients that an indicator level should be “high” or that it should be above a certain absolute level.
The first request is hard to interpret mathematically, but traders can easily spot it on the chart. The second one is not flexible, and it might not make sense in another market regime.
To solve that, you can compute dynamic high/low levels that represent unexpected extreme values that are adaptable to recent conditions.
There are two pretty simple methods I’m using quite often in my scripts percentiles and sigma (standard deviations).
Percentile looks back at X bars and computes the value under which a certain % of data points are located. So, for example, if we’re computing 90%tile and we’re looking at 100 bars, we’ll get a value under which we have values of precisely 90 bars for this indicator. It’s a good idea to use something like 5%tile for low level and 95%tile for high level.
Sigma(σ) is related to standard deviation. If we assume that our data is normally distributed, then 68% of data points should be in the range of mean +-1σ, 95% → mean +-2σ. So we can assume that something above 2σ is a pretty rare and extreme event.
In this script, I give you an example of how to compute both on volume, but you can easily change this to another indicator.
The issue with volume is that it’s not normally distributed, and your low level will be quite often too low to detect any low levels. Ideally, we have to use a more sophisticated formula that fits volume distribution better.
In this indicator, you can set the following parameters:
Choose type: Percentile or Sigma
Lookback Period
High/Low Percentiles
Sigmas #
You can also receive alerts for high/low volume events.
Disclaimer
Please remember that past performance may not indicate future results.
Due to various factors, including changing market conditions, the strategy may no longer perform as well as in historical backtesting.
This post and the script don’t provide any financial advice.
VWAP Boulevard [vnhilton](OVERVIEW)
The idea of this indicator comes from traders identifying supply to mainly look for shorts. Scenarios would be gap ups or pump & dumps where huge volume is transacted, & bag-holders are present. Some traders would draw resistance lines, I myself used to draw supply zones using the volume profile on that day, & others used the day VWAP on those days. VWAP Boulevard (I believe the name comes from the trader named team3dstocks) draws day VWAP lines from the highest volume days for a given period (excluding the current day).
(FEATURES)
- Draws horizontal & vertical lines from up to 250 highest volume days out of up to 3568 days, with the ability to hide either of these lines, their thicknesses, styles
- Extend/cut horizontal lines, or extend them all the way to the right
- Show the day VWAP, volume & age for these days in labels, with the ability to show what information you want to see only
- Separate customizable color forms for the lines & labels - ordinary (1 color); volume (2 color gradient from lowest to highest volume of the highest volume days); age (2 color gradient from youngest to oldest volume of the highest volume days)
- Edit offset & size of labels, & hide them
- Hide vertical lines
From left to right: Age color; ordinary color; volume color
250 highest volume days in the past year. Very messy so it's very likely you won't be using this but the ability to draw lines from 250 highest volume days is there if needed
(DRAWDOWNS)
- This indicator will only on the daily timeframe (error message will show up if unaware of this, & can be toggled off). Unfortunately, this would mean you would have to draw the lines manually yourself if you wish to use them on intraday timeframes.
- You may also encounter the 'Pine cannot determine the referencing length of a series. Try using max_bars_back' error. This occurs when the lookback period is very high & the indicator attempts to recalculate I believe. If this happens then reload the indicator.
The logic I used to obtain the highest volume days were to put all of the volume days in a given period in 1 array, then to sort them from highest to lowest, & also store their sorted indices in an separate array as well, so that drawings for each volume day could be done from the 2 arrays.
//Volume for last N periods
var int pastVol = array.new_int(lookbackPeriodFixed)
for i = 0 to lookbackPeriodFixed - 1
array.set(pastVol, i, int(volume ))
sortedIndices = array.sort_indices(pastVol, order.descending) //All Indices of sorted volume from highest to lowest
sortedIndices2 = array.slice(sortedIndices, 0, highestVolDays) //Indices of sorted volume from highest to lowest
array.sort(pastVol, order.descending) //All Volume sorted from highest to lowest
pastVol2 = array.slice(pastVol, 0, highestVolDays) //Volume sorted from highest to lowest
//Drawings
for i = 0 to highestVolDays - 1
index := array.get(sortedIndices, i)
vol := array.get(pastVol, i)
Since these array sizes were determined from the lookback period, it would mean that the request.security() function used to obtain daily values on intraday timeframes wouldn't work for a lookback period >20 (20 * 2 values I believe, which are the day VWAP & the day volume) as TradingView has put a maximum amount of calls of 40 in 1 script. Therefore, for intraday plots to work I would have to change the logic for getting the day VWAP & day volume for the highest days, as the request.security() function doesn't work on for loops, & this would also mean that the user would only be able to draw lines from up to 20 highest volume days instead of 250. I couldn't go forward with this as I wasn't able to find the logic to pick the highest volume days & their day VWAPs & times (indexes) without using a for loop. If anyone has any solutions (including for the 'Pine cannot determine the referencing length of a series. Try using max_bars_back' error) then please let me know. I've also left commented-out code for dealing with intraday drawings for future use.
Strategy Myth-Busting #7 - MACDBB+SSL+VSF - [MYN]This is part of a new series we are calling "Strategy Myth-Busting" where we take open public manual trading strategies and automate them. The goal is to not only validate the authenticity of the claims but to provide an automated version for traders who wish to trade autonomously.
Our seventh one we are automating is the "Magic MACD Indicator: Crazy Accurate Scalping Trading Strategy ( 74% Win Rate )" strategy from "TradeIQ" who claims to have backtested this manually and achieved 427% profit with a 74% winrate over 100 trades in just a 4 months. I was unable to emulate these results consistently accommodating for slippage and commission but even so the results and especially the high win-rate and low markdown is pretty impressive and quite respectable.
This strategy uses a combination of 3 open-source public indicators:
AK MACD BB v 1.00 by Algokid
SSL Hybrid by Mihkel00
Volume Strength Finder by Saravanan_Ragavan
This is considered a trend following Strategy. AK MACD BB is being used as the primary short term trend direction indicator with an interesting approach of using Bollinger Bands to define an upper and lower range and upon the MACD going above the upper Bollinger Bands, it's indicative of an up trend, where as if the MACD is below the lower Bollinger Band, it's indicative of a down trend. To eliminate false signals, SSL Hyrbid is used as a trend confirmation filter, confirming and eliminating false signals from the MACD BB. It does this by validating the price action is above the the EMA and the SSL is positive that is a confirmation of an uptrend. When the price action is below the EMA and the SSL is negative, that is an confirmation of a downtrend. To avoid taking trades during ranged markets, VSF Buyer's Strength is used so the buyers/sellers strength and must be above 50% or the trade will not be inititiated.
Trading Rules
5 min candles but other lower time frames even below 5m work quite well too.
Best results can be found by tweaking these 2 input parameters:
Number Of bars to look back to ensure MACD isn't above/below Zero Line
Number Of bars back to look for SSL pullback
Long Entry when these conditions are true
AK MACD BB BB issues a new continuation long signal. A new green circle must appear on the indicator and these circles should not be touching across the zero level while they were previously red
SSL Hybrid price action closes above the EMA and the line is blue color and then creates a pullback . The pullback is confirmed when the color changes from blue to gray or from blue to red.
VSF Buyers strength above 50% at the time the MACD indicator issues a new long signal.
Short Entry when these conditions are true
AK MACD BB issues a new continuation short signal. A new red circle must appear on the indicator and these circles should not be touching across the zero level while they were previously green
SSL Hybrid price action closes below the EMA and the line is red color then it has to create a pullback . The pullback is confirmed when the color changes from red to gray or from red to blue.
VSF Sellers strength above 50% at the time the MACD indicator issues a new short signal.
Stop Loss at EMA Line with TP Target 1.5x the risk
If you know of or have a strategy you want to see myth-busted or just have an idea for one, please feel free to message me.
Volume With ColorVolume with color helps to quickly identify accumulation or distribution.
An accumulation day is an up day with volume greater than a user selected average.
A distribution day is a down day with volume greater than a user selected average.
This indicator will highlight those days by changing the volume bar colors for an easy visual.
Click VWAP Anchored with Standard Devation BandsSimply use it by clicking on your chart on the places you find important to determine whether you entries or exits look strong or weak.
[potatoshop] Volume Profile lower timeframeThis script is a volume profile that displays the volume of transactions in price blocks over a recent period of time.
For a more detailed representation, OHCLV values on the time frame lower than the time zone on the chart were called and expressed.
Low time frames are adjustable.
You can adjust the number of blocks and the most recent time period that you want to view.
Although it cannot be compared to the volume indicators provided for paid users of Trading-View, it has functioned by displaying transactions that are difficult to find on open source.
Displays the amount traded in each block and the percentage of the total over a given period.
POC represents the middle value of the block with the highest transaction volume as a line.
TPOC represents the block that stayed the longest regardless of the volume of transaction.
The reversal line appears when you determine the trading advantage of the rising and falling closing on a block basis and then have a different value from the neighboring blocks.
(I didn't mean it much, but I just put it in for fun.)
It represents the total volume of transactions traded in each block, and there are also check boxes in the settings window that represent the volume of transactions that closed higher and closed lower.
You can specify the color of each block.
The highest and lowest values for the set period and the total sum of each block are displayed at the bottom of the box.
Because it was made using a lot of arrays, the total transaction volume was marked separately to check the value.
When expressing the price block according to the trading volume percentage, it was a pity that the minimum pixel was 1 bar, so it could not be expressed delicately.
Although set to bar_time in Box properties xloc, 1 bar was actually the minimum unit of the X-axis value.
The logic used to place the transaction volume for each block is as follows.
1. Divide the difference between the high and low values of 1 LTF bar by the transaction volume .
2. Find the percentage of this LTF bar within each block.
3. Multiply the ratio by the transaction volume again.
4. Store the value in each block cell.
Below are the codes of the people I referred to this time.
1. ‘Time & volume point of control (TPOC & VPOC)’ by quantifytools
2. ‘Volume Profile ’ by LuxAlgo
3. ‘Volume Profile and Volume Indicator by DGT’ by dgtrd
The script is for informational and educational purposes only.
이 스크립트는 최근 일정 기간동안의 거래량을 가격 블록단위로 표시해 주는 볼륨 프로화일입니다.
좀 더 자세한 표현을 위해 차트상의 시간대보다 낮은 시간 프레임상의 OHCLV 값들을 호출하여 표현하였습니다.
낮은 시간 프레임은 조절 가능합니다..
보고 싶은 최근 일정 기간과 블럭 갯수를 조절할 수 있습니다.
트뷰 유료 사용자들을 위해 제공하는 지표와는 비교할 수는 없지만, 오픈 소스상에서는 찾기 힘든 거래량을 표시해 기능을 넣었습니다.
각 블럭에서 거래되었던 양 과 주어진 기간 동안의 총량 대비 퍼센트를 표시해 줍니다.
POC는 거래량이 가장 많았던 블럭의 중간값을 라인으로 표현해 줍니다.
TPOC는 거래량에 상관없이 가장 오랜 시간 머물렸던 블럭을 표현해 줍니다.
반전선은 블럭 단위로 상승 마감과 하락 마감의 거래량 우세를 결정한 뒤, 이웃 블럭들하고 다른 값을 가질 때 나타납니다.
(어떤 뜻을 갖고 만든 건 아니고 그냥 재미로 넣어 보았습니다.)
각 블럭에서 거래되었던 총거래량을 표현해 주며, 또한 설정창에서 상승 마감한 거래량과 하락 마감한 거래량을 표현하는 체크 박스가 있습니다.
각 블럭의 색깔을 지정하실 수 있습니다.
설정된 기간 동안의 최고값과 최저값, 각 블럭을 합친 총량을 박스 하단에 표시해 두었습니다.
어레이를 많이 사용하여 만들었기 때문에 값의 확인을 위해 전체 거래량을 따로 표시하였습니다.
가격 블럭을 거래량 퍼센트에 따라 표현할 때, 최소 픽셀이 1bar 이어서 섬세하게 표현 할 수 없어 안타까웠습니다.
박스 속성을 xloc.bar_time 로 설정하였지만 실제로는 1 bar가 X축 값의 최소 단위였습니다.
각 블록 별로 거래량을 배치 할 때 쓰인 로직은 다음과 같습니다.
1. 1 LTF bar의 하이 와 로우 값의 차이를 거래량으로 나누어 줍니다.
2. 각 블록 안에서 이 LTF bar가 차지 하는 비율을 구합니다.
3. 그 비율에 다시 거래량을 곱해 줍니다.
4. 그 값을 각 블록 셀에 저장해 줍니다.
밑에 제가 이번에 참고한 분들의 코드들입니다.
1. ‘Time & volume point of control (TPOC & VPOC)’ by quantifytools
2. ‘Volume Profile ’ by LuxAlgo
3. ‘Volume Profile and Volume Indicator by DGT’ by dgtrd