Support Board
Date/Time: Fri, 31 Jan 2025 13:38:33 +0000
Post From: Special colored volume bars
[2017-10-16 06:11:28] |
brown555 - Posts: 35 |
Thank you for pointing me in the right direction. However, upon reading the related material I was unable to find amongst the documentation an example of, or instructions for, creating an alert condition which involves coloring a bar based on what the values of the previous x number of bars are, e.g. "= V > previous x bars" where x is the # of bars to use in the calculation (I presume this would be the Input Value 'Number of Bars to Calculate') and where bars is volume bars. So since the number of bars to use to calculate this would be one of the inputs, what would the format of the Alert Condition formula be? ___________________________________________________________________________________________________________________________________________________________________________________________________________ If it helps, I'm trying to re-create an indicator I found on TradingView, coded by user 'marketsurvivalist' like so: // // @author MarketSurvivalist // This indicator is based on the ideas written about by Vincent Kott in his book Volume Spike Analysis // (http://www.amazon.com/Volume-Spike-Analysis-Includes-indicators-ebook/dp/B00F87ZMK8) // study("Volume Spike Analysis [marketsurvivalist]", shorttitle="VSA_MS") shortLookback=input(4) mediumLookback=input(20) longLookback=input(100) showMA=input(true) lengthMA=input(60) v2 = volume highestShort = highest(volume, shortLookback) highestMedium = highest(volume, mediumLookback) highestLong = highest(volume, longLookback) c = iff(highestLong == v2, blue, iff(highestMedium == v2, purple, iff(highestShort == v2, red, white))) plot(v2, style=columns, color=c) plot(showMA?sma(v2, lengthMA):na, color=aqua) |