Horizontal VolumePlot the last length volume observations horizontally on the price graph by using rescaling, with a position relative to the price highest, lowest, or moving average. Note that the indicator is subject to repainting.
Settings
Length: Determine the number of histogram bars to be plotted
Src: Determine the scale of the indicator
Relative Position: Determine how the bars are plotted
Unicolor: If TRUE, the histogram bars will have the same color, else the color is a gradient.
Details
The relative position setting determines how the histogram bars are plotted, by default "Lowest", this set the base of the plot at the lowest src value over length periods.
If "Highest" is selected, the base become the highest src value over length periods.
Finally "Moving Average" set the base value equal to the price moving average with period length , however this mod work differently, as it allows the bars to have a "negative" value.
Negative bars indicates that the volume at that precise point is lower than the mean of the last length volume observations.
The gradient tells you how close the volume is to the maximum value of the last length volume observations, with bluer colors indicating a volume closer to its maximum value.
Usage
The indicator gives you information on the volume, but you can use it more creatively since it can be really close to the price. For example, you can make support and resistances from the indicator:
Here we make a resistance from the highest bars displayed by the indicator. If you have other ideas feel free to share.
Summary
Rescaling is nice, and line.new allows you to plot pretty much everything you want, in the order you want, this is how this script was achieved.
Neko emojis are cutes, if you see one, try including it to your scripts, don't overdo it tho, as they can be quite intrusive. They won't mess up with your code as long as you give them a //
Rescaling
Price/Volume Normalized OscillatorIt can be interesting to have an indicator displaying two rescaled measures, thus ending with an indicator that allow the creation of more complex trading rules (conditions), this is what is intended with the price/volume normalized oscillator (PVNO) who normalize both volume and price in order to display them together.
Volume is considered an important factor as it show the trading activity of a security, securities with higher volume are more attractive to trade as higher volume is in general present with larger price variations, higher volume can also indicate a better trade execution.
THE INDICATOR
In the PVNO, the rescaled volume is represented by the blue plot while the rescaled price is represented by the (green/red) plot. The rescaling method used here is simply based on the sum of the current and past momentum output of a series of observations divided by the sum of the current and past absolute value of this momentum, this allow to have a smooth output with values reaching 1 and -1 instead of converging toward 0.
The indicator has two settings, Volume Length who control the length of the sum of the rescaled volume, while Price Length control the sum length of the rescaled price. When the rescaled volume is positive it means that the sum of the current and past Volume Length - 1 positive volume momentum values is greater than the sum of negative ones, this indicate a more active market. The same apply to the rescaled price, with a positive rescaled price value indicating an uptrend and negative values indicating a downtrend.
Because of the stationary and periodic nature of volume, low values for Volume Length are recommended.
INTERPRETATIONS AND USAGES
As you can see the rescaled price plot can have two colors, and the area between the rescaled volume and price plot is filled with two possible colors as well, the color depend on the following simple condition:
green: once rescaled price > 0 and rescaled volume > 0 until condition for red don't happen
red: once rescaled price < 0 and rescaled volume > 0 until condition for green don't happen
Therefore no signals are triggered if the rescaled price is greater/lower then 0 but the rescaled volume is lower than 0, this could allow to filter various false signals (at the cost of reactivity). A more interesting use-case of the indicator can be based on the upper and lower constant levels displayed in order to spot points where volume will fall or rise.
Volume can also be used to spot potential reversals, therefore the levels can also be used to this end as well.
SUMMARY
A normalized oscillator plotting rescaled price and volume values has been presented, the indicator posses its own trading rules but can easily modified. This is not an indicator i'am super proud of, even after passing some time on it lol. You can use the code freely without asking for permission, mention is appreciated.
Next indicators should be more pertinent and interesting, thanks for reading !
%G OscillatorIntroduction
Rescaling often involve bringing a series of values in a certain range, there have been many rescaling methods proposed in technical analysis such as the stochastic oscillator, relative strength index or the William %R to name a few. Rescaling the price allow the user to see when the security is overbought or oversold, in the case of the stochastic oscillator it can also determine the price position relative to the highest and lowest price over a user defined period window.
Computing highest and lowest over a certain period window involve calculating what is called a rolling maximum/minimum, those calculations have tried to be efficient but they can still remain relatively complex. This is why i propose a similar rescaling indicator that don't use rolling maximum/minimum for its calculation, the indicator can be interpreted like the stochastic oscillator since they are similar.
The Indicator
The indicator is based on the current price position relative to past observations, for example, if the indicator is equal to 80, this mean that the current price is greater than 80% of the k past observations, where k = 1, 2, 3...length .
The indicator offer many benefits such as a custom rescaling range, unlike the stochastic oscillator this step is directly integrated in the core calculations of the indicator, this can be done by changing the code in line 7 :
a = src > src ? Max : Min
where Max should be the maximum value of the indicator and Min the minimum value, therefore the indicator would lay in a range of (Max,Min).
here the indicator is in a range of (5,2), this mean that :
a = src > src ? 5 : 2
Conclusion
I proposed an alternative to the stochastic oscillator. Both indicators return similar results, advantages of the proposed indicators are its simple calculation and its ability to return custom ranges. I hope it find its use in the community.
Thanks for reading !
Volume Flow v3 (Rescaled Update)This is a rescaled version of the script (www.tradingview.com...) by oh92. Rescaling allows to represent data in a more contrastive way. All thanks, bells and whistles are to be attributed to the author.))
Karobein OscillatorDeveloped by Emily Karobein, the Karobein oscillator is an oscillator that aim to rescale smoothed values with more reactivity in a range of (0,1)
Calculation
The scaling method is similar to the one used in a kalman filter for the kalman gain.
We first average the up/downs x, those calculations are similar to the ones used for calculating the average gain/loss in the relative strength index.
a = ema(src < src ? x : 0,length)
b = ema(src > src ? x : 0,length)
where src is a exponential moving average of length period and x is src/src in the standard calculations, but anything else can be used as long as x > 0 .
Then we rescale the results.
c = x/(x + b)
d = 2*(x/(x + c*a)) - 1
How To Use
It is better to use centerline-cross/breakouts/signal line.
In general when we use something smooth as input in oscillators, breakouts are better than reversals, you can see this with the stochastic and rsi.
So a simple approach could be buying when crossing over 0.8 and selling when crossing under 0.2.
Here is the balance of a strategy using those conditions, length = 50 .
20 trades have been mades since the 29 oct we made 341 pips with eur/usd, of course this backtest was made during good trends period,
this result is not representative of how the strategy work with other conditions/markets.
For any questions/suggestions feel free to contact me