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. *
Volume
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
Volume Weighted Standard Deviation (VWSD)The Volume Weighted Standard Deviation indicator is a custom technical analysis tool that uses the volume of trading to calculate the standard deviation of a stock's price. This indicator takes the source of data, the length of data, and the deviation as inputs, and calculates the volume weighted standard deviation using the values.
The indicator first calculates the mean price and mean volume by using simple moving average over the given length of data. Then it calculates the squared difference between the mean price and the actual price, multiplied by the volume. This gives a volume-weighted squared difference. The indicator then calculates the square root of the sum of the volume-weighted squared differences divided by the sum of the volumes over the given length of data. This gives the volume weighted standard deviation.
The indicator then plots the standard deviation and deviation as a band around the simple moving average of the source data, providing a clear view of the volatility of the stock.
In summary, the Volume Weighted Standard Deviation indicator is a powerful tool for measuring the volatility of a stock by taking into account the volume of trading. It uses the volume of trading to calculate the standard deviation of a stock's price, giving a more accurate representation of the volatility of the stock. It can be useful for traders to identify entry and exit points and make more informed trading decisions.
Power Indicator - EMAs + VWAP + Volume BarThe Power Indicator is intended to return some exponential moving average, vwap, volume bar, and others. With this compilation, you will be able to use them as one indicator in Trading View.
The components are:
- EMA9 - Exponential Moving Average of 9 days
- EMA21 - Exponential Moving Average of 21 days
- EMA50 - Exponential Moving Average of 50 days
- EMA200 - Exponential Moving Average of 200 days
- Volume Bar - This indicator provides the volume of the candle and its strength by showing different colors. It's a way to check expressive volume in one bar.
- Vwap line
- Indicator
If you have any questions, let me know!
Custom_AVWAP_Harpal's-AnchorsAutomated VWAP Indicator written in PineScript for TradingView charts. Automatically Anchored at key swing H/L levels extracted from price and volume time-series.
Indicator takes one Argument, "LookBack (# of Periods)", and then for a given security finds three key anchors, the highest and lowest values in the 'hlc3' column (average of high low and close on the daily timeframe) in the last 'LookBack' # of days. The script displays up to three color coded time-series corresponding to a trailing Volume Weighted Average Price beginning at the anchor dates corresponding to the anchor points listed above.
BTC Net Volume (Spot) (by JaggedSoft, fixed by SLN)• WHAT:
This indicator plots the aggregated net volume delta of BTC spot pairs from 8 exchanges over the last 60 periods (default settings).
Tracks the following pairs:
"BINANCE:BTCUSDT"
"BITFINEX:BTCUSD"
"POLONIEX:BTCUSDT"
"BITTREX:BTCUSDT"
"COINBASE:BTCUSD"
"BITSTAMP:BTCUSD"
"KRAKEN:XBTUSD"
"BITGET:BTCUSDT"
"GEMINI:BTCUSD"
• HOW TO USE:
Used for confirmation when watching futures that can experience quick movements in the form of liquidation-events. If the oscillator is green or trending upward, it's confirming a positive bias. The inverse is true for a negative bias. This is especially true on higher timeframes.
Can also be used to find correlations between different tech-assets.
• NOTES:
I forked JaggedSofts indicator to fix the data-source error it was having. Let me know if you want to customize exchanges or add more pairs, maybe I can add that in the future!
This indicator replaces the outdated alternative linked here : Please only use this one
• LIMITATIONS:
Only tested with normal japanese candlesticks .
• THANKS:
to the creator of this script, JaggedSoft. It's a great indicator!
• DISCLAIMER:
Not financial Advice, use at your own risk.
Money Flow IntensityThis indicator works very similarly to Elder's Force Index (EFI) and builds on top of what I have for the Money Flow Line (see my other scripts). It combines price movements with volume to create sort of "dollar flow" pressure up and down, looking for "smart money" ("big money") to make their move.
The indicator uses a lookback period to calculate a standard deviation of the movement intensity, then creates gradients to visualize how intense the movement is relative to other movements. This helps measure the pull away from the average more easily than with the Money Flow Line alone.
Much like with EFI, high intensity moves can indicate two things:
1. Strength and conviction in the current direction OR...
2. A reversal is coming soon
You can also watch for waning volume in the current direction, indicating that a trend is losing interest and may be due for a pullback.
There is no way to know, but combining this with price action and a trend indicator can help give you some good educated guesses about what could happen next. Combine with averaging in or out and managing risk appropriately. Good luck :)
Dollar Cost VolumeWhen asset prices rise or fall greatly it can be difficult to measure the interest levels across time periods. Think of assets like BBBY, GME, CVNA, BTCUSD, etc... :)
This simple visualization multiplies a pricing option by the volume to give a "dollar cost" volume over time. With this, you can more easily measure interest levels from "smart money" ("big money") and eliminate some of the noise from large volume moves when prices are very low (or small volume moves when prices are very high).
Aggregated Volume Profile Spot & Futures ⚉ OVERVIEW ⚉
Aggregate Volume Profile - Shows the Volume Profile from 9 exchanges. Works on almost all CRYPTO Tickers!
You can enter your own desired exchanges, on/off any others, as well as select the sources of SPOT, FUTURES and others.
The script also includes several input parameters that allow the user to control which exchanges and currencies are included in the aggregated data.
The user can also choose how volume is displayed (in assets, U.S. dollars or euros) and how it is calculated (sum, average, median, or dispersion).
WARNING Indicator is for CRYPTO ONLY.
______________________
⚉ SETTINGS ⚉
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Data Type — Choose Single or Aggregated data.
• Single — Show only current Volume.
• Aggregated — Show Aggregated Volume.
Volume By — You can also select how the volume is displayed.
• COIN — Volume in Actives.
• USD — Volume in United Stated Dollar.
• EUR — Volume in European Union.
• RUB — Volume in Russian Ruble.
Calculate By — Choose how Aggregated Volume it is calculated.
• SUM — This displays the total volume from all sources.
• AVG — This displays the average price of the volume from all sources.
• MEDIAN — This displays the median volume from all sources.
• VARIANCE — This displays the variance of the volume from all sources.
• Delta Type — Select the Volume Profile type.
• Bullish — Shows the volume of buyers.
• Bearish — Shows the volume of sellers.
• Both — Shows the total volume of buyers and sellers.
Additional features
The remaining functions are responsible for the visual part of the Volume Profile and are intuitive and I recommend that you familiarize yourself with them simply by using them.
________________
⚉ NOTES ⚉
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
If you have any ideas what to add to my work to add more sources or make calculations cooler, suggest in DM .
Also I recommend exploring and trying out my similar work.
Volume-Weighted Price Levels (VWPL)Introduction:
In this script, we will be creating an indicator that plots horizontal lines on the chart for each unique price in a given range, and colors them based on the volume of that price.
Explanation:
First, we define the input "Length" as an integer. This will determine the number of bars back from the current bar to include in the range.
We then create two arrays: "price" and "vol." The "price" array will store all the unique prices in the given range, and the "vol" array will store the corresponding volumes for those prices.
Using a for loop, we iterate through the range of bars and check if the current close price is already included in the "price" array. If it is not, we add it to the array and also add the corresponding volume to the "vol" array. If it is already included, we find the index of that price in the "price" array and add the current volume to the volume stored at that index in the "vol" array.
After the for loop, we find the maximum volume in the "vol" array and use that to find the corresponding price in the "price" array. This will be the price at which we draw the horizontal line.
We then create an array of lines called "lines" and, using another for loop, we iterate through the "price" array and add a line to the "lines" array for each price. The color of each line is determined by the volume of that price, using a color gradient from blue (lowest volume) to red (highest volume).
Finally, we use an if statement to check if the current bar is the last bar in the chart, and if it is, we use another for loop to iterate through the "lines" array and delete all the lines. This is to prevent the lines from being carried over to the next bar and potentially being plotted multiple times.
Conclusion:
This script can be useful for visualizing the price levels with the highest volume in a given range, as well as seeing how volume is distributed among different price levels. It can be helpful for identifying areas of significant buying or selling pressure.
(mab) Volume IndexThis script implements the (mab) Volume Index (MVI) which is a volume momentum oscillator. The formula is similar to the formula of RSI but uses volume instead of price. The price is calculated as the average of open, high, low and close prices and is used to determine if the volume is counted as up-volume or down-volume.
I created MVI to replace OBV on my charts, because OBV is not as simple to read and find e.g. divergences. MVI is much easier to read because it is an oscillator with a minimum value of 0 and a maximum value of 100. It's easy to find divergences too. I like to display MVI over the volume bars. However, you can display it in a separate pain as well.
(mab) Money Flow - MMFThis indicator implements the (mab) Money Flow (MMF). The MMF is calculated using a formula inspired by RSI. In contrast to RSI, MMF uses the average of open, high, low and close as price source. This price is then multiplied with the volume as input for the RSI like formula to calculate the value.
Features:
- Volume weighted price momentum oscillator
- Uses average of open, close, high and low as price component to make the signal less choppy while still as fast
- EMA on MMF
- Highlighting when EMA is in oversold or overbought area
- Alarms
Note that the MMF formula is different than the formula used for other money flow indices like MFI or CMF.
Why do we need another money flow indicator if there are already many established ones? Well I used and tested many money flow indicators including MFI and CMF among others. However, none of them showed the results I was looking for. MFI for example uses a simpler formula for the calculation, which results in a different reading that isn't showing divergences as clearly as I would like. CMF on the other hand has no defined maximum or minimum (similar to MACD) so that it's difficult to determine overbought and oversold values. The MMF is an oscillator with a minimum value of 0 and a maximum value of 100 like RSI. The usage of the average of open, close, high and low as price element makes it less choppy compared to RSI while it still reacts as fast to movements.