YungTrader's Relative Volume

YungTraderFromMontana

Well-known member
I haven't contributed anything to the community in the while and some of you guys gave me so much, so I'm deciding to share my relative volume study. As of now it will only work on a 1hr chart, although if any of you are willing you could make adaptations for other chart settings. What sets my version apart is that it makes each hour of the day a separate variable, which eliminates biases like market open and market close bias. It also makes extended hour volumes much better to understand.

aqpdcJj.png


Pink is normal volume, blue is my updated relative volume.

Enjoy.

Code:
input averageType4 = AverageType.WILDERS;

input nightSessionFromMidnight = 0100;
input firstHourTrading = 0850;
input mainSession = 0959;
input nightSessionFromMainSessionEnd = 1559;
input paintBars = yes;

def clause1 = SecondsFromTime(0359) >= 0 and SecondsFromTime(0459) <= 0;
def clause2 = SecondsFromTime(0459) >= 0 and  SecondsFromTime(0559) <= 0;
def clause3 = (SecondsFromTime(0559) >= 0 and  SecondsFromTime(0659) <= 0);
def clause4 = (SecondsFromTime(0659) >= 0 and SecondsFromTime(0759) <= 0);
def clause5 = SecondsFromTime(0759) >= 0 and SecondsFromTime(0859) <= 0;
def clause6 = SecondsFromTime(0859) >= 0 and  SecondsFromTime(0959) <= 0;
def clause7 = (SecondsFromTime(0959) >= 0 and  SecondsFromTime(1059) <= 0);
def clause8 = (SecondsFromTime(1059) >= 0 and SecondsFromTime(1159) <= 0);
def clause9 = SecondsFromTime(1159) >= 0 and SecondsFromTime(1259) <= 0;
def clause10 = SecondsFromTime(1259) >= 0 and  SecondsFromTime(1359) <= 0;
def clause11 = (SecondsFromTime(1359) >= 0 and  SecondsFromTime(1459) <= 0);
def clause12 = (SecondsFromTime(1459) >= 0 and SecondsFromTime(1559) <= 0);
def clause13 = (SecondsFromTime(1559) >= 0 and SecondsFromTime(1659) <= 0);
def clause14 = SecondsFromTime(1659) >= 0 and SecondsFromTime(1759) <= 0;
def clause15 = SecondsFromTime(1759) >= 0 and  SecondsFromTime(1859) <= 0;
def clause16 = (SecondsFromTime(1859) >= 0 and  SecondsFromTime(1959) <= 0);

def isNightSessionFromMidnight = SecondsFromTime(nightSessionFromMidnight) >= 0 and SecondsTillTime(firstHourTrading) > 0;
def isFirstHourTrading = SecondsFromTime(firstHourTrading) >= 0 and SecondsTillTime(mainSession) > 0;
def isMainSession = SecondsFromTime(mainSession) >= 0 and SecondsTillTime(nightSessionFromMainSessionEnd) > 0;
def ah = SecondsFromTime(1659) > 0;
def newNightSessionFromMidnight = isNightSessionFromMidnight and !isNightSessionFromMidnight[1];
def cOvernightVolume = if newNightSessionFromMidnight then volume else if isNightSessionFromMidnight then cOvernightVolume[1] + volume else cOvernightVolume[1];





def AVL1 = 60;
def AVL2 = 120;
def AVL3 = 250;
def AVL4 = 400;
def AVL5 = 600;
def AVL6 = 1500;


input VolAverageType = AverageType.WILDERS;

# Selling Volume

def Vol1 = if clause1 then volume * close else 0;
def Vol2 = if clause2 then volume * close else 0;
def Vol3 = if clause3 then volume * close else 0;
def Vol4 = if clause4 then volume * close else 0;
def Vol5 = if clause5 then volume * close else 0;
def Vol6 = if clause6 then volume * close else 0;
def Vol7 = if clause7 then volume * close else 0;
def Vol8 = if clause8 then volume * close else 0;
def Vol9 = if clause9 then volume * close else 0;
def Vol10 = if clause10 then volume * close else 0;
def Vol11 = if clause11 then volume * close else 0;
def Vol12 = if clause12 then volume * close else 0;
def Vol13 = if clause13 then volume * close else 0;
def Vol14 = if clause14 then volume * close else 0;
def Vol15 = if clause15 then volume * close else 0;
def Vol16 = if clause16 then volume * close else 0;


def VolAvg1 = MovingAverage(VolAverageType, Vol1, AVL1);
def VolAvg2 = MovingAverage(VolAverageType, Vol1, AVL2);
def VolAvg3 = MovingAverage(VolAverageType, Vol1,  AVL3);
def VolAvg4 = MovingAverage(VolAverageType, Vol1,  AVL4);
def VolAvg5 = MovingAverage(VolAverageType, Vol1,  AVL5);
def VolAvg6 = MovingAverage(VolAverageType, Vol1,  AVL6);
def VolAvg12 = MovingAverage(VolAverageType, Vol2, AVL1);
def VolAvg22 = MovingAverage(VolAverageType, Vol2, AVL2);
def VolAvg32 = MovingAverage(VolAverageType, Vol2,  AVL3);
def VolAvg42 = MovingAverage(VolAverageType, Vol2,  AVL4);
def VolAvg52 = MovingAverage(VolAverageType, Vol2,  AVL5);
def VolAvg62 = MovingAverage(VolAverageType, Vol2,  AVL6);
def VolAvg13 = MovingAverage(VolAverageType, Vol3, AVL1);
def VolAvg23 = MovingAverage(VolAverageType, Vol3, AVL2);
def VolAvg33 = MovingAverage(VolAverageType, Vol3,  AVL3);
def VolAvg43 = MovingAverage(VolAverageType, Vol3,  AVL4);
def VolAvg53 = MovingAverage(VolAverageType, Vol3,  AVL5);
def VolAvg63 = MovingAverage(VolAverageType, Vol3,  AVL6);
def VolAvg14 = MovingAverage(VolAverageType, Vol4, AVL1);
def VolAvg24 = MovingAverage(VolAverageType, Vol4, AVL2);
def VolAvg34 = MovingAverage(VolAverageType, Vol4,  AVL3);
def VolAvg44 = MovingAverage(VolAverageType, Vol4,  AVL4);
def VolAvg54 = MovingAverage(VolAverageType, Vol4,  AVL5);
def VolAvg64 = MovingAverage(VolAverageType, Vol4,  AVL6);
def VolAvg15 = MovingAverage(VolAverageType, Vol5, AVL1);
def VolAvg25 = MovingAverage(VolAverageType, Vol5, AVL2);
def VolAvg35 = MovingAverage(VolAverageType, Vol5,  AVL3);
def VolAvg45 = MovingAverage(VolAverageType, Vol5,  AVL4);
def VolAvg55 = MovingAverage(VolAverageType, Vol5,  AVL5);
def VolAvg65 = MovingAverage(VolAverageType, Vol5,  AVL6);
def VolAvg16 = MovingAverage(VolAverageType, Vol6, AVL1);
def VolAvg26 = MovingAverage(VolAverageType, Vol6, AVL2);
def VolAvg36 = MovingAverage(VolAverageType, Vol6,  AVL3);
def VolAvg46 = MovingAverage(VolAverageType, Vol6,  AVL4);
def VolAvg56 = MovingAverage(VolAverageType, Vol6,  AVL5);
def VolAvg66 = MovingAverage(VolAverageType, Vol6,  AVL6);
def VolAvg17 = MovingAverage(VolAverageType, Vol7, AVL1);
def VolAvg27 = MovingAverage(VolAverageType, Vol7, AVL2);
def VolAvg37 = MovingAverage(VolAverageType, Vol7,  AVL3);
def VolAvg47 = MovingAverage(VolAverageType, Vol7,  AVL4);
def VolAvg57 = MovingAverage(VolAverageType, Vol7,  AVL5);
def VolAvg67 = MovingAverage(VolAverageType, Vol7,  AVL6);
def VolAvg18 = MovingAverage(VolAverageType, Vol8, AVL1);
def VolAvg28 = MovingAverage(VolAverageType, Vol8, AVL2);
def VolAvg38 = MovingAverage(VolAverageType, Vol8,  AVL3);
def VolAvg48 = MovingAverage(VolAverageType, Vol8,  AVL4);
def VolAvg58 = MovingAverage(VolAverageType, Vol8,  AVL5);
def VolAvg68 = MovingAverage(VolAverageType, Vol8,  AVL6);
def VolAvg19 = MovingAverage(VolAverageType, Vol9, AVL1);
def VolAvg29 = MovingAverage(VolAverageType, Vol9, AVL2);
def VolAvg39 = MovingAverage(VolAverageType, Vol9,  AVL3);
def VolAvg49 = MovingAverage(VolAverageType, Vol9,  AVL4);
def VolAvg59 = MovingAverage(VolAverageType, Vol9,  AVL5);
def VolAvg69 = MovingAverage(VolAverageType, Vol9,  AVL6);
def VolAvg110 = MovingAverage(VolAverageType, Vol10, AVL1);
def VolAvg210 = MovingAverage(VolAverageType, Vol10, AVL2);
def VolAvg310 = MovingAverage(VolAverageType, Vol10,  AVL3);
def VolAvg410 = MovingAverage(VolAverageType, Vol10,  AVL4);
def VolAvg510 = MovingAverage(VolAverageType, Vol10,  AVL5);
def VolAvg610 = MovingAverage(VolAverageType, Vol10,  AVL6);
def VolAvg111 = MovingAverage(VolAverageType, Vol11, AVL1);
def VolAvg211 = MovingAverage(VolAverageType, Vol11, AVL2);
def VolAvg311 = MovingAverage(VolAverageType, Vol11,  AVL3);
def VolAvg411 = MovingAverage(VolAverageType, Vol11,  AVL4);
def VolAvg511 = MovingAverage(VolAverageType, Vol11,  AVL5);
def VolAvg611 = MovingAverage(VolAverageType, Vol11,  AVL6);
def VolAvg112 = MovingAverage(VolAverageType, Vol12, AVL1);
def VolAvg212 = MovingAverage(VolAverageType, Vol12, AVL2);
def VolAvg312 = MovingAverage(VolAverageType, Vol12,  AVL3);
def VolAvg412 = MovingAverage(VolAverageType, Vol12,  AVL4);
def VolAvg512 = MovingAverage(VolAverageType, Vol12,  AVL5);
def VolAvg612 = MovingAverage(VolAverageType, Vol12,  AVL6);
def VolAvg113 = MovingAverage(VolAverageType, Vol13, AVL1);
def VolAvg213 = MovingAverage(VolAverageType, Vol13, AVL2);
def VolAvg313 = MovingAverage(VolAverageType, Vol13,  AVL3);
def VolAvg413 = MovingAverage(VolAverageType, Vol13,  AVL4);
def VolAvg513 = MovingAverage(VolAverageType, Vol13,  AVL5);
def VolAvg613 = MovingAverage(VolAverageType, Vol13,  AVL6);
def VolAvg114 = MovingAverage(VolAverageType, Vol4, AVL1);
def VolAvg214 = MovingAverage(VolAverageType, Vol4, AVL2);
def VolAvg314 = MovingAverage(VolAverageType, Vol14,  AVL3);
def VolAvg414 = MovingAverage(VolAverageType, Vol14,  AVL4);
def VolAvg514 = MovingAverage(VolAverageType, Vol14,  AVL5);
def VolAvg614 = MovingAverage(VolAverageType, Vol14,  AVL6);
def VolAvg115 = MovingAverage(VolAverageType, Vol15, AVL1);
def VolAvg215 = MovingAverage(VolAverageType, Vol15, AVL2);
def VolAvg315 = MovingAverage(VolAverageType, Vol15,  AVL3);
def VolAvg415 = MovingAverage(VolAverageType, Vol15,  AVL4);
def VolAvg515 = MovingAverage(VolAverageType, Vol15,  AVL5);
def VolAvg615 = MovingAverage(VolAverageType, Vol15,  AVL6);
def VolAvg116 = MovingAverage(VolAverageType, Vol16, AVL1);
def VolAvg216 = MovingAverage(VolAverageType, Vol16, AVL2);
def VolAvg316 = MovingAverage(VolAverageType, Vol16,  AVL3);
def VolAvg416 = MovingAverage(VolAverageType, Vol16,  AVL4);
def VolAvg516 = MovingAverage(VolAverageType, Vol16,  AVL5);
def VolAvg616 = MovingAverage(VolAverageType, Vol16,  AVL6);

def VAL1 = ((VolAvg1 + VolAvg2 + VolAvg3 + VolAvg4 + VolAvg5 + VolAvg6) / 6);
def VAL2 = ((VolAvg12 + VolAvg22 + VolAvg32 + VolAvg42 + VolAvg52 + VolAvg62) / 6);
def VAL3 = ((VolAvg13 + VolAvg23 + VolAvg33 + VolAvg43 + VolAvg53 + VolAvg63) / 6);
def VAL4 = ((VolAvg14 + VolAvg24 + VolAvg34 + VolAvg44 + VolAvg54 + VolAvg64) / 6);
def VAL5 = ((VolAvg15 + VolAvg25 + VolAvg35 + VolAvg45 + VolAvg55 + VolAvg65) / 6);
def VAL6 = ((VolAvg16 + VolAvg26 + VolAvg36 + VolAvg46 + VolAvg56 + VolAvg66) / 6);
def VAL7 = ((VolAvg17 + VolAvg27 + VolAvg37 + VolAvg47 + VolAvg57 + VolAvg67) / 6);
def VAL8 = ((VolAvg18 + VolAvg28 + VolAvg38 + VolAvg48 + VolAvg58 + VolAvg68) / 6);
def VAL9 = ((VolAvg19 + VolAvg29 + VolAvg39 + VolAvg49 + VolAvg59 + VolAvg69) / 6);
def VAL10 = ((VolAvg110 + VolAvg210 + VolAvg310 + VolAvg410 + VolAvg510 + VolAvg610) / 6);
def VAL11 = ((VolAvg111 + VolAvg211 + VolAvg311 + VolAvg411 + VolAvg511 + VolAvg611) / 6);
def VAL12 = ((VolAvg112 + VolAvg212 + VolAvg312 + VolAvg412 + VolAvg512 + VolAvg612) / 6);
def VAL13 = ((VolAvg113 + VolAvg213 + VolAvg313 + VolAvg413 + VolAvg513 + VolAvg613) / 6);
def VAL14 = ((VolAvg114 + VolAvg214 + VolAvg314 + VolAvg414 + VolAvg514 + VolAvg614) / 6);
def VAL15 = ((VolAvg115 + VolAvg215 + VolAvg315 + VolAvg415 + VolAvg515 + VolAvg615) / 6);
def VAL16 = ((VolAvg116 + VolAvg216 + VolAvg316 + VolAvg416 + VolAvg516 + VolAvg616) / 6);



def q = StandardDeviation(Vol1, 650) / ExpAverage(Vol1, 650);
def qq = StandardDeviation(Vol1, 100) / ExpAverage(Vol1, 100);
def qqq = StandardDeviation(Vol1, 1000) / ExpAverage(Vol1, 1000);
def qa = (q + qq + qqq) / 3;
def w = StandardDeviation(Vol2, 650) / ExpAverage(Vol2, 650);
def ww = StandardDeviation(Vol2, 100) / ExpAverage(Vol2, 100);
def www = StandardDeviation(Vol2, 1000) / ExpAverage(Vol2, 1000);
def wa = (w + ww + www) / 3;
def e = StandardDeviation(Vol3, 650) / ExpAverage(Vol3, 650);
def ee = StandardDeviation(Vol3, 100) / ExpAverage(Vol3, 100);
def eee = StandardDeviation(Vol3, 1000) / ExpAverage(Vol3, 1000);
def ea = (e + ee + eee) / 3;
def r = StandardDeviation(Vol4, 650) / ExpAverage(Vol4, 650);
def rr = StandardDeviation(Vol4, 100) / ExpAverage(Vol4, 100);
def rrr = StandardDeviation(Vol4, 1000) / ExpAverage(Vol4, 1000);
def ra = (r + rr + rrr) / 3;
def t = StandardDeviation(Vol5, 650) / ExpAverage(Vol5, 650);
def tt = StandardDeviation(Vol5, 100) / ExpAverage(Vol5, 100);
def ttt = StandardDeviation(Vol5, 1000) / ExpAverage(Vol5, 1000);
def ta = (t + tt + ttt) / 3;
def y = StandardDeviation(Vol6, 650) / ExpAverage(Vol6, 650);
def yy = StandardDeviation(Vol6, 100) / ExpAverage(Vol6, 100);
def yyy = StandardDeviation(Vol6, 1000) / ExpAverage(Vol6, 1000);
def ya = (y + yy + yyy) / 3;
def u = StandardDeviation(Vol7, 650) / ExpAverage(Vol7, 650);
def uu = StandardDeviation(Vol7, 100) / ExpAverage(Vol7, 100);
def uuu = StandardDeviation(Vol7, 1000) / ExpAverage(Vol7, 1000);
def ua = (u + uu + uuu) / 3;
def i = StandardDeviation(Vol8, 650) / ExpAverage(Vol8, 650);
def ii = StandardDeviation(Vol8, 100) / ExpAverage(Vol8, 100);
def iii = StandardDeviation(Vol8, 1000) / ExpAverage(Vol8, 1000);
def ia = (i + ii + iii) / 3;
def o = StandardDeviation(Vol9, 650) / ExpAverage(Vol9, 650);
def oo = StandardDeviation(Vol9, 100) / ExpAverage(Vol9, 100);
def ooo = StandardDeviation(Vol9, 1000) / ExpAverage(Vol9, 1000);
def oa = (o + oo + ooo) / 3;
def p = StandardDeviation(Vol10, 650) / ExpAverage(Vol10, 650);
def pp = StandardDeviation(Vol10, 100) / ExpAverage(Vol10, 100);
def ppp = StandardDeviation(Vol10, 1000) / ExpAverage(Vol10, 1000);
def pa = (p + pp + ppp) / 3;
def a = StandardDeviation(Vol11, 650) / ExpAverage(Vol11, 650);
def aa = StandardDeviation(Vol11, 100) / ExpAverage(Vol11, 100);
def aaa = StandardDeviation(Vol11, 1000) / ExpAverage(Vol11, 1000);
def aaaa = (a + aa + aaa) / 3;
def s = StandardDeviation(Vol12, 650) / ExpAverage(Vol12, 650);
def ss = StandardDeviation(Vol2, 100) / ExpAverage(Vol12, 100);
def sss = StandardDeviation(Vol12, 1000) / ExpAverage(Vol12, 1000);
def sa = (s + ss + sss) / 3;
def d = StandardDeviation(Vol13, 650) / ExpAverage(Vol13, 650);
def dd = StandardDeviation(Vol13, 100) / ExpAverage(Vol13, 100);
def ddd = StandardDeviation(Vol13, 1000) / ExpAverage(Vol13, 1000);
def da = (d + dd + ddd) / 3;
def f = StandardDeviation(Vol14, 650) / ExpAverage(Vol14, 650);
def ff = StandardDeviation(Vol14, 100) / ExpAverage(Vol14, 100);
def fff = StandardDeviation(Vol14, 1000) / ExpAverage(Vol14, 1000);
def fa = (f + ff + fff) / 3;
def g = StandardDeviation(Vol15, 650) / ExpAverage(Vol15, 650);
def gg = StandardDeviation(Vol15, 100) / ExpAverage(Vol15, 100);
def ggg = StandardDeviation(Vol15, 1000) / ExpAverage(Vol15, 1000);
def ga = (g + gg + ggg) / 3;
def h = StandardDeviation(Vol16, 650) / ExpAverage(Vol16, 650);
def hh = StandardDeviation(Vol16, 100) / ExpAverage(Vol16, 100);
def hhh = StandardDeviation(Vol16, 1000) / ExpAverage(Vol16, 1000);
def ha = (h + hh + hhh) / 3;

def Num_Dev1 = (3 );
def Num_Dev2 = (3 );
def Num_Dev3 = (3 );
def Num_Dev4 = (3 );
def Num_Dev5 = (3 );
def Num_Dev6 = (3 );
def Num_Dev7 = (3 );
def Num_Dev8 = (3 );
def Num_Dev9 = (3 );
def Num_Dev10 = (3 );
def Num_Dev11 = (3 );
def Num_Dev12 = (3 );
def Num_Dev13 = (3 );
def Num_Dev14 = (3 );
def Num_Dev15 = (3 );
def Num_Dev16 = (3 );
#def Num_Dev1 = (5 * qa );
#def Num_Dev2 = (5 * wa );
#def Num_Dev3 = (5 * ea );
#def Num_Dev4 = (5 * ra );
#def Num_Dev5 = (5 * ta );
#def Num_Dev6 = (5 * ya );
#def Num_Dev7 = (5 * ua );
#def Num_Dev8 = (5 * ia );
#def Num_Dev9 = (5 * oa );
#def Num_Dev10 = (5 * pa );
#def Num_Dev11 = (5 * aaaa );
#def Num_Dev12 = (5 * sa );
#def Num_Dev14 = (5 * fa );
#def Num_Dev15 = (5 * ga );
#def Num_Dev16 = (5 * ha );


def sDev1 = StDev(data = Vol1, length = AVL1);
def sDev2 = StDev(data = Vol1, length = AVL2);
def sDev3 = StDev(data = Vol1, length = AVL3);
def sDev4 = StDev(data = Vol1, length = AVL4);
def sDev5 = StDev(data = Vol1, length = AVL5);
def sDev6 = StDev(data = Vol1, length = AVL6);
def sDev12 = StDev(data = Vol2, length = AVL1);
def sDev22 = StDev(data = Vol2, length = AVL2);
def sDev32 = StDev(data = Vol2, length = AVL3);
def sDev42 = StDev(data = Vol2, length = AVL4);
def sDev52 = StDev(data = Vol2, length = AVL5);
def sDev62 = StDev(data = Vol2, length = AVL6);
def sDev13 = StDev(data = Vol3, length = AVL1);
def sDev23 = StDev(data = Vol3, length = AVL2);
def sDev33 = StDev(data = Vol3, length = AVL3);
def sDev43 = StDev(data = Vol3, length = AVL4);
def sDev53 = StDev(data = Vol3, length = AVL5);
def sDev63 = StDev(data = Vol3, length = AVL6);
def sDev14 = StDev(data = Vol4, length = AVL1);
def sDev24 = StDev(data = Vol4, length = AVL2);
def sDev34 = StDev(data = Vol4, length = AVL3);
def sDev44 = StDev(data = Vol4, length = AVL4);
def sDev54 = StDev(data = Vol4, length = AVL5);
def sDev64 = StDev(data = Vol4, length = AVL6);
def sDev15 = StDev(data = Vol5, length = AVL1);
def sDev25 = StDev(data = Vol5, length = AVL2);
def sDev35 = StDev(data = Vol5, length = AVL3);
def sDev45 = StDev(data = Vol5, length = AVL4);
def sDev55 = StDev(data = Vol5, length = AVL5);
def sDev65 = StDev(data = Vol5, length = AVL6);
def sDev16 = StDev(data = Vol6, length = AVL1);
def sDev26 = StDev(data = Vol6, length = AVL2);
def sDev36 = StDev(data = Vol6, length = AVL3);
def sDev46 = StDev(data = Vol6, length = AVL4);
def sDev56 = StDev(data = Vol6, length = AVL5);
def sDev66 = StDev(data = Vol6, length = AVL6);
def sDev17 = StDev(data = Vol7, length = AVL1);
def sDev27 = StDev(data = Vol7, length = AVL2);
def sDev37 = StDev(data = Vol7, length = AVL3);
def sDev47 = StDev(data = Vol7, length = AVL4);
def sDev57 = StDev(data = Vol7, length = AVL5);
def sDev67 = StDev(data = Vol7, length = AVL6);
def sDev18 = StDev(data = Vol8, length = AVL1);
def sDev28 = StDev(data = Vol8, length = AVL2);
def sDev38 = StDev(data = Vol8, length = AVL3);
def sDev48 = StDev(data = Vol8, length = AVL4);
def sDev58 = StDev(data = Vol8, length = AVL5);
def sDev68 = StDev(data = Vol8, length = AVL6);
def sDev19 = StDev(data = Vol9, length = AVL1);
def sDev29 = StDev(data = Vol9, length = AVL2);
def sDev39 = StDev(data = Vol9, length = AVL3);
def sDev49 = StDev(data = Vol9, length = AVL4);
def sDev59 = StDev(data = Vol9, length = AVL5);
def sDev69 = StDev(data = Vol9, length = AVL6);
def sDev110 = StDev(data = Vol10, length = AVL1);
def sDev210 = StDev(data = Vol10, length = AVL2);
def sDev310 = StDev(data = Vol10, length = AVL3);
def sDev410 = StDev(data = Vol10, length = AVL4);
def sDev510 = StDev(data = Vol10, length = AVL5);
def sDev610 = StDev(data = Vol10, length = AVL6);
def sDev111 = StDev(data = Vol11, length = AVL1);
def sDev211 = StDev(data = Vol11, length = AVL2);
def sDev311 = StDev(data = Vol11, length = AVL3);
def sDev411 = StDev(data = Vol11, length = AVL4);
def sDev511 = StDev(data = Vol11, length = AVL5);
def sDev611 = StDev(data = Vol11, length = AVL6);
def sDev122 = StDev(data = Vol12, length = AVL1);
def sDev222 = StDev(data = Vol12, length = AVL2);
def sDev322 = StDev(data = Vol12, length = AVL3);
def sDev422 = StDev(data = Vol12, length = AVL4);
def sDev522 = StDev(data = Vol12, length = AVL5);
def sDev622 = StDev(data = Vol12, length = AVL6);
def sDev133 = StDev(data = Vol13, length = AVL1);
def sDev233 = StDev(data = Vol13, length = AVL2);
def sDev333 = StDev(data = Vol13, length = AVL3);
def sDev433 = StDev(data = Vol13, length = AVL4);
def sDev533 = StDev(data = Vol13, length = AVL5);
def sDev633 = StDev(data = Vol13, length = AVL6);
def sDev144 = StDev(data = Vol14, length = AVL1);
def sDev244 = StDev(data = Vol14, length = AVL2);
def sDev344 = StDev(data = Vol14, length = AVL3);
def sDev444 = StDev(data = Vol14, length = AVL4);
def sDev544 = StDev(data = Vol14, length = AVL5);
def sDev644 = StDev(data = Vol14, length = AVL6);
def sDev155 = StDev(data = Vol15, length = AVL1);
def sDev255 = StDev(data = Vol15, length = AVL2);
def sDev355 = StDev(data = Vol15, length = AVL3);
def sDev455 = StDev(data = Vol15, length = AVL4);
def sDev555 = StDev(data = Vol15, length = AVL5);
def sDev655 = StDev(data = Vol15, length = AVL6);
def sDev166 = StDev(data = Vol16, length = AVL1);
def sDev266 = StDev(data = Vol16, length = AVL2);
def sDev366 = StDev(data = Vol16, length = AVL3);
def sDev466 = StDev(data = Vol16, length = AVL4);
def sDev566 = StDev(data = Vol16, length = AVL5);
def sDev666 = StDev(data = Vol16, length = AVL6);


def allsdev1 = (sDev1 + sDev2 + sDev3 + sDev4 + sDev5 + sDev6) / 6;
def allsdev2 = (sDev12 + sDev22 + sDev32 + sDev42 + sDev52 + sDev62) / 6;
def allsdev3 = (sDev13 + sDev23 + sDev33 + sDev43 + sDev53 + sDev63) / 6;
def allsdev4 = (sDev14 + sDev24 + sDev34 + sDev44 + sDev54 + sDev64) / 6;
def allsdev5 = (sDev15 + sDev25 + sDev35 + sDev45 + sDev55 + sDev65) / 6;
def allsdev6 = (sDev16 + sDev26 + sDev36 + sDev46 + sDev56 + sDev66) / 6;
def allsdev7 = (sDev17 + sDev27 + sDev37 + sDev47 + sDev57 + sDev67) / 6;
def allsdev8 = (sDev18 + sDev28 + sDev38 + sDev48 + sDev58 + sDev68) / 6;
def allsdev9 = (sDev19 + sDev29 + sDev39 + sDev49 + sDev59 + sDev69) / 6;
def allsdev10 = (sDev110 + sDev210 + sDev310 + sDev410 + sDev510 + sDev610) / 6;
def allsdev11 = (sDev111 + sDev211 + sDev311 + sDev411 + sDev511 + sDev611) / 6;
def allsdev12 = (sDev122 + sDev222 + sDev322 + sDev422 + sDev522 + sDev622) / 6;
def allsdev13 = (sDev133 + sDev233 + sDev333 + sDev433 + sDev533 + sDev633) / 6;
def allsdev14 = (sDev144 + sDev244 + sDev344 + sDev444 + sDev544 + sDev644) / 6;
def allsdev15 = (sDev155 + sDev255 + sDev355 + sDev455 + sDev555 + sDev655) / 6;
def allsdev16 = (sDev166 + sDev266 + sDev366 + sDev466 + sDev566 + sDev666) / 6;

def vsig1 = VAL1 + Num_Dev1 * allsdev1;
def vsig2 = VAL2 + Num_Dev2 * allsdev2;
def vsig3 = VAL3 + Num_Dev3 * allsdev3;
def vsig4 = VAL4 + Num_Dev4 * allsdev4;
def vsig5 = VAL5 + Num_Dev5 * allsdev5;
def vsig6 = VAL6 + Num_Dev6 * allsdev6;
def vsig7 = VAL7 + Num_Dev7 * allsdev7;
def vsig8 = VAL8 + Num_Dev8 * allsdev8;
def vsig9 = VAL9 + Num_Dev9 * allsdev9;
def vsig10 = VAL10 + Num_Dev10 * allsdev10;
def vsig11 = VAL11 + Num_Dev11 * allsdev11;
def vsig12 = VAL12 + Num_Dev12 * allsdev12;
def vsig13 = VAL13 + Num_Dev13 * allsdev13;
def vsig14 = VAL14 + Num_Dev14 * allsdev14;
def vsig15 = VAL15 + Num_Dev15 * allsdev15;
def vsig16 = VAL16 + Num_Dev16 * allsdev16;





def canful = (low + close) / 2;
def canful2 = (high + close) / 2;

def volmult1 = if clause1 then ((Vol1 / (vsig1[8]) * (Vol1 / (vsig1[8]))) / (Vol1 / (vsig1[8]))) else 0;
def volmult2 = if clause2 then ((Vol2 / (vsig2[8]) * (Vol2 / (vsig2[8]))) / (Vol2 / (vsig2[8]))) else 0;
def volmult3 = if clause3 then ((Vol3 / (vsig3[8]) * (Vol3 / (vsig3[8]))) / (Vol3 / (vsig3[8]))) else 0;
def volmult4 = if clause4 then ((Vol4 / (vsig4[8]) * (Vol4 / (vsig4[8]))) / (Vol4 / (vsig4[8]))) else 0;
def volmult5 = if clause5 then ((Vol5 / (vsig5[8]) * (Vol5 / (vsig5[8]))) / (Vol5 / (vsig5[8]))) else 0;
def volmult6 = if clause6 then ((Vol6 / (vsig6[8]) * (Vol6 / (vsig6[8]))) / (Vol6 / (vsig6[8]))) else 0;
def volmult7 = if clause7 then ((Vol7 / (vsig7[8]) * (Vol7 / (vsig7[8]))) / (Vol7 / (vsig7[8]))) else 0;
def volmult8 = if clause8 then ((Vol8 / (vsig8[8]) * (Vol8 / (vsig8[8]))) / (Vol8 / (vsig8[8]))) else 0;
def volmult9 = if clause9 then ((Vol9 / (vsig9[8]) * (Vol9 / (vsig9[8]))) / (Vol9 / (vsig9[8]))) else 0;
def volmult10 = if clause10 then ((Vol10 / (vsig10[8]) * (Vol10 / (vsig10[8]))) / (Vol10 / (vsig10[8]))) else 0;
def volmult11 = if clause11 then ((Vol11 / (vsig11[8]) * (Vol11 / (vsig11[8]))) / (Vol11 / (vsig11[8]))) else 0;
def volmult12 = if clause12 then ((Vol12 / (vsig12[8]) * (Vol12 / (vsig12[8]))) / (Vol12 / (vsig12[8]))) else 0;
def volmult13 = if clause13 then ((Vol13 / (vsig13[8]) * (Vol13 / (vsig13[8]))) / (Vol13 / (vsig13[8]))) else 0;
def volmult14 = if clause14 then ((Vol14 / (vsig14[8]) * (Vol14 / (vsig14[8]))) / (Vol14 / (vsig14[8]))) else 0;
def volmult15 = if clause15 then ((Vol15 / (vsig15[8]) * (Vol15 / (vsig15[8]))) / (Vol15 / (vsig15[8]))) else 0;
def volmult16 = if clause16 then ((Vol16 / (vsig16[8]) * (Vol16 / (vsig16[8]))) / (Vol16 / (vsig16[8]))) else 0;
plot comb = (volmult1 + volmult2 + volmult3 + volmult4 + volmult5 + volmult6 + volmult7 + volmult8 + volmult9 + volmult10 + volmult11 + volmult12 + volmult13 + volmult14 + volmult15 + volmult16);

#simple rewrite
 

YungTraderFromMontana

Well-known member
@mashume I saw you used this script function to make writing code for multiple lengths much shorter.

Code:
script gammax {
    input nFEi = 12;
    def FE =  Log(Sum((Max(high, close[1]) - Min(low, close[1])), nFEi) /
        (Highest(high, nFEi) - Lowest(low, nFEi)))
            / Log(nFEi);
    plot gamma = FE/2;
}

Can this be replicated for a volume study I'm working on? The difference is in this new script the length is constant while the variable part is the volume.

I'm trying to make a relative volume study for the 10m chart and it requires 96 separate volume inputs. I have already made one for the 1h chart and I rewrote the script every time manually, but now that I have to do 96 not 16. I don't want to spend hours writing the same code over and over.

My end goal is to be able to do
def = relvol(vol1)
def = relvol(vol2)
and so on......

Here is my attempt at the bottom but I know I am doing it incorrectly

Code:
input VolAverageType = AverageType.WILDERS;

def AVL1 = 60;
def AVL2 = 120;
def AVL3 = 250;
def AVL4 = 400;
def AVL5 = 600;
def AVL6 = 1500;

def clause1 = SecondsFromTime(0359) >= 0 and  SecondsFromTime(0409) <= 0;
def clause2 = SecondsFromTime(0409) >= 0 and  SecondsFromTime(0419) <= 0;
def clause3 = SecondsFromTime(0419) >= 0 and  SecondsFromTime(0429) <= 0;
def clause4 = SecondsFromTime(0429) >= 0 and  SecondsFromTime(0439) <= 0;
def clause5 = SecondsFromTime(0439) >= 0 and  SecondsFromTime(0449) <= 0;
def clause6 = SecondsFromTime(0449) >= 0 and  SecondsFromTime(0459) <= 0;
def clause7 = SecondsFromTime(0459) >= 0 and  SecondsFromTime(0509) <= 0;
def clause8 = SecondsFromTime(0509) >= 0 and  SecondsFromTime(0519) <= 0;
def clause9 = SecondsFromTime(0519) >= 0 and  SecondsFromTime(0529) <= 0;
def clause10 = SecondsFromTime(0529) >= 0 and  SecondsFromTime(0539) <= 0;
def clause11 = SecondsFromTime(0539) >= 0 and  SecondsFromTime(0549) <= 0;
def clause12 = SecondsFromTime(0549) >= 0 and  SecondsFromTime(0559) <= 0;
def clause13 = SecondsFromTime(0559) >= 0 and  SecondsFromTime(0609) <= 0;
def clause14 = SecondsFromTime(0609) >= 0 and  SecondsFromTime(0619) <= 0;
def clause15 = SecondsFromTime(0619) >= 0 and  SecondsFromTime(0629) <= 0;
def clause16 = SecondsFromTime(0629) >= 0 and  SecondsFromTime(0639) <= 0;
def clause17 = SecondsFromTime(0639) >= 0 and  SecondsFromTime(0649) <= 0;
def clause18 = SecondsFromTime(0649) >= 0 and  SecondsFromTime(0659) <= 0;
def clause19 = SecondsFromTime(0659) >= 0 and  SecondsFromTime(0709) <= 0;
def clause20 = SecondsFromTime(0709) >= 0 and  SecondsFromTime(0719) <= 0;
def clause21 = SecondsFromTime(0719) >= 0 and  SecondsFromTime(0729) <= 0;
def clause22 = SecondsFromTime(0729) >= 0 and  SecondsFromTime(0739) <= 0;
def clause23 = SecondsFromTime(0739) >= 0 and  SecondsFromTime(0749) <= 0;
def clause24 = SecondsFromTime(0749) >= 0 and  SecondsFromTime(0759) <= 0;
def clause25 = SecondsFromTime(0759) >= 0 and  SecondsFromTime(0809) <= 0;
def clause26 = SecondsFromTime(0809) >= 0 and  SecondsFromTime(0819) <= 0;
def clause27 = SecondsFromTime(0819) >= 0 and  SecondsFromTime(0829) <= 0;
def clause28 = SecondsFromTime(0829) >= 0 and  SecondsFromTime(0839) <= 0;
def clause29 = SecondsFromTime(0839) >= 0 and  SecondsFromTime(0849) <= 0;
def clause30 = SecondsFromTime(0849) >= 0 and  SecondsFromTime(0859) <= 0;
def clause31 = SecondsFromTime(0859) >= 0 and  SecondsFromTime(0909) <= 0;
def clause32 = SecondsFromTime(0909) >= 0 and  SecondsFromTime(0919) <= 0;
def clause33 = SecondsFromTime(0919) >= 0 and  SecondsFromTime(0929) <= 0;
def clause34 = SecondsFromTime(0929) >= 0 and  SecondsFromTime(0939) <= 0;
def clause35 = SecondsFromTime(0939) >= 0 and  SecondsFromTime(0949) <= 0;
def clause36 = SecondsFromTime(0949) >= 0 and  SecondsFromTime(0959) <= 0;
def clause37 = SecondsFromTime(0959) >= 0 and  SecondsFromTime(1009) <= 0;
def clause38 = SecondsFromTime(1009) >= 0 and  SecondsFromTime(1019) <= 0;
def clause39 = SecondsFromTime(1019) >= 0 and  SecondsFromTime(1029) <= 0;
def clause40 = SecondsFromTime(1029) >= 0 and  SecondsFromTime(1039) <= 0;
def clause41 = SecondsFromTime(1039) >= 0 and  SecondsFromTime(1049) <= 0;
def clause42 = SecondsFromTime(1049) >= 0 and  SecondsFromTime(1059) <= 0;
def clause43 = SecondsFromTime(1059) >= 0 and  SecondsFromTime(1109) <= 0;
def clause44 = SecondsFromTime(1109) >= 0 and  SecondsFromTime(1119) <= 0;
def clause45 = SecondsFromTime(1119) >= 0 and  SecondsFromTime(1129) <= 0;
def clause46 = SecondsFromTime(1129) >= 0 and  SecondsFromTime(1139) <= 0;
def clause47 = SecondsFromTime(1139) >= 0 and  SecondsFromTime(1149) <= 0;
def clause48 = SecondsFromTime(1149) >= 0 and  SecondsFromTime(1159) <= 0;
def clause49 = SecondsFromTime(1159) >= 0 and  SecondsFromTime(1209) <= 0;
def clause50 = SecondsFromTime(1209) >= 0 and  SecondsFromTime(1219) <= 0;
def clause51 = SecondsFromTime(1219) >= 0 and  SecondsFromTime(1229) <= 0;
def clause52 = SecondsFromTime(1229) >= 0 and  SecondsFromTime(1239) <= 0;
def clause53 = SecondsFromTime(1239) >= 0 and  SecondsFromTime(1249) <= 0;
def clause54 = SecondsFromTime(1249) >= 0 and  SecondsFromTime(1259) <= 0;
def clause55 = SecondsFromTime(1259) >= 0 and  SecondsFromTime(1309) <= 0;
def clause56 = SecondsFromTime(1309) >= 0 and  SecondsFromTime(1319) <= 0;
def clause57 = SecondsFromTime(1319) >= 0 and  SecondsFromTime(1329) <= 0;
def clause58 = SecondsFromTime(1329) >= 0 and  SecondsFromTime(1339) <= 0;
def clause59 = SecondsFromTime(1339) >= 0 and  SecondsFromTime(1349) <= 0;
def clause60 = SecondsFromTime(1349) >= 0 and  SecondsFromTime(1359) <= 0;
def clause61 = SecondsFromTime(1359) >= 0 and  SecondsFromTime(1409) <= 0;
def clause62 = SecondsFromTime(1409) >= 0 and  SecondsFromTime(1419) <= 0;
def clause63 = SecondsFromTime(1419) >= 0 and  SecondsFromTime(1429) <= 0;
def clause64 = SecondsFromTime(1429) >= 0 and  SecondsFromTime(1439) <= 0;
def clause65 = SecondsFromTime(1439) >= 0 and  SecondsFromTime(1449) <= 0;
def clause66 = SecondsFromTime(1449) >= 0 and  SecondsFromTime(1459) <= 0;
def clause67 = SecondsFromTime(1459) >= 0 and  SecondsFromTime(1509) <= 0;
def clause68 = SecondsFromTime(1509) >= 0 and  SecondsFromTime(1519) <= 0;
def clause69 = SecondsFromTime(1519) >= 0 and  SecondsFromTime(1529) <= 0;
def clause70 = SecondsFromTime(1529) >= 0 and  SecondsFromTime(1539) <= 0;
def clause71 = SecondsFromTime(1539) >= 0 and  SecondsFromTime(1549) <= 0;
def clause72 = SecondsFromTime(1549) >= 0 and  SecondsFromTime(1559) <= 0;
def clause73 = SecondsFromTime(1559) >= 0 and  SecondsFromTime(1609) <= 0;
def clause74 = SecondsFromTime(1609) >= 0 and  SecondsFromTime(1619) <= 0;
def clause75 = SecondsFromTime(1619) >= 0 and  SecondsFromTime(1629) <= 0;
def clause76 = SecondsFromTime(1629) >= 0 and  SecondsFromTime(1639) <= 0;
def clause77 = SecondsFromTime(1639) >= 0 and  SecondsFromTime(1649) <= 0;
def clause78 = SecondsFromTime(1649) >= 0 and  SecondsFromTime(1659) <= 0;
def clause79 = SecondsFromTime(1659) >= 0 and  SecondsFromTime(1709) <= 0;
def clause80 = SecondsFromTime(1709) >= 0 and  SecondsFromTime(1719) <= 0;
def clause81 = SecondsFromTime(1719) >= 0 and  SecondsFromTime(1729) <= 0;
def clause82 = SecondsFromTime(1729) >= 0 and  SecondsFromTime(1739) <= 0;
def clause83 = SecondsFromTime(1739) >= 0 and  SecondsFromTime(1749) <= 0;
def clause84 = SecondsFromTime(1749) >= 0 and  SecondsFromTime(1759) <= 0;
def clause85 = SecondsFromTime(1759) >= 0 and  SecondsFromTime(1809) <= 0;
def clause86 = SecondsFromTime(1809) >= 0 and  SecondsFromTime(1819) <= 0;
def clause87 = SecondsFromTime(1819) >= 0 and  SecondsFromTime(1829) <= 0;
def clause88 = SecondsFromTime(1829) >= 0 and  SecondsFromTime(1839) <= 0;
def clause89 = SecondsFromTime(1839) >= 0 and  SecondsFromTime(1849) <= 0;
def clause90 = SecondsFromTime(1849) >= 0 and  SecondsFromTime(1859) <= 0;
def clause91 = SecondsFromTime(1859) >= 0 and  SecondsFromTime(1909) <= 0;
def clause92 = SecondsFromTime(1909) >= 0 and  SecondsFromTime(1919) <= 0;
def clause93 = SecondsFromTime(1919) >= 0 and  SecondsFromTime(1929) <= 0;
def clause94 = SecondsFromTime(1929) >= 0 and  SecondsFromTime(1939) <= 0;
def clause95 = SecondsFromTime(1939) >= 0 and  SecondsFromTime(1949) <= 0;
def clause96 = SecondsFromTime(1949) >= 0 and  SecondsFromTime(1959) <= 0;

def Vol1 = if clause1 then volume * close else 0;
def Vol2 = if clause2 then volume * close else 0;
def Vol3 = if clause3 then volume * close else 0;
def Vol4 = if clause4 then volume * close else 0;
def Vol5 = if clause5 then volume * close else 0;
def Vol6 = if clause6 then volume * close else 0;
def Vol7 = if clause7 then volume * close else 0;
def Vol8 = if clause8 then volume * close else 0;
def Vol9 = if clause9 then volume * close else 0;
def Vol10 = if clause10 then volume * close else 0;
def Vol11 = if clause11 then volume * close else 0;
def Vol12 = if clause12 then volume * close else 0;
def Vol13 = if clause13 then volume * close else 0;
def Vol14 = if clause14 then volume * close else 0;
def Vol15 = if clause15 then volume * close else 0;
def Vol16 = if clause16 then volume * close else 0;
def Vol17 = if clause17 then volume * close else 0;
def Vol18 = if clause18 then volume * close else 0;
def Vol19 = if clause19 then volume * close else 0;
plot Vol20 = if clause20 then volume * close else 0;
plot Vol21 = if clause21 then volume * close else 0;
def Vol22 = if clause22 then volume * close else 0;
def Vol23 = if clause23 then volume * close else 0;
def Vol24 = if clause24 then volume * close else 0;
def Vol25 = if clause25 then volume * close else 0;
def Vol26 = if clause26 then volume * close else 0;
def Vol27 = if clause27 then volume * close else 0;
def Vol28 = if clause28 then volume * close else 0;
def Vol29 = if clause29 then volume * close else 0;
def Vol30 = if clause30 then volume * close else 0;
def Vol31 = if clause31 then volume * close else 0;
def Vol32 = if clause32 then volume * close else 0;
def Vol33 = if clause33 then volume * close else 0;
def Vol34 = if clause34 then volume * close else 0;
def Vol35 = if clause35 then volume * close else 0;
def Vol36 = if clause36 then volume * close else 0;
def Vol37 = if clause37 then volume * close else 0;
def Vol38 = if clause38 then volume * close else 0;
def Vol39 = if clause39 then volume * close else 0;
def Vol40 = if clause40 then volume * close else 0;
def Vol41 = if clause41 then volume * close else 0;
def Vol42 = if clause42 then volume * close else 0;
def Vol43 = if clause43 then volume * close else 0;
def Vol44 = if clause44 then volume * close else 0;
def Vol45 = if clause45 then volume * close else 0;
def Vol46 = if clause46 then volume * close else 0;
def Vol47 = if clause47 then volume * close else 0;
def Vol48 = if clause48 then volume * close else 0;
def Vol49 = if clause49 then volume * close else 0;
def Vol50 = if clause50 then volume * close else 0;
def Vol51 = if clause51 then volume * close else 0;
def Vol52 = if clause52 then volume * close else 0;
def Vol53 = if clause53 then volume * close else 0;
def Vol54 = if clause54 then volume * close else 0;
def Vol55 = if clause55 then volume * close else 0;
def Vol56 = if clause56 then volume * close else 0;
def Vol57 = if clause57 then volume * close else 0;
def Vol58 = if clause58 then volume * close else 0;
def Vol59 = if clause59 then volume * close else 0;
def Vol60 = if clause60 then volume * close else 0;
def Vol61 = if clause61 then volume * close else 0;
def Vol62 = if clause62 then volume * close else 0;
def Vol63 = if clause63 then volume * close else 0;
def Vol64 = if clause64 then volume * close else 0;
def Vol65 = if clause65 then volume * close else 0;
def Vol66 = if clause66 then volume * close else 0;
def Vol67 = if clause67 then volume * close else 0;
def Vol68 = if clause68 then volume * close else 0;
def Vol69 = if clause69 then volume * close else 0;
def Vol70 = if clause70 then volume * close else 0;
def Vol71 = if clause71 then volume * close else 0;
def Vol72 = if clause72 then volume * close else 0;
def Vol73 = if clause73 then volume * close else 0;
def Vol74 = if clause74 then volume * close else 0;
def Vol75 = if clause75 then volume * close else 0;
def Vol76 = if clause76 then volume * close else 0;
def Vol77 = if clause77 then volume * close else 0;
def Vol78 = if clause78 then volume * close else 0;
def Vol79 = if clause79 then volume * close else 0;
def Vol80 = if clause80 then volume * close else 0;
def Vol81 = if clause81 then volume * close else 0;
def Vol82 = if clause82 then volume * close else 0;
def Vol83 = if clause83 then volume * close else 0;
def Vol84 = if clause84 then volume * close else 0;
def Vol85 = if clause85 then volume * close else 0;
def Vol86 = if clause86 then volume * close else 0;
def Vol87 = if clause87 then volume * close else 0;
def Vol88 = if clause88 then volume * close else 0;
def Vol89 = if clause89 then volume * close else 0;
def Vol90 = if clause90 then volume * close else 0;
def Vol91 = if clause91 then volume * close else 0;
def Vol92 = if clause92 then volume * close else 0;
def Vol93 = if clause93 then volume * close else 0;
def Vol94 = if clause94 then volume * close else 0;
def Vol95 = if clause95 then volume * close else 0;
def Vol96 = if clause96 then volume * close else 0;


#Th old part of the code below where I did it manualy, this is back when there were only 16 time clauses


def VolAvg1 = MovingAverage(VolAverageType, Vol1,  AVL1);
def VolAvg2 = MovingAverage(VolAverageType, Vol1,  AVL2);
def VolAvg3 = MovingAverage(VolAverageType, Vol1,  AVL3);
def VolAvg4 = MovingAverage(VolAverageType, Vol1,  AVL4);
def VolAvg5 = MovingAverage(VolAverageType, Vol1,  AVL5);
def VolAvg6 = MovingAverage(VolAverageType, Vol1,  AVL6);
def VolAvg12 = MovingAverage(VolAverageType, Vol2,  AVL1);
def VolAvg22 = MovingAverage(VolAverageType, Vol2,  AVL2);
def VolAvg32 = MovingAverage(VolAverageType, Vol2,  AVL3);
def VolAvg42 = MovingAverage(VolAverageType, Vol2,  AVL4);
def VolAvg52 = MovingAverage(VolAverageType, Vol2,  AVL5);
def VolAvg62 = MovingAverage(VolAverageType, Vol2,  AVL6);
def VolAvg13 = MovingAverage(VolAverageType, Vol3,  AVL1);
def VolAvg23 = MovingAverage(VolAverageType, Vol3,  AVL2);
def VolAvg33 = MovingAverage(VolAverageType, Vol3,  AVL3);
def VolAvg43 = MovingAverage(VolAverageType, Vol3,  AVL4);
def VolAvg53 = MovingAverage(VolAverageType, Vol3,  AVL5);
def VolAvg63 = MovingAverage(VolAverageType, Vol3,  AVL6);
def VolAvg14 = MovingAverage(VolAverageType, Vol4,  AVL1);
def VolAvg24 = MovingAverage(VolAverageType, Vol4,  AVL2);
def VolAvg34 = MovingAverage(VolAverageType, Vol4,  AVL3);
def VolAvg44 = MovingAverage(VolAverageType, Vol4,  AVL4);
def VolAvg54 = MovingAverage(VolAverageType, Vol4,  AVL5);
def VolAvg64 = MovingAverage(VolAverageType, Vol4,  AVL6);
def VolAvg15 = MovingAverage(VolAverageType, Vol5,  AVL1);
def VolAvg25 = MovingAverage(VolAverageType, Vol5,  AVL2);
def VolAvg35 = MovingAverage(VolAverageType, Vol5,  AVL3);
def VolAvg45 = MovingAverage(VolAverageType, Vol5,  AVL4);
def VolAvg55 = MovingAverage(VolAverageType, Vol5,  AVL5);
def VolAvg65 = MovingAverage(VolAverageType, Vol5,  AVL6);
def VolAvg16 = MovingAverage(VolAverageType, Vol6,  AVL1);
def VolAvg26 = MovingAverage(VolAverageType, Vol6,  AVL2);
def VolAvg36 = MovingAverage(VolAverageType, Vol6,  AVL3);
def VolAvg46 = MovingAverage(VolAverageType, Vol6,  AVL4);
def VolAvg56 = MovingAverage(VolAverageType, Vol6,  AVL5);
def VolAvg66 = MovingAverage(VolAverageType, Vol6,  AVL6);
def VolAvg17 = MovingAverage(VolAverageType, Vol7,  AVL1);
def VolAvg27 = MovingAverage(VolAverageType, Vol7,  AVL2);
def VolAvg37 = MovingAverage(VolAverageType, Vol7,  AVL3);
def VolAvg47 = MovingAverage(VolAverageType, Vol7,  AVL4);
def VolAvg57 = MovingAverage(VolAverageType, Vol7,  AVL5);
def VolAvg67 = MovingAverage(VolAverageType, Vol7,  AVL6);
def VolAvg18 = MovingAverage(VolAverageType, Vol8,  AVL1);
def VolAvg28 = MovingAverage(VolAverageType, Vol8,  AVL2);
def VolAvg38 = MovingAverage(VolAverageType, Vol8,  AVL3);
def VolAvg48 = MovingAverage(VolAverageType, Vol8,  AVL4);
def VolAvg58 = MovingAverage(VolAverageType, Vol8,  AVL5);
def VolAvg68 = MovingAverage(VolAverageType, Vol8,  AVL6);
def VolAvg19 = MovingAverage(VolAverageType, Vol9,  AVL1);
def VolAvg29 = MovingAverage(VolAverageType, Vol9,  AVL2);
def VolAvg39 = MovingAverage(VolAverageType, Vol9,  AVL3);
def VolAvg49 = MovingAverage(VolAverageType, Vol9,  AVL4);
def VolAvg59 = MovingAverage(VolAverageType, Vol9,  AVL5);
def VolAvg69 = MovingAverage(VolAverageType, Vol9,  AVL6);
def VolAvg110 = MovingAverage(VolAverageType, Vol10,  AVL1);
def VolAvg210 = MovingAverage(VolAverageType, Vol10,  AVL2);
def VolAvg310 = MovingAverage(VolAverageType, Vol10,  AVL3);
def VolAvg410 = MovingAverage(VolAverageType, Vol10,  AVL4);
def VolAvg510 = MovingAverage(VolAverageType, Vol10,  AVL5);
def VolAvg610 = MovingAverage(VolAverageType, Vol10,  AVL6);
def VolAvg111 = MovingAverage(VolAverageType, Vol11,  AVL1);
def VolAvg211 = MovingAverage(VolAverageType, Vol11,  AVL2);
def VolAvg311 = MovingAverage(VolAverageType, Vol11,  AVL3);
def VolAvg411 = MovingAverage(VolAverageType, Vol11,  AVL4);
def VolAvg511 = MovingAverage(VolAverageType, Vol11,  AVL5);
def VolAvg611 = MovingAverage(VolAverageType, Vol11,  AVL6);
def VolAvg112 = MovingAverage(VolAverageType, Vol12,  AVL1);
def VolAvg212 = MovingAverage(VolAverageType, Vol12,  AVL2);
def VolAvg312 = MovingAverage(VolAverageType, Vol12,  AVL3);
def VolAvg412 = MovingAverage(VolAverageType, Vol12,  AVL4);
def VolAvg512 = MovingAverage(VolAverageType, Vol12,  AVL5);
def VolAvg612 = MovingAverage(VolAverageType, Vol12,  AVL6);
def VolAvg113 = MovingAverage(VolAverageType, Vol13,  AVL1);
def VolAvg213 = MovingAverage(VolAverageType, Vol13,  AVL2);
def VolAvg313 = MovingAverage(VolAverageType, Vol13,  AVL3);
def VolAvg413 = MovingAverage(VolAverageType, Vol13,  AVL4);
def VolAvg513 = MovingAverage(VolAverageType, Vol13,  AVL5);
def VolAvg613 = MovingAverage(VolAverageType, Vol13,  AVL6);
def VolAvg114 = MovingAverage(VolAverageType, Vol14,  AVL1);
def VolAvg214 = MovingAverage(VolAverageType, Vol14,  AVL2);
def VolAvg314 = MovingAverage(VolAverageType, Vol14,  AVL3);
def VolAvg414 = MovingAverage(VolAverageType, Vol14,  AVL4);
def VolAvg514 = MovingAverage(VolAverageType, Vol14,  AVL5);
def VolAvg614 = MovingAverage(VolAverageType, Vol14,  AVL6);
def VolAvg115 = MovingAverage(VolAverageType, Vol15,  AVL1);
def VolAvg215 = MovingAverage(VolAverageType, Vol15,  AVL2);
def VolAvg315 = MovingAverage(VolAverageType, Vol15,  AVL3);
def VolAvg415 = MovingAverage(VolAverageType, Vol15,  AVL4);
def VolAvg515 = MovingAverage(VolAverageType, Vol15,  AVL5);
def VolAvg615 = MovingAverage(VolAverageType, Vol15,  AVL6);
def VolAvg116 = MovingAverage(VolAverageType, Vol16,  AVL1);
def VolAvg216 = MovingAverage(VolAverageType, Vol16,  AVL2);
def VolAvg316 = MovingAverage(VolAverageType, Vol16,  AVL3);
def VolAvg416 = MovingAverage(VolAverageType, Vol16,  AVL4);
def VolAvg516 = MovingAverage(VolAverageType, Vol16,  AVL5);
def VolAvg616 = MovingAverage(VolAverageType, Vol16,  AVL6);
def VolAvg117 = MovingAverage(VolAverageType, Vol17,  AVL1);
def VolAvg217 = MovingAverage(VolAverageType, Vol17,  AVL2);
def VolAvg317 = MovingAverage(VolAverageType, Vol17,  AVL3);
def VolAvg417 = MovingAverage(VolAverageType, Vol17,  AVL4);
def VolAvg517 = MovingAverage(VolAverageType, Vol17,  AVL5);
def VolAvg617 = MovingAverage(VolAverageType, Vol17,  AVL6);
def VolAvg118 = MovingAverage(VolAverageType, Vol18,  AVL1);
def VolAvg218 = MovingAverage(VolAverageType, Vol18,  AVL2);
def VolAvg318 = MovingAverage(VolAverageType, Vol18,  AVL3);
def VolAvg418 = MovingAverage(VolAverageType, Vol18,  AVL4);
def VolAvg518 = MovingAverage(VolAverageType, Vol18,  AVL5);
def VolAvg618 = MovingAverage(VolAverageType, Vol18,  AVL6);
def VolAvg119 = MovingAverage(VolAverageType, Vol19,  AVL1);
def VolAvg219 = MovingAverage(VolAverageType, Vol19,  AVL2);
def VolAvg319 = MovingAverage(VolAverageType, Vol19,  AVL3);
def VolAvg419 = MovingAverage(VolAverageType, Vol19,  AVL4);
def VolAvg519 = MovingAverage(VolAverageType, Vol19,  AVL5);
def VolAvg619 = MovingAverage(VolAverageType, Vol19,  AVL6);
def VolAvg120 = MovingAverage(VolAverageType, Vol20,  AVL1);
def VolAvg220 = MovingAverage(VolAverageType, Vol20,  AVL2);
def VolAvg320 = MovingAverage(VolAverageType, Vol20,  AVL3);
def VolAvg420 = MovingAverage(VolAverageType, Vol20,  AVL4);
def VolAvg520 = MovingAverage(VolAverageType, Vol20,  AVL5);
def VolAvg620 = MovingAverage(VolAverageType, Vol20,  AVL6);
def VolAvg121 = MovingAverage(VolAverageType, Vol21,  AVL1);
def VolAvg221 = MovingAverage(VolAverageType, Vol21,  AVL2);
def VolAvg321 = MovingAverage(VolAverageType, Vol21,  AVL3);
def VolAvg421 = MovingAverage(VolAverageType, Vol21,  AVL4);
def VolAvg521 = MovingAverage(VolAverageType, Vol21,  AVL5);
def VolAvg621 = MovingAverage(VolAverageType, Vol21,  AVL6);
def VolAvg122 = MovingAverage(VolAverageType, Vol22,  AVL1);
def VolAvg222 = MovingAverage(VolAverageType, Vol22,  AVL2);
def VolAvg322 = MovingAverage(VolAverageType, Vol22,  AVL3);
def VolAvg422 = MovingAverage(VolAverageType, Vol22,  AVL4);
def VolAvg522 = MovingAverage(VolAverageType, Vol22,  AVL5);
def VolAvg622 = MovingAverage(VolAverageType, Vol22,  AVL6);
def VolAvg123 = MovingAverage(VolAverageType, Vol23,  AVL1);
def VolAvg223 = MovingAverage(VolAverageType, Vol23,  AVL2);
def VolAvg323 = MovingAverage(VolAverageType, Vol23,  AVL3);
def VolAvg423 = MovingAverage(VolAverageType, Vol23,  AVL4);
def VolAvg523 = MovingAverage(VolAverageType, Vol23,  AVL5);
def VolAvg623 = MovingAverage(VolAverageType, Vol23,  AVL6);
def VolAvg124 = MovingAverage(VolAverageType, Vol24,  AVL1);
def VolAvg224 = MovingAverage(VolAverageType, Vol24,  AVL2);
def VolAvg324 = MovingAverage(VolAverageType, Vol24,  AVL3);
def VolAvg424 = MovingAverage(VolAverageType, Vol24,  AVL4);
def VolAvg524 = MovingAverage(VolAverageType, Vol24,  AVL5);
def VolAvg624 = MovingAverage(VolAverageType, Vol24,  AVL6);

def VAL1 = ((VolAvg1 + VolAvg2 + VolAvg3 + VolAvg4 + VolAvg5 + VolAvg6) / 6);
def VAL2 = ((VolAvg12 + VolAvg22 + VolAvg32 + VolAvg42 + VolAvg52 + VolAvg62) / 6);
def VAL3 = ((VolAvg13 + VolAvg23 + VolAvg33 + VolAvg43 + VolAvg53 + VolAvg63) / 6);
def VAL4 = ((VolAvg14 + VolAvg24 + VolAvg34 + VolAvg44 + VolAvg54 + VolAvg64) / 6);
def VAL5 = ((VolAvg15 + VolAvg25 + VolAvg35 + VolAvg45 + VolAvg55 + VolAvg65) / 6);
def VAL6 = ((VolAvg16 + VolAvg26 + VolAvg36 + VolAvg46 + VolAvg56 + VolAvg66) / 6);
def VAL7 = ((VolAvg17 + VolAvg27 + VolAvg37 + VolAvg47 + VolAvg57 + VolAvg67) / 6);
def VAL8 = ((VolAvg18 + VolAvg28 + VolAvg38 + VolAvg48 + VolAvg58 + VolAvg68) / 6);
def VAL9 = ((VolAvg19 + VolAvg29 + VolAvg39 + VolAvg49 + VolAvg59 + VolAvg69) / 6);
def VAL10 = ((VolAvg110 + VolAvg210 + VolAvg310 + VolAvg410 + VolAvg510 + VolAvg610) / 6);
def VAL11 = ((VolAvg111 + VolAvg211 + VolAvg311 + VolAvg411 + VolAvg511 + VolAvg611) / 6);
def VAL12 = ((VolAvg112 + VolAvg212 + VolAvg312 + VolAvg412 + VolAvg512 + VolAvg612) / 6);
def VAL13 = ((VolAvg113 + VolAvg213 + VolAvg313 + VolAvg413 + VolAvg513 + VolAvg613) / 6);
def VAL14 = ((VolAvg114 + VolAvg214 + VolAvg314 + VolAvg414 + VolAvg514 + VolAvg614) / 6);
def VAL15 = ((VolAvg115 + VolAvg215 + VolAvg315 + VolAvg415 + VolAvg515 + VolAvg615) / 6);
def VAL16 = ((VolAvg116 + VolAvg216 + VolAvg316 + VolAvg416 + VolAvg516 + VolAvg616) / 6);
def VAL17 = ((VolAvg117 + VolAvg217 + VolAvg317 + VolAvg417 + VolAvg517 + VolAvg617) / 6);
def VAL18 = ((VolAvg118 + VolAvg218 + VolAvg318 + VolAvg418 + VolAvg518 + VolAvg618) / 6);
def VAL19 = ((VolAvg119 + VolAvg219 + VolAvg319 + VolAvg419 + VolAvg519 + VolAvg619) / 6);
plot VAL20 = ((VolAvg120 + VolAvg220 + VolAvg320 + VolAvg420 + VolAvg520 + VolAvg620) / 6);
plot VAL21 = ((VolAvg121 + VolAvg221 + VolAvg321 + VolAvg421 + VolAvg521 + VolAvg621) / 6);
def VAL22 = ((VolAvg122 + VolAvg222 + VolAvg322 + VolAvg422 + VolAvg522 + VolAvg622) / 6);
def VAL23 = ((VolAvg123 + VolAvg223 + VolAvg323 + VolAvg423 + VolAvg523 + VolAvg623) / 6);
def VAL24 = ((VolAvg124 + VolAvg224 + VolAvg324 + VolAvg424 + VolAvg524 + VolAvg624) / 6);



def Num_Dev1 = (3 );
def Num_Dev2 = (3 );
def Num_Dev3 = (3 );
def Num_Dev4 = (3 );
def Num_Dev5 = (3 );
def Num_Dev6 = (3 );
def Num_Dev7 = (3 );
def Num_Dev8 = (3 );
def Num_Dev9 = (3 );
def Num_Dev10 = (3 );
def Num_Dev11 = (3 );
def Num_Dev12 = (3 );
def Num_Dev13 = (3 );
def Num_Dev14 = (3 );
def Num_Dev15 = (3 );
def Num_Dev16 = (3 );
def Num_Dev17 = (3 );
def Num_Dev18 = (3 );
def Num_Dev19 = (3 );
def Num_Dev20 = (3 );
def Num_Dev21 = (3 );
def Num_Dev22 = (3 );
def Num_Dev23 = (3 );
def Num_Dev24 = (3 );



def sDev1 = StDev(data = Vol1, length = AVL1);
def sDev2 = StDev(data = Vol1, length = AVL2);
def sDev3 = StDev(data = Vol1, length = AVL3);
def sDev4 = StDev(data = Vol1, length = AVL4);
def sDev5 = StDev(data = Vol1, length = AVL5);
def sDev6 = StDev(data = Vol1, length = AVL6);
def sDev12 = StDev(data = Vol2, length = AVL1);
def sDev22 = StDev(data = Vol2, length = AVL2);
def sDev32 = StDev(data = Vol2, length = AVL3);
def sDev42 = StDev(data = Vol2, length = AVL4);
def sDev52 = StDev(data = Vol2, length = AVL5);
def sDev62 = StDev(data = Vol2, length = AVL6);
def sDev13 = StDev(data = Vol3, length = AVL1);
def sDev23 = StDev(data = Vol3, length = AVL2);
def sDev33 = StDev(data = Vol3, length = AVL3);
def sDev43 = StDev(data = Vol3, length = AVL4);
def sDev53 = StDev(data = Vol3, length = AVL5);
def sDev63 = StDev(data = Vol3, length = AVL6);
def sDev14 = StDev(data = Vol4, length = AVL1);
def sDev24 = StDev(data = Vol4, length = AVL2);
def sDev34 = StDev(data = Vol4, length = AVL3);
def sDev44 = StDev(data = Vol4, length = AVL4);
def sDev54 = StDev(data = Vol4, length = AVL5);
def sDev64 = StDev(data = Vol4, length = AVL6);
def sDev15 = StDev(data = Vol5, length = AVL1);
def sDev25 = StDev(data = Vol5, length = AVL2);
def sDev35 = StDev(data = Vol5, length = AVL3);
def sDev45 = StDev(data = Vol5, length = AVL4);
def sDev55 = StDev(data = Vol5, length = AVL5);
def sDev65 = StDev(data = Vol5, length = AVL6);
def sDev16 = StDev(data = Vol6, length = AVL1);
def sDev26 = StDev(data = Vol6, length = AVL2);
def sDev36 = StDev(data = Vol6, length = AVL3);
def sDev46 = StDev(data = Vol6, length = AVL4);
def sDev56 = StDev(data = Vol6, length = AVL5);
def sDev66 = StDev(data = Vol6, length = AVL6);
def sDev17 = StDev(data = Vol7, length = AVL1);
def sDev27 = StDev(data = Vol7, length = AVL2);
def sDev37 = StDev(data = Vol7, length = AVL3);
def sDev47 = StDev(data = Vol7, length = AVL4);
def sDev57 = StDev(data = Vol7, length = AVL5);
def sDev67 = StDev(data = Vol7, length = AVL6);
def sDev18 = StDev(data = Vol8, length = AVL1);
def sDev28 = StDev(data = Vol8, length = AVL2);
def sDev38 = StDev(data = Vol8, length = AVL3);
def sDev48 = StDev(data = Vol8, length = AVL4);
def sDev58 = StDev(data = Vol8, length = AVL5);
def sDev68 = StDev(data = Vol8, length = AVL6);
def sDev19 = StDev(data = Vol9, length = AVL1);
def sDev29 = StDev(data = Vol9, length = AVL2);
def sDev39 = StDev(data = Vol9, length = AVL3);
def sDev49 = StDev(data = Vol9, length = AVL4);
def sDev59 = StDev(data = Vol9, length = AVL5);
def sDev69 = StDev(data = Vol9, length = AVL6);
def sDev110 = StDev(data = Vol10, length = AVL1);
def sDev210 = StDev(data = Vol10, length = AVL2);
def sDev310 = StDev(data = Vol10, length = AVL3);
def sDev410 = StDev(data = Vol10, length = AVL4);
def sDev510 = StDev(data = Vol10, length = AVL5);
def sDev610 = StDev(data = Vol10, length = AVL6);
def sDev111 = StDev(data = Vol11, length = AVL1);
def sDev211 = StDev(data = Vol11, length = AVL2);
def sDev311 = StDev(data = Vol11, length = AVL3);
def sDev411 = StDev(data = Vol11, length = AVL4);
def sDev511 = StDev(data = Vol11, length = AVL5);
def sDev611 = StDev(data = Vol11, length = AVL6);
def sDev122 = StDev(data = Vol12, length = AVL1);
def sDev222 = StDev(data = Vol12, length = AVL2);
def sDev322 = StDev(data = Vol12, length = AVL3);
def sDev422 = StDev(data = Vol12, length = AVL4);
def sDev522 = StDev(data = Vol12, length = AVL5);
def sDev622 = StDev(data = Vol12, length = AVL6);
def sDev133 = StDev(data = Vol13, length = AVL1);
def sDev233 = StDev(data = Vol13, length = AVL2);
def sDev333 = StDev(data = Vol13, length = AVL3);
def sDev433 = StDev(data = Vol13, length = AVL4);
def sDev533 = StDev(data = Vol13, length = AVL5);
def sDev633 = StDev(data = Vol13, length = AVL6);
def sDev144 = StDev(data = Vol14, length = AVL1);
def sDev244 = StDev(data = Vol14, length = AVL2);
def sDev344 = StDev(data = Vol14, length = AVL3);
def sDev444 = StDev(data = Vol14, length = AVL4);
def sDev544 = StDev(data = Vol14, length = AVL5);
def sDev644 = StDev(data = Vol14, length = AVL6);
def sDev155 = StDev(data = Vol15, length = AVL1);
def sDev255 = StDev(data = Vol15, length = AVL2);
def sDev355 = StDev(data = Vol15, length = AVL3);
def sDev455 = StDev(data = Vol15, length = AVL4);
def sDev555 = StDev(data = Vol15, length = AVL5);
def sDev655 = StDev(data = Vol15, length = AVL6);
def sDev166 = StDev(data = Vol16, length = AVL1);
def sDev266 = StDev(data = Vol16, length = AVL2);
def sDev366 = StDev(data = Vol16, length = AVL3);
def sDev466 = StDev(data = Vol16, length = AVL4);
def sDev566 = StDev(data = Vol16, length = AVL5);
def sDev666 = StDev(data = Vol16, length = AVL6);
def sDev177 = StDev(data = Vol17, length = AVL1);
def sDev277 = StDev(data = Vol17, length = AVL2);
def sDev377 = StDev(data = Vol17, length = AVL3);
def sDev477 = StDev(data = Vol17, length = AVL4);
def sDev577 = StDev(data = Vol17, length = AVL5);
def sDev677 = StDev(data = Vol17, length = AVL6);
def sDev188 = StDev(data = Vol18, length = AVL1);
def sDev288 = StDev(data = Vol18, length = AVL2);
def sDev388 = StDev(data = Vol18, length = AVL3);
def sDev488 = StDev(data = Vol18, length = AVL4);
def sDev588 = StDev(data = Vol18, length = AVL5);
def sDev688 = StDev(data = Vol18, length = AVL6);
def sDev199 = StDev(data = Vol19, length = AVL1);
def sDev299 = StDev(data = Vol19, length = AVL2);
def sDev399 = StDev(data = Vol19, length = AVL3);
def sDev499 = StDev(data = Vol19, length = AVL4);
def sDev599 = StDev(data = Vol19, length = AVL5);
def sDev699 = StDev(data = Vol19, length = AVL6);
def sDev120 = StDev(data = Vol20, length = AVL1);
def sDev220 = StDev(data = Vol20, length = AVL2);
def sDev320 = StDev(data = Vol20, length = AVL3);
def sDev420 = StDev(data = Vol20, length = AVL4);
def sDev520 = StDev(data = Vol20, length = AVL5);
def sDev620 = StDev(data = Vol20, length = AVL6);
def sDev121 = StDev(data = Vol21, length = AVL1);
def sDev221 = StDev(data = Vol21, length = AVL2);
def sDev321 = StDev(data = Vol21, length = AVL3);
def sDev421 = StDev(data = Vol21, length = AVL4);
def sDev521 = StDev(data = Vol21, length = AVL5);
def sDev621 = StDev(data = Vol21, length = AVL6);
def sDev1222 = StDev(data = Vol22, length = AVL1);
def sDev2222 = StDev(data = Vol22, length = AVL2);
def sDev3222 = StDev(data = Vol22, length = AVL3);
def sDev4222 = StDev(data = Vol22, length = AVL4);
def sDev5222 = StDev(data = Vol22, length = AVL5);
def sDev6222 = StDev(data = Vol22, length = AVL6);
def sDev123 = StDev(data = Vol23, length = AVL1);
def sDev223 = StDev(data = Vol23, length = AVL2);
def sDev323 = StDev(data = Vol23, length = AVL3);
def sDev423 = StDev(data = Vol23, length = AVL4);
def sDev523 = StDev(data = Vol23, length = AVL5);
def sDev623 = StDev(data = Vol23, length = AVL6);
def sDev124 = StDev(data = Vol24, length = AVL1);
def sDev224 = StDev(data = Vol24, length = AVL2);
def sDev324 = StDev(data = Vol24, length = AVL3);
def sDev424 = StDev(data = Vol24, length = AVL4);
def sDev524 = StDev(data = Vol24, length = AVL5);
def sDev624 = StDev(data = Vol24, length = AVL6);


def allsdev1 = (sDev1 + sDev2 + sDev3 + sDev4 + sDev5 + sDev6) / 6;
def allsdev2 = (sDev12 + sDev22 + sDev32 + sDev42 + sDev52 + sDev62) / 6;
def allsdev3 = (sDev13 + sDev23 + sDev33 + sDev43 + sDev53 + sDev63) / 6;
def allsdev4 = (sDev14 + sDev24 + sDev34 + sDev44 + sDev54 + sDev64) / 6;
def allsdev5 = (sDev15 + sDev25 + sDev35 + sDev45 + sDev55 + sDev65) / 6;
def allsdev6 = (sDev16 + sDev26 + sDev36 + sDev46 + sDev56 + sDev66) / 6;
def allsdev7 = (sDev17 + sDev27 + sDev37 + sDev47 + sDev57 + sDev67) / 6;
def allsdev8 = (sDev18 + sDev28 + sDev38 + sDev48 + sDev58 + sDev68) / 6;
def allsdev9 = (sDev19 + sDev29 + sDev39 + sDev49 + sDev59 + sDev69) / 6;
def allsdev10 = (sDev110 + sDev210 + sDev310 + sDev410 + sDev510 + sDev610) / 6;
def allsdev11 = (sDev111 + sDev211 + sDev311 + sDev411 + sDev511 + sDev611) / 6;
def allsdev12 = (sDev122 + sDev222 + sDev322 + sDev422 + sDev522 + sDev622) / 6;
def allsdev13 = (sDev133 + sDev233 + sDev333 + sDev433 + sDev533 + sDev633) / 6;
def allsdev14 = (sDev144 + sDev244 + sDev344 + sDev444 + sDev544 + sDev644) / 6;
def allsdev15 = (sDev155 + sDev255 + sDev355 + sDev455 + sDev555 + sDev655) / 6;
def allsdev16 = (sDev166 + sDev266 + sDev366 + sDev466 + sDev566 + sDev666) / 6;
def allsdev17 = (sDev177 + sDev277 + sDev377 + sDev477 + sDev577 + sDev677) / 6;
def allsdev18 = (sDev188 + sDev288 + sDev388 + sDev488 + sDev588 + sDev688) / 6;
def allsdev19 = (sDev199 + sDev299 + sDev399 + sDev499 + sDev599 + sDev699) / 6;
plot allsdev20 = (sDev120 + sDev220 + sDev320 + sDev420 + sDev520 + sDev620) / 6;
plot allsdev21 = (sDev121 + sDev221 + sDev321 + sDev421 + sDev521 + sDev621) / 6;
def allsdev22 = (sDev1222 + sDev2222 + sDev3222 + sDev4222 + sDev5222 + sDev6222) / 6;
plot allsdev23 = (sDev123 + sDev223 + sDev323 + sDev423 + sDev523 + sDev623) / 6;
plot allsdev24 = (sDev124 + sDev224 + sDev324 + sDev424 + sDev524 + sDev624) / 6;

def vsig1 = VAL1 + Num_Dev1 * allsdev1;
def vsig2 = VAL2 + Num_Dev2 * allsdev2;
def vsig3 = VAL3 + Num_Dev3 * allsdev3;
def vsig4 = VAL4 + Num_Dev4 * allsdev4;
def vsig5 = VAL5 + Num_Dev5 * allsdev5;
def vsig6 = VAL6 + Num_Dev6 * allsdev6;
def vsig7 = VAL7 + Num_Dev7 * allsdev7;
def vsig8 = VAL8 + Num_Dev8 * allsdev8;
def vsig9 = VAL9 + Num_Dev9 * allsdev9;
def vsig10 = VAL10 + Num_Dev10 * allsdev10;
def vsig11 = VAL11 + Num_Dev11 * allsdev11;
def vsig12 = VAL12 + Num_Dev12 * allsdev12;
def vsig13 = VAL13 + Num_Dev13 * allsdev13;
def vsig14 = VAL14 + Num_Dev14 * allsdev14;
def vsig15 = VAL15 + Num_Dev15 * allsdev15;
def vsig16 = VAL16 + Num_Dev16 * allsdev16;
def vsig17 = VAL17 + Num_Dev17 * allsdev17;
def vsig18 = VAL18 + Num_Dev18 * allsdev18;
def vsig19 = VAL19 + Num_Dev19 * allsdev19;
plot vsig20 = VAL20 + Num_Dev20 * allsdev20;
plot vsig21 = VAL21 + Num_Dev21 * allsdev21;
def vsig22 = VAL22 + Num_Dev22 * allsdev22;
def vsig23 = VAL23 + Num_Dev23 * allsdev23;
def vsig24 = VAL24 + Num_Dev24 * allsdev24;





def canful = (low + close) / 2;
def canful2 = (high + close) / 2;

def volmult1 = if clause1 then ((Vol1 / (vsig1[8]) * (Vol1 / (vsig1[8]))) / (Vol1 / (vsig1[8]))) else 0;
def volmult2 = if clause2 then ((Vol2 / (vsig2[8]) * (Vol2 / (vsig2[8]))) / (Vol2 / (vsig2[8]))) else 0;
def volmult3 = if clause3 then ((Vol3 / (vsig3[8]) * (Vol3 / (vsig3[8]))) / (Vol3 / (vsig3[8]))) else 0;
def volmult4 = if clause4 then ((Vol4 / (vsig4[8]) * (Vol4 / (vsig4[8]))) / (Vol4 / (vsig4[8]))) else 0;
def volmult5 = if clause5 then ((Vol5 / (vsig5[8]) * (Vol5 / (vsig5[8]))) / (Vol5 / (vsig5[8]))) else 0;
def volmult6 = if clause6 then ((Vol6 / (vsig6[8]) * (Vol6 / (vsig6[8]))) / (Vol6 / (vsig6[8]))) else 0;
def volmult7 = if clause7 then ((Vol7 / (vsig7[8]) * (Vol7 / (vsig7[8]))) / (Vol7 / (vsig7[8]))) else 0;
def volmult8 = if clause8 then ((Vol8 / (vsig8[8]) * (Vol8 / (vsig8[8]))) / (Vol8 / (vsig8[8]))) else 0;
def volmult9 = if clause9 then ((Vol9 / (vsig9[8]) * (Vol9 / (vsig9[8]))) / (Vol9 / (vsig9[8]))) else 0;
def volmult10 = if clause10 then ((Vol10 / (vsig10[8]) * (Vol10 / (vsig10[8]))) / (Vol10 / (vsig10[8]))) else 0;
def volmult11 = if clause11 then ((Vol11 / (vsig11[8]) * (Vol11 / (vsig11[8]))) / (Vol11 / (vsig11[8]))) else 0;
def volmult12 = if clause12 then ((Vol12 / (vsig12[8]) * (Vol12 / (vsig12[8]))) / (Vol12 / (vsig12[8]))) else 0;
def volmult13 = if clause13 then ((Vol13 / (vsig13[8]) * (Vol13 / (vsig13[8]))) / (Vol13 / (vsig13[8]))) else 0;
def volmult14 = if clause14 then ((Vol14 / (vsig14[8]) * (Vol14 / (vsig14[8]))) / (Vol14 / (vsig14[8]))) else 0;
def volmult15 = if clause15 then ((Vol15 / (vsig15[8]) * (Vol15 / (vsig15[8]))) / (Vol15 / (vsig15[8]))) else 0;
def volmult16 = if clause16 then ((Vol16 / (vsig16[8]) * (Vol16 / (vsig16[8]))) / (Vol16 / (vsig16[8]))) else 0;
def volmult17 = if clause17 then ((Vol17 / (vsig17[8]) * (Vol17 / (vsig17[8]))) / (Vol17 / (vsig17[8]))) else 0;
def volmult18 = if clause18 then ((Vol18 / (vsig18[8]) * (Vol18 / (vsig18[8]))) / (Vol18 / (vsig18[8]))) else 0;
def volmult19 = if clause19 then ((Vol19 / (vsig19[8]) * (Vol19 / (vsig19[8]))) / (Vol19 / (vsig19[8]))) else 0;
def volmult20 = if clause20 then ((Vol20 / (vsig20[8]) * (Vol20 / (vsig20[8]))) / (Vol20 / (vsig20[8]))) else 0;
def volmult21 = if clause21 then ((Vol21 / (vsig21[8]) * (Vol21 / (vsig21[8]))) / (Vol21 / (vsig21[8]))) else 0;
def volmult22 = if clause22 then ((Vol22 / (vsig22[8]) * (Vol22 / (vsig22[8]))) / (Vol22 / (vsig22[8]))) else 0;
def volmult23 = if clause23 then ((Vol23 / (vsig23[8]) * (Vol23 / (vsig23[8]))) / (Vol23 / (vsig23[8]))) else 0;
def volmult24 = if clause24 then ((Vol24 / (vsig24[8]) * (Vol24 / (vsig24[8]))) / (Vol24 / (vsig24[8]))) else 0;



plot comb = (volmult1 + volmult2 + volmult3 + volmult4 + volmult5 + volmult6 + volmult7 + volmult8 + volmult9 + volmult10 + volmult11 + volmult12 + volmult13 + volmult14 + volmult15 + volmult16 + volmult17 + volmult18 + volmult19 + volmult20 + volmult21 + volmult22 + volmult23 + volmult24);





script relvol {
input xi = 12; #?

input VolAverageType = AverageType.WILDERS;

def AVL1 = 60;
def AVL2 = 120;
def AVL3 = 250;
def AVL4 = 400;
def AVL5 = 600;
def AVL6 = 1500;

def VM = (((MovingAverage(VolAverageType, xi,  AVL1) + MovingAverage(VolAverageType, xi,  AVL2) + MovingAverage(VolAverageType, xi,  AVL3) + MovingAverage(VolAverageType, xi,  AVL4) + MovingAverage(VolAverageType, xi,  AVL5) + MovingAverage(VolAverageType, xi,  AVL6)) / 6) * (StDev(data = xi, length = AVL1) + StDev(data = xi, length = AVL2) + StDev(data = xi, length = AVL3) + StDev(data = xi, length = AVL4) + StDev(data = xi, length = AVL5) + StDev(data = xi, length = AVL6) / 6) * 3);

plot vmp = if xi > 0 then ((xi / (VM[8]) * (xi / (VM[8]))) / (xi / (VM[8]))) else 0;
}

You can see the I did it manually in the old part of the code and on the bottom is my attempt at condensing it.
 

MatthewA

Active member
Hello @YungTraderFromMontana you are doing well with the switch function.

I continued some volume projects after our friend @Welkin left... and what I learned is volume has different behaviors that are hard to be certain of. Like okay there is high volume at a certain point and let us suppose that price passes that Support _ or _ Resistance line... Well how do we guess how much volume is needed to continue higher before price begins to return to VWAP?

I will try a relative volume as well without Wilders averages I think. I am exhausted tonight but will have time this weekend of course.
A group call might be fun you can invite your friends who may have opinions about this... @mashume @germanburrito @sniktau
 

MatthewA

Active member
@sniktau it is nice to meet you I searched some keywords and you seem to enjoy mathematics as well. https://usethinkscript.com/threads/local-hurst-exponent-for-thinkorswim.2480/

@YungTraderFromMontana @mashume @germanburrito you gentlemen may wish to replace relative volume instead of the one above.
You do not need to walk off each time span [def clause = SecondsFromTime(xxxx) >= 0 and SecondsFromTime(xxxx) <= 0;]
Because Whatever time you want to wish to consider will always move in even increments. So 5minutes? ?5hours? 5days? It will not matter because GetTime() will always show your current time increment

There are limitations to the free solution shown I'm sharing below.
I am able to overcome with predictive machine learning volume studies: http://www2.wealth-lab.com/WL5Wiki/TASCApr2014.ashx

If you wish to contribute I will share a more advanced solution down the road, but you may enjoy the script below in the mean time.


Code:
script prior {

    input of = close;

    def priorOf = if of != of[1] then of[1] else priorOf[1];

    plot 

    prior = priorOf;

}

 

    # Variables

def v = volume;

def x = BarNumber();

def nan = Double.NaN;

def rteBar = if GetTime() crosses below RegularTradingStart(GetYYYYMMDD()) then 

               x else rteBar[1];

 

def priorRTEbar1 = prior(rteBar);

def priorRTEbar2 = prior(priorRTEbar1);

def priorRTEbar3 = prior(priorRTEbar2);

def priorRTEbar4 = prior(priorRTEbar3);

def priorRTEbar5 = prior(priorRTEbar4);

def priorRTEbar6 = prior(priorRTEbar5);

def priorRTEbar7 = prior(priorRTEbar6);

def priorRTEbar8 = prior(priorRTEbar7);

def priorRTEbar9 = prior(priorRTEbar8);

def priorRTEbar10 = prior(priorRTEbar9);

def pV1 = GetValue(v, rteBar - priorRTEbar1);

def pV2 = GetValue(v, rteBar - priorRTEbar2);

def pV3 = GetValue(v, rteBar - priorRTEbar3);

def pV4 = GetValue(v, rteBar - priorRTEbar4);

def pV5 = GetValue(v, rteBar - priorRTEbar5);

def pV6 = GetValue(v, rteBar - priorRTEbar6);

def pV7 = GetValue(v, rteBar - priorRTEbar7);

def pV8 = GetValue(v, rteBar - priorRTEbar8);

def pV9 = GetValue(v, rteBar - priorRTEbar9);

def pV10 = GetValue(v, rteBar - priorRTEbar10);

 

def avgPriorVol = (pV1 + pV2 + pV3 + pV4 + pV5 + 

                  pV6 + pV7 + pV8 + pV9 + pV10) / 10;

def relVol = v - avgPriorVol;

 

    # Plots

plot 

PositiveRelativeVolume = if relVol > 0 then relVol else nan;

PositiveRelativeVolume.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);

PositiveRelativeVolume.DefineColor("Strong Positive", Color.Cyan);

PositiveRelativeVolume.DefineColor("Weak Positive", Color.Blue);

PositiveRelativeVolume.AssignNormGradientColor(HighestAll(rteBar) - HighestAll(priorRTEBar1),

                                               PositiveRelativeVolume.Color("Weak Positive"),

                                               PositiveRelativeVolume.Color("Strong Positive"));

 

plot 

NegativeRelativeVolume = if relVol < 0 then relVol else nan;

NegativeRelativeVolume.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);

NegativeRelativeVolume.DefineColor("Strong Negative", Color.Yellow);

NegativeRelativeVolume.DefineColor("Weak Negative", Color.Dark_Orange);

NegativeRelativeVolume.AssignNormGradientColor(HighestAll(rteBar) -  HighestAll(priorRTEBar1),

                                               NegativeRelativeVolume.Color("Strong Negative"),

                                               NegativeRelativeVolume.Color("Weak Negative"));

 

declare hide_on_daily;

declare lower;
 

MatthewA

Active member
Awesome setup!

Could you share your grid, please?
No I cannot share the grid because it has other people's property in it.

Of course there is absolutely nothing at all stopping you from using that Yellow & Blue relative volume solution https://usethinkscript.com/threads/yungtraders-relative-volume.5243/post-49738 for your own applications...

I was asked to post the relative volume solution here instead of updating a work in progress.

@D_Tramp What would work better than the grid you see would be to take something like a VWAP and watch for a high relative volume while the price is crossing like a weekly or monthly VWAP... Or 200 moving average
 

germanburrito

Active member
this adds a filter i use it to gauge the possible strength of the move.


Code:
declare lower;

input averageType4 = AverageType.WILDERS;

input nightSessionFromMidnight = 0100;
input firstHourTrading = 0850;
input mainSession = 0959;
input nightSessionFromMainSessionEnd = 1559;
input paintBars = yes;

def clause1 = SecondsFromTime(0359) >= 0 and SecondsFromTime(0459) <= 0;
def clause2 = SecondsFromTime(0459) >= 0 and  SecondsFromTime(0559) <= 0;
def clause3 = (SecondsFromTime(0559) >= 0 and  SecondsFromTime(0659) <= 0);
def clause4 = (SecondsFromTime(0659) >= 0 and SecondsFromTime(0759) <= 0);
def clause5 = SecondsFromTime(0759) >= 0 and SecondsFromTime(0859) <= 0;
def clause6 = SecondsFromTime(0859) >= 0 and  SecondsFromTime(0959) <= 0;
def clause7 = (SecondsFromTime(0959) >= 0 and  SecondsFromTime(1059) <= 0);
def clause8 = (SecondsFromTime(1059) >= 0 and SecondsFromTime(1159) <= 0);
def clause9 = SecondsFromTime(1159) >= 0 and SecondsFromTime(1259) <= 0;
def clause10 = SecondsFromTime(1259) >= 0 and  SecondsFromTime(1359) <= 0;
def clause11 = (SecondsFromTime(1359) >= 0 and  SecondsFromTime(1459) <= 0);
def clause12 = (SecondsFromTime(1459) >= 0 and SecondsFromTime(1559) <= 0);
def clause13 = (SecondsFromTime(1559) >= 0 and SecondsFromTime(1659) <= 0);
def clause14 = SecondsFromTime(1659) >= 0 and SecondsFromTime(1759) <= 0;
def clause15 = SecondsFromTime(1759) >= 0 and  SecondsFromTime(1859) <= 0;
def clause16 = (SecondsFromTime(1859) >= 0 and  SecondsFromTime(1959) <= 0);

def isNightSessionFromMidnight = SecondsFromTime(nightSessionFromMidnight) >= 0 and SecondsTillTime(firstHourTrading) > 0;
def isFirstHourTrading = SecondsFromTime(firstHourTrading) >= 0 and SecondsTillTime(mainSession) > 0;
def isMainSession = SecondsFromTime(mainSession) >= 0 and SecondsTillTime(nightSessionFromMainSessionEnd) > 0;
def ah = SecondsFromTime(1659) > 0;
def newNightSessionFromMidnight = isNightSessionFromMidnight and !isNightSessionFromMidnight[1];
def cOvernightVolume = if newNightSessionFromMidnight then volume else if isNightSessionFromMidnight then cOvernightVolume[1] + volume else cOvernightVolume[1];





def AVL1 = 60;
def AVL2 = 120;
def AVL3 = 250;
def AVL4 = 400;
def AVL5 = 600;
def AVL6 = 1500;


input VolAverageType = AverageType.WILDERS;

# Selling Volume

def Vol1 = if clause1 then volume * close else 0;
def Vol2 = if clause2 then volume * close else 0;
def Vol3 = if clause3 then volume * close else 0;
def Vol4 = if clause4 then volume * close else 0;
def Vol5 = if clause5 then volume * close else 0;
def Vol6 = if clause6 then volume * close else 0;
def Vol7 = if clause7 then volume * close else 0;
def Vol8 = if clause8 then volume * close else 0;
def Vol9 = if clause9 then volume * close else 0;
def Vol10 = if clause10 then volume * close else 0;
def Vol11 = if clause11 then volume * close else 0;
def Vol12 = if clause12 then volume * close else 0;
def Vol13 = if clause13 then volume * close else 0;
def Vol14 = if clause14 then volume * close else 0;
def Vol15 = if clause15 then volume * close else 0;
def Vol16 = if clause16 then volume * close else 0;


def VolAvg1 = MovingAverage(VolAverageType, Vol1, AVL1);
def VolAvg2 = MovingAverage(VolAverageType, Vol1, AVL2);
def VolAvg3 = MovingAverage(VolAverageType, Vol1,  AVL3);
def VolAvg4 = MovingAverage(VolAverageType, Vol1,  AVL4);
def VolAvg5 = MovingAverage(VolAverageType, Vol1,  AVL5);
def VolAvg6 = MovingAverage(VolAverageType, Vol1,  AVL6);
def VolAvg12 = MovingAverage(VolAverageType, Vol2, AVL1);
def VolAvg22 = MovingAverage(VolAverageType, Vol2, AVL2);
def VolAvg32 = MovingAverage(VolAverageType, Vol2,  AVL3);
def VolAvg42 = MovingAverage(VolAverageType, Vol2,  AVL4);
def VolAvg52 = MovingAverage(VolAverageType, Vol2,  AVL5);
def VolAvg62 = MovingAverage(VolAverageType, Vol2,  AVL6);
def VolAvg13 = MovingAverage(VolAverageType, Vol3, AVL1);
def VolAvg23 = MovingAverage(VolAverageType, Vol3, AVL2);
def VolAvg33 = MovingAverage(VolAverageType, Vol3,  AVL3);
def VolAvg43 = MovingAverage(VolAverageType, Vol3,  AVL4);
def VolAvg53 = MovingAverage(VolAverageType, Vol3,  AVL5);
def VolAvg63 = MovingAverage(VolAverageType, Vol3,  AVL6);
def VolAvg14 = MovingAverage(VolAverageType, Vol4, AVL1);
def VolAvg24 = MovingAverage(VolAverageType, Vol4, AVL2);
def VolAvg34 = MovingAverage(VolAverageType, Vol4,  AVL3);
def VolAvg44 = MovingAverage(VolAverageType, Vol4,  AVL4);
def VolAvg54 = MovingAverage(VolAverageType, Vol4,  AVL5);
def VolAvg64 = MovingAverage(VolAverageType, Vol4,  AVL6);
def VolAvg15 = MovingAverage(VolAverageType, Vol5, AVL1);
def VolAvg25 = MovingAverage(VolAverageType, Vol5, AVL2);
def VolAvg35 = MovingAverage(VolAverageType, Vol5,  AVL3);
def VolAvg45 = MovingAverage(VolAverageType, Vol5,  AVL4);
def VolAvg55 = MovingAverage(VolAverageType, Vol5,  AVL5);
def VolAvg65 = MovingAverage(VolAverageType, Vol5,  AVL6);
def VolAvg16 = MovingAverage(VolAverageType, Vol6, AVL1);
def VolAvg26 = MovingAverage(VolAverageType, Vol6, AVL2);
def VolAvg36 = MovingAverage(VolAverageType, Vol6,  AVL3);
def VolAvg46 = MovingAverage(VolAverageType, Vol6,  AVL4);
def VolAvg56 = MovingAverage(VolAverageType, Vol6,  AVL5);
def VolAvg66 = MovingAverage(VolAverageType, Vol6,  AVL6);
def VolAvg17 = MovingAverage(VolAverageType, Vol7, AVL1);
def VolAvg27 = MovingAverage(VolAverageType, Vol7, AVL2);
def VolAvg37 = MovingAverage(VolAverageType, Vol7,  AVL3);
def VolAvg47 = MovingAverage(VolAverageType, Vol7,  AVL4);
def VolAvg57 = MovingAverage(VolAverageType, Vol7,  AVL5);
def VolAvg67 = MovingAverage(VolAverageType, Vol7,  AVL6);
def VolAvg18 = MovingAverage(VolAverageType, Vol8, AVL1);
def VolAvg28 = MovingAverage(VolAverageType, Vol8, AVL2);
def VolAvg38 = MovingAverage(VolAverageType, Vol8,  AVL3);
def VolAvg48 = MovingAverage(VolAverageType, Vol8,  AVL4);
def VolAvg58 = MovingAverage(VolAverageType, Vol8,  AVL5);
def VolAvg68 = MovingAverage(VolAverageType, Vol8,  AVL6);
def VolAvg19 = MovingAverage(VolAverageType, Vol9, AVL1);
def VolAvg29 = MovingAverage(VolAverageType, Vol9, AVL2);
def VolAvg39 = MovingAverage(VolAverageType, Vol9,  AVL3);
def VolAvg49 = MovingAverage(VolAverageType, Vol9,  AVL4);
def VolAvg59 = MovingAverage(VolAverageType, Vol9,  AVL5);
def VolAvg69 = MovingAverage(VolAverageType, Vol9,  AVL6);
def VolAvg110 = MovingAverage(VolAverageType, Vol10, AVL1);
def VolAvg210 = MovingAverage(VolAverageType, Vol10, AVL2);
def VolAvg310 = MovingAverage(VolAverageType, Vol10,  AVL3);
def VolAvg410 = MovingAverage(VolAverageType, Vol10,  AVL4);
def VolAvg510 = MovingAverage(VolAverageType, Vol10,  AVL5);
def VolAvg610 = MovingAverage(VolAverageType, Vol10,  AVL6);
def VolAvg111 = MovingAverage(VolAverageType, Vol11, AVL1);
def VolAvg211 = MovingAverage(VolAverageType, Vol11, AVL2);
def VolAvg311 = MovingAverage(VolAverageType, Vol11,  AVL3);
def VolAvg411 = MovingAverage(VolAverageType, Vol11,  AVL4);
def VolAvg511 = MovingAverage(VolAverageType, Vol11,  AVL5);
def VolAvg611 = MovingAverage(VolAverageType, Vol11,  AVL6);
def VolAvg112 = MovingAverage(VolAverageType, Vol12, AVL1);
def VolAvg212 = MovingAverage(VolAverageType, Vol12, AVL2);
def VolAvg312 = MovingAverage(VolAverageType, Vol12,  AVL3);
def VolAvg412 = MovingAverage(VolAverageType, Vol12,  AVL4);
def VolAvg512 = MovingAverage(VolAverageType, Vol12,  AVL5);
def VolAvg612 = MovingAverage(VolAverageType, Vol12,  AVL6);
def VolAvg113 = MovingAverage(VolAverageType, Vol13, AVL1);
def VolAvg213 = MovingAverage(VolAverageType, Vol13, AVL2);
def VolAvg313 = MovingAverage(VolAverageType, Vol13,  AVL3);
def VolAvg413 = MovingAverage(VolAverageType, Vol13,  AVL4);
def VolAvg513 = MovingAverage(VolAverageType, Vol13,  AVL5);
def VolAvg613 = MovingAverage(VolAverageType, Vol13,  AVL6);
def VolAvg114 = MovingAverage(VolAverageType, Vol4, AVL1);
def VolAvg214 = MovingAverage(VolAverageType, Vol4, AVL2);
def VolAvg314 = MovingAverage(VolAverageType, Vol14,  AVL3);
def VolAvg414 = MovingAverage(VolAverageType, Vol14,  AVL4);
def VolAvg514 = MovingAverage(VolAverageType, Vol14,  AVL5);
def VolAvg614 = MovingAverage(VolAverageType, Vol14,  AVL6);
def VolAvg115 = MovingAverage(VolAverageType, Vol15, AVL1);
def VolAvg215 = MovingAverage(VolAverageType, Vol15, AVL2);
def VolAvg315 = MovingAverage(VolAverageType, Vol15,  AVL3);
def VolAvg415 = MovingAverage(VolAverageType, Vol15,  AVL4);
def VolAvg515 = MovingAverage(VolAverageType, Vol15,  AVL5);
def VolAvg615 = MovingAverage(VolAverageType, Vol15,  AVL6);
def VolAvg116 = MovingAverage(VolAverageType, Vol16, AVL1);
def VolAvg216 = MovingAverage(VolAverageType, Vol16, AVL2);
def VolAvg316 = MovingAverage(VolAverageType, Vol16,  AVL3);
def VolAvg416 = MovingAverage(VolAverageType, Vol16,  AVL4);
def VolAvg516 = MovingAverage(VolAverageType, Vol16,  AVL5);
def VolAvg616 = MovingAverage(VolAverageType, Vol16,  AVL6);

def VAL1 = ((VolAvg1 + VolAvg2 + VolAvg3 + VolAvg4 + VolAvg5 + VolAvg6) / 6);
def VAL2 = ((VolAvg12 + VolAvg22 + VolAvg32 + VolAvg42 + VolAvg52 + VolAvg62) / 6);
def VAL3 = ((VolAvg13 + VolAvg23 + VolAvg33 + VolAvg43 + VolAvg53 + VolAvg63) / 6);
def VAL4 = ((VolAvg14 + VolAvg24 + VolAvg34 + VolAvg44 + VolAvg54 + VolAvg64) / 6);
def VAL5 = ((VolAvg15 + VolAvg25 + VolAvg35 + VolAvg45 + VolAvg55 + VolAvg65) / 6);
def VAL6 = ((VolAvg16 + VolAvg26 + VolAvg36 + VolAvg46 + VolAvg56 + VolAvg66) / 6);
def VAL7 = ((VolAvg17 + VolAvg27 + VolAvg37 + VolAvg47 + VolAvg57 + VolAvg67) / 6);
def VAL8 = ((VolAvg18 + VolAvg28 + VolAvg38 + VolAvg48 + VolAvg58 + VolAvg68) / 6);
def VAL9 = ((VolAvg19 + VolAvg29 + VolAvg39 + VolAvg49 + VolAvg59 + VolAvg69) / 6);
def VAL10 = ((VolAvg110 + VolAvg210 + VolAvg310 + VolAvg410 + VolAvg510 + VolAvg610) / 6);
def VAL11 = ((VolAvg111 + VolAvg211 + VolAvg311 + VolAvg411 + VolAvg511 + VolAvg611) / 6);
def VAL12 = ((VolAvg112 + VolAvg212 + VolAvg312 + VolAvg412 + VolAvg512 + VolAvg612) / 6);
def VAL13 = ((VolAvg113 + VolAvg213 + VolAvg313 + VolAvg413 + VolAvg513 + VolAvg613) / 6);
def VAL14 = ((VolAvg114 + VolAvg214 + VolAvg314 + VolAvg414 + VolAvg514 + VolAvg614) / 6);
def VAL15 = ((VolAvg115 + VolAvg215 + VolAvg315 + VolAvg415 + VolAvg515 + VolAvg615) / 6);
def VAL16 = ((VolAvg116 + VolAvg216 + VolAvg316 + VolAvg416 + VolAvg516 + VolAvg616) / 6);



def q = StandardDeviation(Vol1, 650) / ExpAverage(Vol1, 650);
def qq = StandardDeviation(Vol1, 100) / ExpAverage(Vol1, 100);
def qqq = StandardDeviation(Vol1, 1000) / ExpAverage(Vol1, 1000);
def qa = (q + qq + qqq) / 3;
def w = StandardDeviation(Vol2, 650) / ExpAverage(Vol2, 650);
def ww = StandardDeviation(Vol2, 100) / ExpAverage(Vol2, 100);
def www = StandardDeviation(Vol2, 1000) / ExpAverage(Vol2, 1000);
def wa = (w + ww + www) / 3;
def e = StandardDeviation(Vol3, 650) / ExpAverage(Vol3, 650);
def ee = StandardDeviation(Vol3, 100) / ExpAverage(Vol3, 100);
def eee = StandardDeviation(Vol3, 1000) / ExpAverage(Vol3, 1000);
def ea = (e + ee + eee) / 3;
def r = StandardDeviation(Vol4, 650) / ExpAverage(Vol4, 650);
def rr = StandardDeviation(Vol4, 100) / ExpAverage(Vol4, 100);
def rrr = StandardDeviation(Vol4, 1000) / ExpAverage(Vol4, 1000);
def ra = (r + rr + rrr) / 3;
def t = StandardDeviation(Vol5, 650) / ExpAverage(Vol5, 650);
def tt = StandardDeviation(Vol5, 100) / ExpAverage(Vol5, 100);
def ttt = StandardDeviation(Vol5, 1000) / ExpAverage(Vol5, 1000);
def ta = (t + tt + ttt) / 3;
def y = StandardDeviation(Vol6, 650) / ExpAverage(Vol6, 650);
def yy = StandardDeviation(Vol6, 100) / ExpAverage(Vol6, 100);
def yyy = StandardDeviation(Vol6, 1000) / ExpAverage(Vol6, 1000);
def ya = (y + yy + yyy) / 3;
def u = StandardDeviation(Vol7, 650) / ExpAverage(Vol7, 650);
def uu = StandardDeviation(Vol7, 100) / ExpAverage(Vol7, 100);
def uuu = StandardDeviation(Vol7, 1000) / ExpAverage(Vol7, 1000);
def ua = (u + uu + uuu) / 3;
def i = StandardDeviation(Vol8, 650) / ExpAverage(Vol8, 650);
def ii = StandardDeviation(Vol8, 100) / ExpAverage(Vol8, 100);
def iii = StandardDeviation(Vol8, 1000) / ExpAverage(Vol8, 1000);
def ia = (i + ii + iii) / 3;
def o = StandardDeviation(Vol9, 650) / ExpAverage(Vol9, 650);
def oo = StandardDeviation(Vol9, 100) / ExpAverage(Vol9, 100);
def ooo = StandardDeviation(Vol9, 1000) / ExpAverage(Vol9, 1000);
def oa = (o + oo + ooo) / 3;
def p = StandardDeviation(Vol10, 650) / ExpAverage(Vol10, 650);
def pp = StandardDeviation(Vol10, 100) / ExpAverage(Vol10, 100);
def ppp = StandardDeviation(Vol10, 1000) / ExpAverage(Vol10, 1000);
def pa = (p + pp + ppp) / 3;
def a = StandardDeviation(Vol11, 650) / ExpAverage(Vol11, 650);
def aa = StandardDeviation(Vol11, 100) / ExpAverage(Vol11, 100);
def aaa = StandardDeviation(Vol11, 1000) / ExpAverage(Vol11, 1000);
def aaaa = (a + aa + aaa) / 3;
def s = StandardDeviation(Vol12, 650) / ExpAverage(Vol12, 650);
def ss = StandardDeviation(Vol2, 100) / ExpAverage(Vol12, 100);
def sss = StandardDeviation(Vol12, 1000) / ExpAverage(Vol12, 1000);
def sa = (s + ss + sss) / 3;
def d = StandardDeviation(Vol13, 650) / ExpAverage(Vol13, 650);
def dd = StandardDeviation(Vol13, 100) / ExpAverage(Vol13, 100);
def ddd = StandardDeviation(Vol13, 1000) / ExpAverage(Vol13, 1000);
def da = (d + dd + ddd) / 3;
def f = StandardDeviation(Vol14, 650) / ExpAverage(Vol14, 650);
def ff = StandardDeviation(Vol14, 100) / ExpAverage(Vol14, 100);
def fff = StandardDeviation(Vol14, 1000) / ExpAverage(Vol14, 1000);
def fa = (f + ff + fff) / 3;
def g = StandardDeviation(Vol15, 650) / ExpAverage(Vol15, 650);
def gg = StandardDeviation(Vol15, 100) / ExpAverage(Vol15, 100);
def ggg = StandardDeviation(Vol15, 1000) / ExpAverage(Vol15, 1000);
def ga = (g + gg + ggg) / 3;
def h = StandardDeviation(Vol16, 650) / ExpAverage(Vol16, 650);
def hh = StandardDeviation(Vol16, 100) / ExpAverage(Vol16, 100);
def hhh = StandardDeviation(Vol16, 1000) / ExpAverage(Vol16, 1000);
def ha = (h + hh + hhh) / 3;

def Num_Dev1 = (3 );
def Num_Dev2 = (3 );
def Num_Dev3 = (3 );
def Num_Dev4 = (3 );
def Num_Dev5 = (3 );
def Num_Dev6 = (3 );
def Num_Dev7 = (3 );
def Num_Dev8 = (3 );
def Num_Dev9 = (3 );
def Num_Dev10 = (3 );
def Num_Dev11 = (3 );
def Num_Dev12 = (3 );
def Num_Dev13 = (3 );
def Num_Dev14 = (3 );
def Num_Dev15 = (3 );
def Num_Dev16 = (3 );
#def Num_Dev1 = (5 * qa );
#def Num_Dev2 = (5 * wa );
#def Num_Dev3 = (5 * ea );
#def Num_Dev4 = (5 * ra );
#def Num_Dev5 = (5 * ta );
#def Num_Dev6 = (5 * ya );
#def Num_Dev7 = (5 * ua );
#def Num_Dev8 = (5 * ia );
#def Num_Dev9 = (5 * oa );
#def Num_Dev10 = (5 * pa );
#def Num_Dev11 = (5 * aaaa );
#def Num_Dev12 = (5 * sa );
#def Num_Dev14 = (5 * fa );
#def Num_Dev15 = (5 * ga );
#def Num_Dev16 = (5 * ha );


def sDev1 = StDev(data = Vol1, length = AVL1);
def sDev2 = StDev(data = Vol1, length = AVL2);
def sDev3 = StDev(data = Vol1, length = AVL3);
def sDev4 = StDev(data = Vol1, length = AVL4);
def sDev5 = StDev(data = Vol1, length = AVL5);
def sDev6 = StDev(data = Vol1, length = AVL6);
def sDev12 = StDev(data = Vol2, length = AVL1);
def sDev22 = StDev(data = Vol2, length = AVL2);
def sDev32 = StDev(data = Vol2, length = AVL3);
def sDev42 = StDev(data = Vol2, length = AVL4);
def sDev52 = StDev(data = Vol2, length = AVL5);
def sDev62 = StDev(data = Vol2, length = AVL6);
def sDev13 = StDev(data = Vol3, length = AVL1);
def sDev23 = StDev(data = Vol3, length = AVL2);
def sDev33 = StDev(data = Vol3, length = AVL3);
def sDev43 = StDev(data = Vol3, length = AVL4);
def sDev53 = StDev(data = Vol3, length = AVL5);
def sDev63 = StDev(data = Vol3, length = AVL6);
def sDev14 = StDev(data = Vol4, length = AVL1);
def sDev24 = StDev(data = Vol4, length = AVL2);
def sDev34 = StDev(data = Vol4, length = AVL3);
def sDev44 = StDev(data = Vol4, length = AVL4);
def sDev54 = StDev(data = Vol4, length = AVL5);
def sDev64 = StDev(data = Vol4, length = AVL6);
def sDev15 = StDev(data = Vol5, length = AVL1);
def sDev25 = StDev(data = Vol5, length = AVL2);
def sDev35 = StDev(data = Vol5, length = AVL3);
def sDev45 = StDev(data = Vol5, length = AVL4);
def sDev55 = StDev(data = Vol5, length = AVL5);
def sDev65 = StDev(data = Vol5, length = AVL6);
def sDev16 = StDev(data = Vol6, length = AVL1);
def sDev26 = StDev(data = Vol6, length = AVL2);
def sDev36 = StDev(data = Vol6, length = AVL3);
def sDev46 = StDev(data = Vol6, length = AVL4);
def sDev56 = StDev(data = Vol6, length = AVL5);
def sDev66 = StDev(data = Vol6, length = AVL6);
def sDev17 = StDev(data = Vol7, length = AVL1);
def sDev27 = StDev(data = Vol7, length = AVL2);
def sDev37 = StDev(data = Vol7, length = AVL3);
def sDev47 = StDev(data = Vol7, length = AVL4);
def sDev57 = StDev(data = Vol7, length = AVL5);
def sDev67 = StDev(data = Vol7, length = AVL6);
def sDev18 = StDev(data = Vol8, length = AVL1);
def sDev28 = StDev(data = Vol8, length = AVL2);
def sDev38 = StDev(data = Vol8, length = AVL3);
def sDev48 = StDev(data = Vol8, length = AVL4);
def sDev58 = StDev(data = Vol8, length = AVL5);
def sDev68 = StDev(data = Vol8, length = AVL6);
def sDev19 = StDev(data = Vol9, length = AVL1);
def sDev29 = StDev(data = Vol9, length = AVL2);
def sDev39 = StDev(data = Vol9, length = AVL3);
def sDev49 = StDev(data = Vol9, length = AVL4);
def sDev59 = StDev(data = Vol9, length = AVL5);
def sDev69 = StDev(data = Vol9, length = AVL6);
def sDev110 = StDev(data = Vol10, length = AVL1);
def sDev210 = StDev(data = Vol10, length = AVL2);
def sDev310 = StDev(data = Vol10, length = AVL3);
def sDev410 = StDev(data = Vol10, length = AVL4);
def sDev510 = StDev(data = Vol10, length = AVL5);
def sDev610 = StDev(data = Vol10, length = AVL6);
def sDev111 = StDev(data = Vol11, length = AVL1);
def sDev211 = StDev(data = Vol11, length = AVL2);
def sDev311 = StDev(data = Vol11, length = AVL3);
def sDev411 = StDev(data = Vol11, length = AVL4);
def sDev511 = StDev(data = Vol11, length = AVL5);
def sDev611 = StDev(data = Vol11, length = AVL6);
def sDev122 = StDev(data = Vol12, length = AVL1);
def sDev222 = StDev(data = Vol12, length = AVL2);
def sDev322 = StDev(data = Vol12, length = AVL3);
def sDev422 = StDev(data = Vol12, length = AVL4);
def sDev522 = StDev(data = Vol12, length = AVL5);
def sDev622 = StDev(data = Vol12, length = AVL6);
def sDev133 = StDev(data = Vol13, length = AVL1);
def sDev233 = StDev(data = Vol13, length = AVL2);
def sDev333 = StDev(data = Vol13, length = AVL3);
def sDev433 = StDev(data = Vol13, length = AVL4);
def sDev533 = StDev(data = Vol13, length = AVL5);
def sDev633 = StDev(data = Vol13, length = AVL6);
def sDev144 = StDev(data = Vol14, length = AVL1);
def sDev244 = StDev(data = Vol14, length = AVL2);
def sDev344 = StDev(data = Vol14, length = AVL3);
def sDev444 = StDev(data = Vol14, length = AVL4);
def sDev544 = StDev(data = Vol14, length = AVL5);
def sDev644 = StDev(data = Vol14, length = AVL6);
def sDev155 = StDev(data = Vol15, length = AVL1);
def sDev255 = StDev(data = Vol15, length = AVL2);
def sDev355 = StDev(data = Vol15, length = AVL3);
def sDev455 = StDev(data = Vol15, length = AVL4);
def sDev555 = StDev(data = Vol15, length = AVL5);
def sDev655 = StDev(data = Vol15, length = AVL6);
def sDev166 = StDev(data = Vol16, length = AVL1);
def sDev266 = StDev(data = Vol16, length = AVL2);
def sDev366 = StDev(data = Vol16, length = AVL3);
def sDev466 = StDev(data = Vol16, length = AVL4);
def sDev566 = StDev(data = Vol16, length = AVL5);
def sDev666 = StDev(data = Vol16, length = AVL6);


def allsdev1 = (sDev1 + sDev2 + sDev3 + sDev4 + sDev5 + sDev6) / 6;
def allsdev2 = (sDev12 + sDev22 + sDev32 + sDev42 + sDev52 + sDev62) / 6;
def allsdev3 = (sDev13 + sDev23 + sDev33 + sDev43 + sDev53 + sDev63) / 6;
def allsdev4 = (sDev14 + sDev24 + sDev34 + sDev44 + sDev54 + sDev64) / 6;
def allsdev5 = (sDev15 + sDev25 + sDev35 + sDev45 + sDev55 + sDev65) / 6;
def allsdev6 = (sDev16 + sDev26 + sDev36 + sDev46 + sDev56 + sDev66) / 6;
def allsdev7 = (sDev17 + sDev27 + sDev37 + sDev47 + sDev57 + sDev67) / 6;
def allsdev8 = (sDev18 + sDev28 + sDev38 + sDev48 + sDev58 + sDev68) / 6;
def allsdev9 = (sDev19 + sDev29 + sDev39 + sDev49 + sDev59 + sDev69) / 6;
def allsdev10 = (sDev110 + sDev210 + sDev310 + sDev410 + sDev510 + sDev610) / 6;
def allsdev11 = (sDev111 + sDev211 + sDev311 + sDev411 + sDev511 + sDev611) / 6;
def allsdev12 = (sDev122 + sDev222 + sDev322 + sDev422 + sDev522 + sDev622) / 6;
def allsdev13 = (sDev133 + sDev233 + sDev333 + sDev433 + sDev533 + sDev633) / 6;
def allsdev14 = (sDev144 + sDev244 + sDev344 + sDev444 + sDev544 + sDev644) / 6;
def allsdev15 = (sDev155 + sDev255 + sDev355 + sDev455 + sDev555 + sDev655) / 6;
def allsdev16 = (sDev166 + sDev266 + sDev366 + sDev466 + sDev566 + sDev666) / 6;

def vsig1 = VAL1 + Num_Dev1 * allsdev1;
def vsig2 = VAL2 + Num_Dev2 * allsdev2;
def vsig3 = VAL3 + Num_Dev3 * allsdev3;
def vsig4 = VAL4 + Num_Dev4 * allsdev4;
def vsig5 = VAL5 + Num_Dev5 * allsdev5;
def vsig6 = VAL6 + Num_Dev6 * allsdev6;
def vsig7 = VAL7 + Num_Dev7 * allsdev7;
def vsig8 = VAL8 + Num_Dev8 * allsdev8;
def vsig9 = VAL9 + Num_Dev9 * allsdev9;
def vsig10 = VAL10 + Num_Dev10 * allsdev10;
def vsig11 = VAL11 + Num_Dev11 * allsdev11;
def vsig12 = VAL12 + Num_Dev12 * allsdev12;
def vsig13 = VAL13 + Num_Dev13 * allsdev13;
def vsig14 = VAL14 + Num_Dev14 * allsdev14;
def vsig15 = VAL15 + Num_Dev15 * allsdev15;
def vsig16 = VAL16 + Num_Dev16 * allsdev16;





def canful = (low + close) / 2;
def canful2 = (high + close) / 2;

def volmult1 = if clause1 then ((Vol1 / (vsig1[8]) * (Vol1 / (vsig1[8]))) / (Vol1 / (vsig1[8]))) else 0;
def volmult2 = if clause2 then ((Vol2 / (vsig2[8]) * (Vol2 / (vsig2[8]))) / (Vol2 / (vsig2[8]))) else 0;
def volmult3 = if clause3 then ((Vol3 / (vsig3[8]) * (Vol3 / (vsig3[8]))) / (Vol3 / (vsig3[8]))) else 0;
def volmult4 = if clause4 then ((Vol4 / (vsig4[8]) * (Vol4 / (vsig4[8]))) / (Vol4 / (vsig4[8]))) else 0;
def volmult5 = if clause5 then ((Vol5 / (vsig5[8]) * (Vol5 / (vsig5[8]))) / (Vol5 / (vsig5[8]))) else 0;
def volmult6 = if clause6 then ((Vol6 / (vsig6[8]) * (Vol6 / (vsig6[8]))) / (Vol6 / (vsig6[8]))) else 0;
def volmult7 = if clause7 then ((Vol7 / (vsig7[8]) * (Vol7 / (vsig7[8]))) / (Vol7 / (vsig7[8]))) else 0;
def volmult8 = if clause8 then ((Vol8 / (vsig8[8]) * (Vol8 / (vsig8[8]))) / (Vol8 / (vsig8[8]))) else 0;
def volmult9 = if clause9 then ((Vol9 / (vsig9[8]) * (Vol9 / (vsig9[8]))) / (Vol9 / (vsig9[8]))) else 0;
def volmult10 = if clause10 then ((Vol10 / (vsig10[8]) * (Vol10 / (vsig10[8]))) / (Vol10 / (vsig10[8]))) else 0;
def volmult11 = if clause11 then ((Vol11 / (vsig11[8]) * (Vol11 / (vsig11[8]))) / (Vol11 / (vsig11[8]))) else 0;
def volmult12 = if clause12 then ((Vol12 / (vsig12[8]) * (Vol12 / (vsig12[8]))) / (Vol12 / (vsig12[8]))) else 0;
def volmult13 = if clause13 then ((Vol13 / (vsig13[8]) * (Vol13 / (vsig13[8]))) / (Vol13 / (vsig13[8]))) else 0;
def volmult14 = if clause14 then ((Vol14 / (vsig14[8]) * (Vol14 / (vsig14[8]))) / (Vol14 / (vsig14[8]))) else 0;
def volmult15 = if clause15 then ((Vol15 / (vsig15[8]) * (Vol15 / (vsig15[8]))) / (Vol15 / (vsig15[8]))) else 0;
def volmult16 = if clause16 then ((Vol16 / (vsig16[8]) * (Vol16 / (vsig16[8]))) / (Vol16 / (vsig16[8]))) else 0;
def comb = (volmult1 + volmult2 + volmult3 + volmult4 + volmult5 + volmult6 + volmult7 + volmult8 + volmult9 + volmult10 + volmult11 + volmult12 + volmult13 + volmult14 + volmult15 + volmult16);



input length = 89;
input bandwidth = 0.1;
input harmonic = 1;

def beta1 = Cos(2 * Double.Pi / (length / harmonic));
def gamma1 = Cos(bandwidth * 2 * Double.Pi / (length / harmonic));
def alpha1 = 1 / gamma1 - Sqrt(1 / Sqr(gamma1) - 1);
def bandpass = if IsNaN(comb + comb[2]) then 0 else (1 - alpha1) * (comb - comb[2]) / 2 + beta1 * (1 + alpha1) * bandpass[1] - alpha1 * bandpass[2];

plot BandpassFilter = bandpass;
plot ZeroLine = 0;

BandpassFilter.SetDefaultColor(GetColor(2));
ZeroLine.SetDefaultColor(GetColor(7));

addCloud(bandpassFilter, zeroline, color.green);
bandpassFilter.setPaintingStrategy(paintingStrategy.POINTS);
bandpassFilter.setDefaultColor(color.white);

#simple rewrite
 

Sneaky_Swings

Member
VIP
@YungTraderFromMontana where have you been did you die? Bro you are making life too hard :cool: grab a laptop, grab some clothes buy a plane ticket rent a house and move...

DiHIoH9.jpeg
Hello! Is there any way you can share the link to the study itself?

The code you provided will not display anything on my ToS...Do you have any idea why this could be happening?

I was also wondering if you had made any progress with the more advanced volume you were talking about?
 

Similar threads

Top