Code:
##########
##########
## Price Average Zones Indicator by Ramonimous
## https://www.tradingview.com/v/7CQCUk3t/
##########
input hma_period = 50;
def hma1 = HullMovingAvg(low, hma_period);
def hma2 = HullMovingAvg(high, hma_period);
def h50 = highest(high, 50);
def l50 = lowest(low, 50);
def h80 = highest(high, 80);
def l80 = lowest(low, 80);
def have = (h50 + h80)/2;
def lave = (l50 + l80)/2;
def aave = (have + lave)/2;
def avrg = SimpleMovingAvg(aave, 10);
##Plot
plot shorts1 = hma1;
shorts1.setDefaultColor(GetColor(5));
plot hhma1 = hma2;
hhma1.setDefaultColor(GetColor(6));
plot lhma1 = lave;
lhma1.setDefaultColor(GetColor(5));
plot longs1 = have;
longs1.setDefaultColor(GetColor(6));
plot avrgplot = avrg;
avrgplot.SetStyle(Curve.POINTS) ;
##Add Cloud
AddCloud(shorts1, lhma1, Color.LIGHT_ORANGE, Color.LIGHT_ORANGE, no);
AddCloud(longs1, hhma1, Color.LIGHT_GREEN, Color.LIGHT_GREEN, no);
Last edited: