Untitled
user_0084968
plain_text
a year ago
28 kB
2
Indexable
Never
//Volume Differences var bool vob1s = na var bool vor1s = na var bool vob1m = na var bool vor1m = na var bool vob1w = na var bool vor1w = na if voldif_ok and bar_index>last_bar_index-lookback2 vo1b = c1>o1 ? vol : 0 vo1r = o1>c1 ? vol : 0 vo2b = c2>o2 ? vol[1] : 0 vo2r = o2>c2 ? vol[1] : 0 vo3b = c3>o3 ? vol[2] : 0 vo3r = o3>c3 ? vol[2] : 0 vo4b = c4>o4 ? vol[3] : 0 vo4r = o4>c4 ? vol[3] : 0 vo5b = c5>o5 ? vol[4] : 0 vo5r = o5>c5 ? vol[4] : 0 vo6b = c6>o6 ? vol[5] : 0 vo6r = o6>c6 ? vol[5] : 0 vo7b = close[6]>open[6] ? vol[6] : 0 vo7r = open[6]>close[6] ? vol[6] : 0 vo8b = close[7]>open[7] ? vol[7] : 0 vo8r = open[7]>close[7] ? vol[7] : 0 vo9b = close[8]>open[8] ? vol[8] : 0 vo9r = open[8]>close[8] ? vol[8] : 0 vo10b = close[9]>open[9] ? vol[9] : 0 vo10r = open[9]>close[9] ? vol[9] : 0 vo11b = close[10]>open[10] ? vol[10] : 0 vo11r = open[10]>close[10] ? vol[10] : 0 vo12b = close[11]>open[11] ? vol[11] : 0 vo12r = open[11]>close[11] ? vol[11] : 0 vo13b = close[12]>open[12] ? vol[12] : 0 vo13r = open[12]>close[12] ? vol[12] : 0 vo14b = close[13]>open[13] ? vol[13] : 0 vo14r = open[13]>close[13] ? vol[13] : 0 vobb = vo1b+vo2b+vo3b+vo4b+vo5b+vo6b+vo7b+vo8b+vo9b+vo10b+vo11b+vo12b+vo13b+vo14b vorr = vo1r+vo2r+vo3r+vo4r+vo5r+vo6r+vo7r+vo8r+vo9r+vo10r+vo11r+vo12r+vo13r+vo14r difb = (vorr-vobb) vob = vorr>vobb and voldif_ok and belowLine_b and ((difb+difb[1])*multp<(difb[2]+difb[3])) var int barsSincePattern2 = 0 vob1 = vob and (barsSincePattern2 >= 5 or na(barsSincePattern2)) barsSincePattern2 := vob1 ? 0 : barsSincePattern2 + 1 difr = (vobb-vorr) vor = vobb>vorr and voldif_ok and belowLine_r and ((difr+difr[1])*multp<(difr[2]+difr[3])) var int barsSincePattern3 = 0 vor1 = vor and (barsSincePattern3 >= 5 or na(barsSincePattern3)) barsSincePattern3 := vor1 ? 0 : barsSincePattern3 + 1 if vob1 and vol>2400*dcur vob1s:=true else vob1s:=false if vob1 and vol>900*dcur and vol<2400*dcur vob1m:=true else vob1m:=false if vob1 and vol<900*dcur vob1w:=true else vob1w:=false if vor1 and vol>2400*dcur vor1s:=true else vor1s:=false if vor1 and vol>900*dcur and vol<2400*dcur vor1m:=true else vor1m:=false if vor1 and vol<900*dcur vor1w:=true else vor1w:=false //Color candles var float dif2 = na if color_candles and bar_index>last_bar_index-lookback2 vo1b = c1>o1 ? vol : 0 vo1r = o1>c1 ? vol : 0 vo2b = c2>o2 ? vol[1] : 0 vo2r = o2>c2 ? vol[1] : 0 vo3b = c3>o3 ? vol[2] : 0 vo3r = o3>c3 ? vol[2] : 0 vo4b = c4>o4 ? vol[3] : 0 vo4r = o4>c4 ? vol[3] : 0 vo5b = c5>o5 ? vol[4] : 0 vo5r = o5>c5 ? vol[4] : 0 vo6b = c6>o6 ? vol[5] : 0 vo6r = o6>c6 ? vol[5] : 0 vo7b = close[6]>open[6] ? vol[6] : 0 vo7r = open[6]>close[6] ? vol[6] : 0 vo8b = close[7]>open[7] ? vol[7] : 0 vo8r = open[7]>close[7] ? vol[7] : 0 vo9b = close[8]>open[8] ? vol[8] : 0 vo9r = open[8]>close[8] ? vol[8] : 0 vo10b = close[9]>open[9] ? vol[9] : 0 vo10r = open[9]>close[9] ? vol[9] : 0 vo11b = close[10]>open[10] ? vol[10] : 0 vo11r = open[10]>close[10] ? vol[10] : 0 vo12b = close[11]>open[11] ? vol[11] : 0 vo12r = open[11]>close[11] ? vol[11] : 0 vo13b = close[12]>open[12] ? vol[12] : 0 vo13r = open[12]>close[12] ? vol[12] : 0 vo14b = close[13]>open[13] ? vol[13] : 0 vo14r = open[13]>close[13] ? vol[13] : 0 vobb1 = (vo1b+vo2b+vo3b+vo4b+vo5b+vo6b+vo7b+vo8b+vo9b+vo10b+vo11b+vo12b+vo13b+vo14b)/14 vorr1 = (vo1r+vo2r+vo3r+vo4r+vo5r+vo6r+vo7r+vo8r+vo9r+vo10r+vo11r+vo12r+vo13r+vo14r)/14 dif1 = vobb1-vorr1 dif2 := (dif1+dif1[1]+dif1[2]+dif1[3]+dif1[4]+dif1[5]+dif1[6])/7 //Candle Patterns var bool b61 = na var bool b62 = na var bool b63 = na var bool b64 = na var bool b65 = na var bool b66 = na var bool b51 = na var bool b52 = na var bool b53 = na var bool b54 = na var bool b55 = na var bool b41 = na var bool b42 = na var bool b43 = na var bool b44 = na var bool b31 = na var bool b32 = na var bool b21 = na var bool bhc = na var bool shouldPlot1 = na var bool r61 = na var bool r62 = na var bool r63 = na var bool r64 = na var bool r65 = na var bool r66 = na var bool r51 = na var bool r52 = na var bool r53 = na var bool r54 = na var bool r55 = na var bool r41 = na var bool r42 = na var bool r43 = na var bool r44 = na var bool r31 = na var bool r32 = na var bool r21 = na var bool rhc = na var bool shouldPlot = na if cp_ok and bar_index>last_bar_index-lookback2 tws3 = (c3>o3) and ((c3-o3)>bl*atr) tws2 = (c2>o2) and ((c2-o2)>bl*atr) and (c2>=h3) tws1 = (c1>o1) and ((c1-o1)>bl*atr) and (c1>=h2) tws = tws1 and tws2 and tws3 and tws_ok and volume_ok and belowLine_b var int barsSincePattern1 = 0 shouldPlot1 := tws and (barsSincePattern1 >= 5 or na(barsSincePattern1)) barsSincePattern1 := shouldPlot1 ? 0 : barsSincePattern1 + 1 tbs3 = (o3>c3) and ((o3-c3)>bl*atr) tbs2 = (o2>c2) and ((o2-c2)>bl*atr) and (c2<=l3) tbs1 = (o1>c1) and ((o1-c1)>bl*atr) and (c1<=l2) tbs = tbs1 and tbs2 and tbs3 and tbs_ok and volume_ok and belowLine_r var int barsSincePattern = 0 shouldPlot := tbs and (barsSincePattern >= 5 or na(barsSincePattern)) barsSincePattern := shouldPlot ? 0 : barsSincePattern + 1 bhc1 = ((c1>=o1) and ((h1-o1)<((h1-l1)*0.382))) or ((o1>c1) and ((h1-c1)<((h1-l1)*0.382)) and (((h1-o1)>=(o1-c1)) or ((h1-c1)<(h1-l1)*0.25))) and (h1-l1)>atr bhc := bhc1 and volume_ok and bhc_ok and belowLine_b rhc1 = ((o1>=c1) and ((o1-l1)<((h1-l1)*0.382))) or ((c1>o1) and ((c1-l1)<((h1-l1)*0.382)) and (((o1-l1)>=(c1-o1)) or ((c1-l1)<(h1-l1)*0.25))) and (h1-l1)>atr rhc := rhc1 and volume_ok and rhc_ok and belowLine_r b616 = (o6>c6) b615 = (o5>c5) b614 = ((o6-c6)>(mcs*atr)and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o4-c4)>(bl*atr))and((o6-c6)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o5-c5)>(bl*atr))and((o6-c6)>(bl*atr))) b613 = ((c3-o3)>(bl*atr)) b612 = ((c2-o2)>(bl*atr)) b611 = (c1>o6-(o6-c6)*pmval)and(((c1-o1)>(c2-o2))or((c1-o1)>(c3-o3))) b61 := b616 and b615 and b614 and b613 and b612 and b611 and volume_ok and b61_ok and belowLine_b r616 = (c6>o6) r615 = (c5>o5) r614 = ((c6-o6)>(mcs*atr)and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c4-o4)>(bl*atr))and((c6-o6)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c5-o5)>(bl*atr))and((c6-o6)>(bl*atr))) r613 = ((o3-c3)>(bl*atr)) r612 = ((o2-c2)>(bl*atr)) r611 = (c1<o6+(c6-o6)*pmval)and(((o1-c1)>(o2-c2))or((o1-c1)>(o3-c3))) r61 := r616 and r615 and r614 and r613 and r612 and r611 and volume_ok and r61_ok and belowLine_r b626 = (o6>c6) b625 = (((o6-c6)>(mcs*atr))and((o5-c5)>(bl*atr))) or (((o5-c5)>(mcs*atr))and((o6-c6)>(bl*atr))) b624 = (((c4-o4)<(bl*atr))and((c4-o4)>(0)))or(((o4-c4)<(bl*atr))and((o4-c4)>(0))) b623 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b622 = ((c2-o2)>(bl*atr)) b621 = (c1>o6-(o6-c6)*pmval)and(((c1-o1)>(c2-o2))) b62 := b626 and b625 and b624 and b623 and b622 and b621 and volume_ok and b62_ok and belowLine_b r626 = (c6>o6) r625 = (((c6-o6)>(mcs*atr))and((c5-o5)>(bl*atr))) or (((c5-o5)>(mcs*atr))and((c6-o6)>(bl*atr))) r624 = (((c4-o4)<(bl*atr))and((c4-o4)>(0)))or(((o4-c4)<(bl*atr))and((o4-c4)>(0))) r623 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r622 = ((o2-c2)>(bl*atr)) r621 = (c1<o6+(c6-o6)*pmval)and(((o1-c1)>(o2-c2))) r62 := r626 and r625 and r624 and r623 and r622 and r621 and volume_ok and r62_ok and belowLine_r b636 = (o6>c6) b635 = (o5>c5) b634 = ((o6-c6)>(mcs*atr)and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o4-c4)>(bl*atr))and((o6-c6)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o5-c5)>(bl*atr))and((o6-c6)>(bl*atr))) b633 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b632 = ((c2-o2)>(bl*atr)) b631 = (c1>o6-(o6-c6)*pmval)and(((c1-o1)>(c2-o2))) b63 := b636 and b635 and b634 and b633 and b632 and b631 and volume_ok and b63_ok and belowLine_b r636 = (c6>o6) r635 = (c5>o5) r634 = ((c6-o6)>(mcs*atr)and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c4-o4)>(bl*atr))and((c6-o6)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c5-o5)>(bl*atr))and((c6-o6)>(bl*atr))) r633 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r632 = ((o2-c2)>(bl*atr)) r631 = (c1<o6+(c6-o6)*pmval)and(((o1-c1)>(o2-c2))) r63 := r636 and r635 and r634 and r633 and r632 and r631 and volume_ok and r63_ok and belowLine_r b646 = (o6>c6) b645 = (o5>c5) b644 = (o4>c4) b643 = ((o6-c6)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o6-c6)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o6-c6)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o6-c6)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) b642 = ((c2-o2)>(bl*atr)) b641 = (c1>o6-(o6-c6)*pmval)and(((c1-o1)>(c2-o2))) b64 := b646 and b645 and b644 and b643 and b642 and b641 and volume_ok and b64_ok and belowLine_b r646 = (c6>o6) r645 = (c5>o5) r644 = (c4>o4) r643 = ((c6-o6)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c6-o6)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c6-o6)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c6-o6)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) r642 = ((o2-c2)>(bl*atr)) r641 = (c1<o6+(c6-o6)*pmval)and(((o1-c1)>(o2-c2))) r64 := r646 and r645 and r644 and r643 and r642 and r641 and volume_ok and r64_ok and belowLine_r b656 = (o6>c6) b655 = (o5>c5) b654 = ((o6-c6)>(mcs*atr)and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o4-c4)>(bl*atr))and((o6-c6)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o5-c5)>(bl*atr))and((o6-c6)>(bl*atr))) b653 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b652 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b651 = (c1>o6-(o6-c6)*pmval) b65 := b656 and b655 and b654 and b653 and b652 and b651 and volume_ok and b65_ok and belowLine_b r656 = (c6>o6) r655 = (c5>o5) r654 = ((c6-o6)>(mcs*atr)and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c4-o4)>(bl*atr))and((c6-o6)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c5-o5)>(bl*atr))and((c6-o6)>(bl*atr))) r653 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r652 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r651 = (c1<o6+(c6-o6)*pmval) r65 := r656 and r655 and r654 and r653 and r652 and r651 and volume_ok and r65_ok and belowLine_r b666 = (o6>c6) b665 = (o5>c5) b664 = (o4>c4) b663 = ((o6-c6)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o6-c6)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o6-c6)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o6-c6)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) b662 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b661 = (c1>o6-(o6-c6)*pmval) b66 := b666 and b665 and b664 and b663 and b662 and b661 and volume_ok and b66_ok and belowLine_b r666 = (c6>o6) r665 = (c5>o5) r664 = (c4>o4) r663 = ((c6-o6)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c6-o6)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c6-o6)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c6-o6)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) r662 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r661 = (c1<o6+(c6-o6)*pmval) r66 := r666 and r665 and r664 and r663 and r662 and r661 and volume_ok and r66_ok and belowLine_r b515 = (o5>c5) b514 = (o4>c4) b513 = ((o5-c5)>(mcs*atr)and((o4-c4)>(bl*atr))and((o3-c3)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o5-c5)>(bl*atr))and((o4-c4)>(bl*atr))) b512 = ((c2-o2)>(bl*atr)) b511 = (c1>o5-(o5-c5)*pmval)and((c1-o1)>(c2-o2)) b51 := b515 and b514 and b513 and b512 and b511 and volume_ok and b51_ok and belowLine_b r515 = (c5>o5) r514 = (c4>o4) r513 = ((c5-o5)>(mcs*atr)and((c4-o4)>(bl*atr))and((c3-o3)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c5-o5)>(bl*atr))and((c4-o4)>(bl*atr))) r512 = ((o2-c2)>(bl*atr)) r511 = (c1<o5+(c5-o5)*pmval)and((o1-c1)>(o2-c2)) r51 := r515 and r514 and r513 and r512 and r511 and volume_ok and r51_ok and belowLine_r b525 = (o5>c5) b524 = (((o5-c5)>(mcs*atr))and((o4-c4)>(bl*atr))) or (((o4-c4)>(mcs*atr))and((o5-c5)>(bl*atr))) b523 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b522 = ((c2-o2)>(bl*atr)) b521 = (c1>o5-(o5-c5)*pmval)and((c1-o1)>(c2-o2)) b52 := b525 and b524 and b523 and b522 and b521 and volume_ok and b52_ok and belowLine_b r525 = (c5>o5) r524 = (((c4-o4)>(mcs*atr))and((c5-o5)>(bl*atr))) or (((c4-o4)>(mcs*atr))and((c5-o5)>(bl*atr))) r523 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r522 = ((o2-c2)>(bl*atr)) r521 = (c1<o5+(c5-o5)*pmval)and(((o1-c1)>(o2-c2))) r52 := r525 and r524 and r523 and r522 and r521 and volume_ok and r52_ok and belowLine_r b535 = (o5>c5) b534 = (((o5-c5)>(mcs*atr))and((o4-c4)>(bl*atr))) or (((o4-c4)>(mcs*atr))and((o5-c5)>(bl*atr))) b533 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b532 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b531 = (c1>o5-(o5-c5)*pmval) b53 := b535 and b534 and b533 and b532 and b531 and volume_ok and b53_ok and belowLine_b r535 = (c5>o5) r534 = (((c4-o4)>(mcs*atr))and((c5-o5)>(bl*atr))) or (((c5-o5)>(mcs*atr))and((c4-o4)>(bl*atr))) r533 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r532 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r531 = (c1<o5+(c5-o5)*pmval) r53 := r535 and r534 and r533 and r532 and r531 and volume_ok and r53_ok and belowLine_r b545 = (o5>c5) b544 = (o4>c4) b543 = ((o5-c5)>(mcs*atr)and((o4-c4)>(bl*atr))and((o3-c3)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o5-c5)>(bl*atr))and((o4-c4)>(bl*atr))) b542 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b541 = (c1>o5-(o5-c5)*pmval) b54 := b545 and b544 and b543 and b542 and b541 and volume_ok and b54_ok and belowLine_b r545 = (c5>o5) r544 = (c4>o4) r543 = ((c5-o5)>(mcs*atr)and((c4-o4)>(bl*atr))and((c3-o3)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c5-o5)>(bl*atr))and((c4-o4)>(bl*atr))) r542 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r541 = (c1<o5+(c5-o5)*pmval) r54 := r545 and r544 and r543 and r542 and r541 and volume_ok and r54_ok and belowLine_r b555 = (o5>c5) b554 = (o4>c4) b553 = (o3>c3) b552 = ((o2-c2)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o5-c5)>(mcs*atr)and((o3-c3)>(bl*atr))and((o4-c4)>(bl*atr))and((o2-c2)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o2-c2)>(bl*atr))and((o5-c5)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o2-c2)>(bl*atr))and((o4-c4)>(bl*atr))and((o5-c5)>(bl*atr))) b551 = (c1>o5-(o5-c5)*pmval) b55 := b555 and b554 and b553 and b552 and b551 and volume_ok and b55_ok and belowLine_b r555 = (c5>o5) r554 = (c4>o4) r553 = (c3>o3) r552 = ((c2-o2)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c5-o5)>(mcs*atr)and((c3-o3)>(bl*atr))and((c4-o4)>(bl*atr))and((c2-o2)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c2-o2)>(bl*atr))and((c5-o5)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c2-o2)>(bl*atr))and((c4-o4)>(bl*atr))and((c5-o5)>(bl*atr))) r551 = (c1<o5+(c5-o5)*pmval) r55 := r555 and r554 and r553 and r552 and r551 and volume_ok and r55_ok and belowLine_r b414 = (o4>c4) b413 = (((o3-c3)>(mcs*atr))and((o4-c4)>(bl*atr))) or (((o4-c4)>(mcs*atr))and((o3-c3)>(bl*atr))) b412 = ((c2-o2)>(bl*atr)) b411 = (c1>o4-(o4-c4)*pmval)and((c1-o1)>(c2-o2)) b41 := b414 and b413 and b412 and b411 and volume_ok and b41_ok and belowLine_b r414 = (c4>o4) r413 = (((c4-o4)>(mcs*atr))and((c3-o3)>(bl*atr))) or (((c4-o4)>(mcs*atr))and((c3-o3)>(bl*atr))) r412 = ((o2-c2)>(bl*atr)) r411 = (c1<o4+(c4-o4)*pmval)and((o1-c1)>(o2-c2)) r41 := r414 and r413 and r412 and r411 and volume_ok and r41_ok and belowLine_r b424 = ((o4-c4)>(mcs*atr)) b423 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) b422 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b421 = (c1>o4-(o4-c4)*pmval) b42 := b424 and b423 and b422 and b421 and volume_ok and b42_ok and belowLine_b r424 = ((c4-o4)>(mcs*atr)) r423 = (((c3-o3)<(bl*atr))and((c3-o3)>(0)))or(((o3-c3)<(bl*atr))and((o3-c3)>(0))) r422 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r421 = (c1<o4+(c4-o4)*pmval) r42 := r424 and r423 and r422 and r421 and volume_ok and r42_ok and belowLine_r b434 = (o4>c4) b433 = (((o3-c3)>(mcs*atr))and((o4-c4)>(bl*atr))) or (((o4-c4)>(mcs*atr))and((o3-c3)>(bl*atr))) b432 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) b431 = (c1>o4-(o4-c4)*pmval) b43 := b434 and b433 and b432 and b431 and volume_ok and b43_ok and belowLine_b r434 = (c4>o4) r433 = (((c4-o4)>(mcs*atr))and((c3-o3)>(bl*atr))) or (((c4-o4)>(mcs*atr))and((c3-o3)>(bl*atr))) r432 = (((c2-o2)<(bl*atr))and((c2-o2)>(0)))or(((o2-c2)<(bl*atr))and((o2-c2)>(0))) r431 = (c1<o4+(c4-o4)*pmval) r43 := r434 and r433 and r432 and r431 and volume_ok and r43_ok and belowLine_r b444 = (o4>c4) b443 = (o3>c3) b442 = ((o2-c2)>(mcs*atr)and((o4-c4)>(bl*atr))and((o3-c3)>(bl*atr))) or ((o3-c3)>(mcs*atr)and((o4-c4)>(bl*atr))and((o2-c2)>(bl*atr))) or ((o4-c4)>(mcs*atr)and((o3-c3)>(bl*atr))and((o2-c2)>(bl*atr))) b441 = (c1>o4-(o4-c4)*pmval) b44 := b444 and b443 and b442 and b441 and volume_ok and b44_ok and belowLine_b r444 = (c4>o4) r443 = (c3>o3) r442 = ((c2-o2)>(mcs*atr)and((c4-o4)>(bl*atr))and((c3-o3)>(bl*atr))) or ((c3-o3)>(mcs*atr)and((c4-o4)>(bl*atr))and((c2-o2)>(bl*atr))) or ((c4-o4)>(mcs*atr)and((c3-o3)>(bl*atr))and((c2-o2)>(bl*atr))) r441 = (c1<o4+(c4-o4)*pmval) r44 := r444 and r443 and r442 and r441 and volume_ok and r44_ok and belowLine_r b313 = (o3>c3) b312 = (((o3-c3)>(mcs*atr))and((o2-c2)>(bl*atr))) or (((o2-c2)>(mcs*atr))and((o3-c3)>(bl*atr))) b311 = (c1>o3-(o3-c3)*pmval) b31 := b313 and b312 and b311 and volume_ok and b31_ok and belowLine_b r313 = (c3>o3) r312 = (((c3-o3)>(mcs*atr))and((c2-o2)>(bl*atr))) or (((c2-o2)>(mcs*atr))and((c3-o3)>(bl*atr))) r311 = (c1<o3+(c3-o3)*pmval) r31 := r313 and r312 and r311 and volume_ok and r31_ok and belowLine_r b323 = ((o3-c3)>(mcs*atr)) b322 = ((o2>c2)and((o2-c2)<(bl*atr))) or ((c2>o2)and((c2-o2)<(bl*atr))) b321 = (c1>o3-(o3-c3)*pmval) b32 := b323 and b322 and b321 and volume_ok and b32_ok and belowLine_b r323 = ((c3-o3)>(mcs*atr)) r322 = ((c2>o2)and((c2-o2)<(bl*atr))) or ((c2<o2)and((o2-c2)<(bl*atr))) r321 = (c1<o3+(c3-o3)*pmval) r32 := r323 and r322 and r321 and volume_ok and r32_ok and belowLine_r b212 = ((o2-c2)>atr) and (((h2-o2)<((o2-c2)/2))or((h2-o2)<((c2-l2)/2))) b211 = (c1>o2-(o2-c2)*pmval) and (((h1-c1)<((c1-o1)/2))or((h1-c1)<((o1-l1)/2))) b21 := b212 and b211 and volume_ok and b21_ok and belowLine_b r212 = ((c2-o2)>atr) and (((o2-l2)<((c2-o2)/2))or((o2-l2)<((h2-c2)/2))) r211 = (c1<o2+(c2-o2)*pmval) and (((c1-l1)<((o1-c1)/2))or((c1-l1)<((h1-o1)/2))) r21 := r212 and r211 and volume_ok and r21_ok and belowLine_r var float wt1 = 0 var float wt2 = 0 var float wt3 = 0 var float wt4 = 0 var float wt51 = 0 var float wt61 = 0 var float wt71 = 0 var float wt81 = 0 var float wt52 = 0 var float wt62 = 0 var float wt72 = 0 var float wt82 = 0 var float wt53 = 0 var float wt63 = 0 var float wt73 = 0 var float wt83 = 0 var float wt9 = 0 var float wt10 = 0 var float wt11 = 0 var float wt12 = 0 var float wt131 = 0 var float wt141 = 0 var float wt132 = 0 var float wt142 = 0 var float wt133 = 0 var float wt143 = 0 var float wt15 = 0 var float wt16 = 0 var float wt17 = 0 var float wt18 = 0 var float wt19 = 0 var float wt20 = 0 var float wt21 = 0 var float wt22 = 0 var float wt231 = 0 var float wt241 = 0 var float wt251 = 0 var float wt261 = 0 var float wt232 = 0 var float wt242 = 0 var float wt252 = 0 var float wt262 = 0 var float wt233 = 0 var float wt243 = 0 var float wt253 = 0 var float wt263 = 0 var float wt271 = 0 var float wt272 = 0 var float wt273 = 0 var float wt281 = 0 var float wt282 = 0 var float wt283 = 0 volris_wt = 1.0 volfal_wt = 0.5 intr_wt = 0.6 sudv1_wt = 0.5 sudv2_wt = 0.6 sudv3_wt = 0.7 lacv1_wt = 0.5 lacv2_wt = 0.6 lacv3_wt = 0.7 volpat_wt = 0.7 voldif1_wt = 0.8 voldif2_wt = 0.9 voldif3_wt = 1.0 cancol_wt = 0.5 hc_wt = 0.5 bws_wt = 0.6 cp_wt = 0.7 kld1_wt = 0.5 kld2_wt = 0.6 kld3_wt = 0.7 fvgdet1_wt = 0.6 fvgdet2_wt = 0.7 fvgdet3_wt = 0.8 obdet1_wt = 0.6 obdet2_wt = 0.7 obdet3_wt = 0.8 if green[0] or green[1] or green[2] wt1 := volris_wt else wt1 := 0 if red[0] or red[1] or red[2] wt2 := 0-volris_wt else wt2 := 0 if greenr[0] or greenr[1] or greenr[2] wt3 := volfal_wt else wt3 := 0 if redr[0] or redr[1] or redr[2] wt4 := 0-volfal_wt else wt4 := 0 if (lackvol1)[0] or (lackvol1)[1] or (lackvol1)[2] wt51 := lacv1_wt else wt51 := 0 if (lackvol1b)[0] or (lackvol1b)[1] or (lackvol1b)[2] wt61 := 0-lacv1_wt else wt61 := 0 if (sudvol1b)[0] or (sudvol1b)[1] or (sudvol1b)[2] wt71 := sudv1_wt else wt71 := 0 if (sudvol1)[0] or (sudvol1)[1] or (sudvol1)[2] wt81 := 0-sudv1_wt else wt81 := 0 if (lackvol2)[0] or (lackvol2)[1] or (lackvol2)[2] wt52 := lacv2_wt else wt52 := 0 if (lackvol2b)[0] or (lackvol2b)[1] or (lackvol2b)[2] wt62 := 0-lacv2_wt else wt62 := 0 if (sudvol2b)[0] or (sudvol2b)[1] or (sudvol2b)[2] wt72 := sudv2_wt else wt72 := 0 if (sudvol2)[0] or (sudvol2)[1] or (sudvol2)[2] wt82 := 0-sudv2_wt else wt82 := 0 if (lackvol3)[0] or (lackvol3)[1] or (lackvol3)[2] wt53 := lacv3_wt else wt53 := 0 if (lackvol3b)[0] or (lackvol3b)[1] or (lackvol3b)[2] wt63 := 0-lacv3_wt else wt63 := 0 if (sudvol3b)[0] or (sudvol3b)[1] or (sudvol3b)[2] wt73 := sudv3_wt else wt73 := 0 if (sudvol3)[0] or (sudvol3)[1] or (sudvol3)[2] wt83 := 0-sudv3_wt else wt83 := 0 if sig1b[0] or sig1b[1] or sig1b[2] wt9 := intr_wt else wt9 := 0 if sig1r[0] or sig1r[1] or sig1r[2] wt10 := 0-intr_wt else wt10 := 0 if (cpt1b or cpt2b or cpt3b or cpt4b or cpt5b)[0] or (cpt1b or cpt2b or cpt3b or cpt4b or cpt5b)[1] or (cpt1b or cpt2b or cpt3b or cpt4b or cpt5b)[2] wt11 := volpat_wt else wt11 := 0 if (cpt1r or cpt2r or cpt3r or cpt4r or cpt5r)[0] or (cpt1r or cpt2r or cpt3r or cpt4r or cpt5r)[1] or (cpt1r or cpt2r or cpt3r or cpt4r or cpt5r)[2] wt12 := 0-volpat_wt else wt12 := 0 if (vob1s)[0] or (vob1s)[1] or (vob1s)[2] wt131 := voldif3_wt else wt131 := 0 if (vor1s)[0] or (vor1s)[1] or (vor1s)[2] wt141 := 0-voldif3_wt else wt141 := 0 if (vob1m)[0] or (vob1m)[1] or (vob1m)[2] wt132 := voldif2_wt else wt132 := 0 if (vor1m)[0] or (vor1m)[1] or (vor1m)[2] wt142 := 0-voldif2_wt else wt142 := 0 if (vob1w)[0] or (vob1w)[1] or (vob1w)[2] wt133 := voldif1_wt else wt133 := 0 if (vor1w)[0] or (vor1w)[1] or (vor1w)[2] wt143 := 0-voldif1_wt else wt143 := 0 if (dif2>dif2[1] and dif2<0)[0] or (dif2>dif2[1] and dif2<0)[1] or (dif2>dif2[1] and dif2<0)[2] wt15 := cancol_wt else wt15 := 0 if (dif2<dif2[1] and dif2>0)[0] or (dif2<dif2[1] and dif2>0)[1] or (dif2<dif2[1] and dif2>0)[2] wt16 := 0-cancol_wt else wt16 := 0 if (b61 or b62 or b63 or b64 or b65 or b66 or b51 or b52 or b53 or b54 or b55 or b41 or b42 or b43 or b44 or b31 or b32 or b21)[0] or (b61 or b62 or b63 or b64 or b65 or b66 or b51 or b52 or b53 or b54 or b55 or b41 or b42 or b43 or b44 or b31 or b32 or b21)[1] or (b61 or b62 or b63 or b64 or b65 or b66 or b51 or b52 or b53 or b54 or b55 or b41 or b42 or b43 or b44 or b31 or b32 or b21)[2] wt17 := cp_wt else wt17 := 0 if (r61 or r62 or r63 or r64 or r65 or r66 or r51 or r52 or r53 or r54 or r55 or r41 or r42 or r43 or r44 or r31 or r32 or r21)[0] or (r61 or r62 or r63 or r64 or r65 or r66 or r51 or r52 or r53 or r54 or r55 or r41 or r42 or r43 or r44 or r31 or r32 or r21)[1] or (r61 or r62 or r63 or r64 or r65 or r66 or r51 or r52 or r53 or r54 or r55 or r41 or r42 or r43 or r44 or r31 or r32 or r21)[2] wt18 := 0-cp_wt else wt18 := 0 if bhc[0] or bhc[1] or bhc[2] wt19 := hc_wt else wt19 := 0 if rhc[0] or rhc[1] or rhc[2] wt20 := 0-hc_wt else wt20 := 0 if shouldPlot1[0] or shouldPlot1[1] or shouldPlot1[2] wt21 := bws_wt else wt21 := 0 if shouldPlot[0] or shouldPlot[1] or shouldPlot[2] wt22 := 0-bws_wt else wt22 := 0 if shouldPlot61[0] or shouldPlot61[1] or shouldPlot61[2] wt231 := kld1_wt else wt231 := 0 if shouldPlot71[0] or shouldPlot71[1] or shouldPlot71[2] wt241 := 0-kld1_wt else wt241 := 0 if shouldPlot81[0] or shouldPlot81[1] or shouldPlot81[2] wt251 := fvgdet1_wt else wt251 := 0 if shouldPlot91[0] or shouldPlot91[1] or shouldPlot91[2] wt261 := 0-fvgdet1_wt else wt261 := 0 if shouldPlot62[0] or shouldPlot62[1] or shouldPlot62[2] wt232 := kld2_wt else wt232 := 0 if shouldPlot72[0] or shouldPlot72[1] or shouldPlot72[2] wt242 := 0-kld2_wt else wt242 := 0 if shouldPlot82[0] or shouldPlot82[1] or shouldPlot82[2] wt252 := fvgdet2_wt else wt252 := 0 if shouldPlot92[0] or shouldPlot92[1] or shouldPlot92[2] wt262 := 0-fvgdet2_wt else wt262 := 0 if shouldPlot63[0] or shouldPlot63[1] or shouldPlot63[2] wt233 := kld3_wt else wt233 := 0 if shouldPlot73[0] or shouldPlot73[1] or shouldPlot73[2] wt243 := 0-kld3_wt else wt243 := 0 if shouldPlot83[0] or shouldPlot83[1] or shouldPlot83[2] wt253 := fvgdet3_wt else wt253 := 0 if shouldPlot93[0] or shouldPlot93[1] or shouldPlot93[2] wt263 := 0-fvgdet3_wt else wt263 := 0 if shouldPlot101[0] or shouldPlot101[1] or shouldPlot101[2] wt271 := obdet1_wt else wt271 := 0 if shouldPlot111[0] or shouldPlot111[1] or shouldPlot111[2] wt281 := 0-obdet1_wt else wt281 := 0 if shouldPlot102[0] or shouldPlot102[1] or shouldPlot102[2] wt272 := obdet2_wt else wt272 := 0 if shouldPlot112[0] or shouldPlot112[1] or shouldPlot112[2] wt282 := 0-obdet2_wt else wt282 := 0 if shouldPlot103[0] or shouldPlot103[1] or shouldPlot103[2] wt273 := obdet3_wt else wt273 := 0 if shouldPlot113[0] or shouldPlot113[1] or shouldPlot113[2] wt283 := 0-obdet3_wt else wt283 := 0 wt = wt271+wt272+wt273+wt281+wt282+wt283+wt231+wt241+wt251+wt261+wt232+wt242+wt252+wt262+wt233+wt243+wt253+wt263+wt131+wt141+wt132+wt142+wt133+wt143+wt51+wt61+wt71+wt81+wt52+wt62+wt72+wt82+wt53+wt63+wt73+wt83+wt1+wt2+wt3+wt4+wt9+wt10+wt11+wt12+wt15+wt16+wt17+wt18+wt19+wt20+wt21+wt22 plot((wt), color=color.new(#b71c1c, 0)) plot((0), color=color.new(#000000, 0)) plot((2), color=color.new(#000000, 0)) plot((-2), color=color.new(#000000, 0))