Hello ,
I'm trying to create a normalized (no negative values) version of the volume zone oscillator's exponential moving average. I mushed together some normalizing code with the indicator, and I get no errors but the values are still negative. Since I have tried several times I think I will just ask your input. If you know of any similar indicators that would be great. So far this one seems to have a good personality when it interacts with fractal energy and the laguerre RSI, but the indicator is too erratic by itself.
I'd like to build a scan that can be run as a lower study, but the values don't fit for a "crossover" if they're not normalized - am I right? I am also not sure they will scale properly if you zoom in and have them laid on top of each other.
If there's any way to easily add it (and its movavgexp) to the "Laguerre time", I wonder what that would look like.
In the end I hope to have Laguerre RSI, Fractal Energy, Volume Zone Oscillator, and the Volume Zone Oscillator MovAvgExp on the same lower study, which I can run / write a crossover scan for it. I'm not sure if they all need to be on the same study to work properly for these different uses.
I'm trying to create a normalized (no negative values) version of the volume zone oscillator's exponential moving average. I mushed together some normalizing code with the indicator, and I get no errors but the values are still negative. Since I have tried several times I think I will just ask your input. If you know of any similar indicators that would be great. So far this one seems to have a good personality when it interacts with fractal energy and the laguerre RSI, but the indicator is too erratic by itself.
I'd like to build a scan that can be run as a lower study, but the values don't fit for a "crossover" if they're not normalized - am I right? I am also not sure they will scale properly if you zoom in and have them laid on top of each other.
If there's any way to easily add it (and its movavgexp) to the "Laguerre time", I wonder what that would look like.
In the end I hope to have Laguerre RSI, Fractal Energy, Volume Zone Oscillator, and the Volume Zone Oscillator MovAvgExp on the same lower study, which I can run / write a crossover scan for it. I'm not sure if they all need to be on the same study to work properly for these different uses.
Code:
declare lower;
input length = 14;
script normalizePlot {
input data = close;
input newRngMin = -1;
input newRngMax = 1;
def hhData = HighestAll( data );
def llData = LowestAll( data );
plot nr = ((( newRngMax - newRngMin ) * ( data - llData )) / ( hhData - llData )) + newRngMin;
}
script VZOScr {
input Length = 13;
def VP = ExpAverage(Sign(close - close[1]) * volume, length);
def TV = ExpAverage(volume, length);
plot VZO = 100 * VP / TV;
}
plot VZOX = normalizePlot(VZOScr("Length" = Length), -100, 100);
Last edited: