OPEN-SOURCE SCRIPT

Center of gravity - Mid Point + Volume (PolySlyme)

Updated
I created an indicator which suits my scalping needs.

First it calculates the mid point of every candle, then it calculates where the closing price is in the candle and converts that to a percentage from the mid point. Then it looks at volume and calculates the difference (Positive/negative) from the previous volume bar and converts that to a percentage. These 2 factors are summed together to give a percentage number (positive or negative) then highlights the positive value. Bullish volume and price action turn to gold.

I use this for scalping to great effect. Enjoy.
Release Notes
I've updated the script so that the difference value is plotted above the bar high. Useful for making a quick assessment of the power of the move.
Release Notes
Now there is a new way to set a threshold and add a custom color. You can also set the threshold amount which is calculated based on the difference in values from the previous bar. hopefully this makes it obvious to see price and volume working together.
Release Notes
And finally, An alert has been added so when the wick exceeds 66% of the bar and the threshold has been exceeded an alert is triggered.
Release Notes
There was an issue with the alerts so i have removed them for now. However the script has been updated with more confirmation. Now you have the option to scan a higher timeframe and check if the lows have been taken out. This will change the bar color as long at the threshold for price action has been met (price above the center of gravity + increasing volume). You can manually set how many lows of previous bars it takes out and the timeframe manually. More updates will be coming.
Release Notes
Alert re-added. Triggered on 2 conditions. 1) The consecutive lows taken out as defined in the settings. 2) Exceeding the price action threshold value in settings to confirm price+volume.
Release Notes
Code fix.
Release Notes
You can now set a separate color for negative price action. This happens when the volume is increasing and the price is below the center of gravity (midpoint of the bar). The bars change color when the previous conditions are met + the lows defined in settings have also been met on the timeframe you set.
Release Notes
We now have the option to set custom values to scan the higher timeframes and check if the consecutive highs or lows have been taken out. Then it changes the color of the bar when the defined threshold has been exceeded. The Alert has been updated.
Release Notes
Code fixed + New options to color the high bars and low bars. Option to turn them on or off.
Release Notes
The script has been updated again! I have included RSI bar colors with custom settings. Now you have real-time Price+Volume+RSI to help you on your trading journey. The key to this is finding a threshold that matches the chart and tweaking those values to suit. You can set alerts for when the lows or highs are taken out on liquidity grabs and look to enter when the threshold is increasing and price is moving in your direction.
Release Notes
Small code changes
Trend AnalysisVolume

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer