Automatic patterns studies, Bull, Bear, Bullish only & Bearish only For ThinkOrSwim

Hello everyone, this is my first big study I've worked on, been busy the last weekend so I didn't post it once I finished it. @BenTen had posted this study on this thread and I thought it was awesome, The format was started based on the 2013 patterns available and someone added on to it. I reorganized it so it's in order of the current order of available patterns on this definition list.I also changed the color so the darker shade is the reversal, and a lighter shade of the same color is signaling a continuation. All of this info is added to an addlabel for each study. As you can see, you can change the inputs to show various metrics of the patterns, just an arrow, number ID, and verbose(the pattern name). You can also select up 3 patterns which will show instead of all of them. I won't go into detail on the bull because a working version is already up at the first link on this document. Use all 4 studies together on your upper, or pick and choose which ones you want to use. Super helpful for learning which kinds of candles occur the most often, which ones will get ignored the most, etc. some I have found will be a strong reversal signal

I will post another version in the comments once I finish that it is a work in progress still. It will show just the patterns and you can't select a certain few to display, it will only show all patterns regardless of the 4 types of patterns, meaning bull, bear, B&B Bull, B&B bear.

It helps if you put the studies in the order I listed below, because I have:
Show 1st, 2nd, 3rd for bull only.
Show 3rd, 4th, 5th for bear only.
Show 7th, 8th, 9th for B&B Bull only.
Show 10th, 11th, 12th for B&B Bear only

This is verbose only bull:
0cm3aB8.png


Code Bull only:
Code:
#Bullish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 20 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#reformated by mourningwood4521 on usethinkscript to go in order of libray terms as of March 2021
#Report any problems to 'StanL' on TOS' ThinkScript Lounge
#Revision date 3:36 PM 9/29/2013

AddLabel(yes, "Bullish only Reversals", CreateColor(0, 255, 0));
AddLabel(yes, "Bullish only Continuations: 3, 7, 12, 19, 20", CreateColor(153, 255, 153));

input TurnAlertOff_bull = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_bull = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubble_bull = {default none_bull, Verbose_bull, ID_Number_bull};#Hint showBubble:Choice of what format the candle bubble ID should have

input ShowAll_bull = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.


def BubNone_bull = If (showBubble_bull == showBubble_bull.none_bull, 1, 0);

def BubVerb_bull = If (showBubble_bull == showBubble_bull.Verbose_bull, 1, 0);

def BubNumb_bull =  If (showBubble_bull == showBubble_bull.ID_Number_bull, 1, 0);

#####################################################
############ Define the three selection Enums #################
#####################################################

input ShowFirst =  {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

input ShowSecond = {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

input ShowThird =  {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle;

switch (ShowFirst) {
case ConcealingBabySwallow_1:

    candle = If(ShowFirst.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle =  If(ShowFirst.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle = If(ShowFirst.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle = If(ShowFirst.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle = If(ShowFirst.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle = If(ShowFirst.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle = If(ShowFirst.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle = If(ShowFirst.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle = If(ShowFirst.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle = If(ShowFirst.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle = If(ShowFirst.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle = If(ShowFirst.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle = If(ShowFirst.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle = If(ShowFirst.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle = If(ShowFirst.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle = If(ShowFirst.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle = If(ShowFirst.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle = If(ShowFirst.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle = If(ShowFirst.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle = If(ShowFirst.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show1st = candle;

Show1st.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show1st.SetDefaultColor(Color.GREEN);

Show1st.SetLineWeight(5);
#####################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle2;

switch (ShowSecond) {
case ConcealingBabySwallow_1:

    candle2 = If(ShowSecond.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle2 =  If(ShowSecond.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle2 = If(ShowSecond.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle2 = If(ShowSecond.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle2 = If(ShowSecond.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle2 = If(ShowSecond.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle2 = If(ShowSecond.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle2 = If(ShowSecond.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle2 = If(ShowSecond.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle2 = If(ShowSecond.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle2 = If(ShowSecond.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle2 = If(ShowSecond.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle2 = If(ShowSecond.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle2 = If(ShowSecond.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle2 = If(ShowSecond.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle2 = If(ShowSecond.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle2 = If(ShowSecond.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle2 = If(ShowSecond.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle2 = If(ShowSecond.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle2 = If(ShowSecond.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle2 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show2nd = candle2;

Show2nd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show2nd.SetDefaultColor(Color.GREEN);

Show2nd.SetLineWeight(5);
#####################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle3;

switch (ShowThird) {
case ConcealingBabySwallow_1:

    candle3 = If(ShowThird.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle3 =  If(ShowThird.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle3 = If(ShowThird.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle3 = If(ShowThird.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle3 = If(ShowThird.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle3 = If(ShowThird.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle3 = If(ShowThird.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle3 = If(ShowThird.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle3 = If(ShowThird.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle3 = If(ShowThird.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle3 = If(ShowThird.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle3 = If(ShowThird.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle3 = If(ShowThird.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle3 = If(ShowThird.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle3 = If(ShowThird.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle3 = If(ShowThird.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle3 = If(ShowThird.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle3 = If(ShowThird.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle3 = If(ShowThird.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle3 = If(ShowThird.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle3 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show3rd = candle3;

Show3rd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show3rd.SetDefaultColor(Color.GREEN);

Show3rd.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

#ConcealingBabySwallow_1,
###### 1 ####################### ConcealingBabySwallow() #############################
def ThreeShows_1 = If (ShowFirst == ShowFirst.ConcealingBabySwallow_1 or ShowSecond == ShowSecond.ConcealingBabySwallow_1 or ShowThird == ShowThird.ConcealingBabySwallow_1, 1, 0);

rec ConcealingBabySwallow_Trig = If(ConcealingBabySwallow().bullish , ConcealingBabySwallow(), ConcealingBabySwallow_Trig[1]);

AddLabel(ConcealingBabySwallow_Trig > 0  && showLabel_bull  && ThreeShows_1, "1=ConcealingBabySwallow" , CreateColor(0, 255, 0));

Alert(ConcealingBabySwallow() && !TurnAlertOff_bull, "ConcealingBabySwallow", Alert.BAR, Sound.Chimes);

AddChartBubble(ConcealingBabySwallow() && (BubVerb_bull or BubNumb_bull) && ThreeShows_1 , low -15 ,  if BubNumb_bull

then "1" else if BubVerb_bull then "ConcealingBabySwallow" else "" , CreateColor(0, 255, 0)  , no);



#Hammer_2,  
###### 2 ####################### Hammer() #############################
def ThreeShows_2 = If (ShowFirst == ShowFirst.Hammer_2 or ShowSecond == ShowSecond.Hammer_2 or ShowThird == ShowThird.Hammer_2, 1, 0);

rec Hammer_Trig = If(Hammer().bullish , Hammer(), Hammer_Trig[1]);

AddLabel(Hammer_Trig > 0  && showLabel_bull  && ThreeShows_2, "2=Hammer" , CreateColor(0, 255, 0));

Alert(Hammer() && !TurnAlertOff_bull, "Hammer", Alert.BAR, Sound.Chimes);

AddChartBubble(Hammer() && (BubVerb_bull or BubNumb_bull) && ThreeShows_2, low -15 ,  if BubNumb_bull

then "2" else if BubVerb_bull then "Hammer" else "" , CreateColor(0, 255, 0)  , no);



#HighPriceGappingPlay_3, #C
###### 2 ####################### HighPriceGappingPlay() #############################
def ThreeShows_3 = If (ShowFirst == ShowFirst.HighPriceGappingPlay_3 or ShowSecond == ShowSecond.HighPriceGappingPlay_3 or ShowThird == ShowThird.HighPriceGappingPlay_3, 1, 0);

rec HighPriceGappingPlay_Trig = If(HighPriceGappingPlay().bullish , HighPriceGappingPlay(), HighPriceGappingPlay_Trig[1]);

AddLabel(HighPriceGappingPlay_Trig > 0  && showLabel_bull  && ThreeShows_3, "3=HighPriceGappingPlay" , CreateColor(153, 255, 153));

Alert(HighPriceGappingPlay() && !TurnAlertOff_bull, "HighPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(HighPriceGappingPlay() && (BubVerb_bull or BubNumb_bull) && ThreeShows_3, low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "HighPriceGappingPlay" else "" , CreateColor(153, 255, 153)  , no);


#HomingPigeon_4,
###### 4 ####################### HomingPigeon() #############################
def ThreeShows_4 = If (ShowFirst == ShowFirst.HomingPigeon_4 or ShowSecond == ShowSecond.HomingPigeon_4 or ShowThird == ShowThird.HomingPigeon_4, 1, 0);

rec HomingPigeon_Trig = If(HomingPigeon().bullish , HomingPigeon(), HomingPigeon_Trig[1]);

AddLabel(HomingPigeon_Trig > 0  && showLabel_bull  && ThreeShows_4, "4=HomingPigeon" , CreateColor(0, 255, 0));

Alert(HomingPigeon() && !TurnAlertOff_bull, "HomingPigeon", Alert.BAR, Sound.Chimes);

AddChartBubble(HomingPigeon() && (BubVerb_bull or BubNumb_bull) && ThreeShows_4, low -15 ,  if BubNumb_bull

then "4" else if BubVerb_bull then "HomingPigeon" else "" , CreateColor(0, 255, 0)  , no);


#InvertedHammer_5,
###### 5 ####################### InvertedHammer() #############################
def ThreeShows_5 = If (ShowFirst == ShowFirst.InvertedHammer_5 or ShowSecond == ShowSecond.InvertedHammer_5 or ShowThird == ShowThird.InvertedHammer_5, 1, 0);

rec InvertedHammer_Trig = If(InvertedHammer().bullish , InvertedHammer(), InvertedHammer_Trig[1]);

AddLabel(InvertedHammer_Trig > 0  && showLabel_bull  && ThreeShows_5, "5=InvertedHammer" , CreateColor(0, 255, 0));

Alert(InvertedHammer() && !TurnAlertOff_bull, "InvertedHammer", Alert.BAR, Sound.Chimes);

AddChartBubble(InvertedHammer() && (BubVerb_bull or BubNumb_bull) && ThreeShows_5, low -15 ,  if BubNumb_bull

then "5" else if BubVerb_bull then "InvertedHammer" else "" , CreateColor(0, 255, 0)  , no);

#MatchingLow_6,
###### 6 ####################### MatchingLow() #############################
def ThreeShows_6 = If (ShowFirst == ShowFirst.MatchingLow_6 or ShowSecond == ShowSecond.MatchingLow_6 or ShowThird == ShowThird.MatchingLow_6, 1, 0);

rec MatchingLow_Trig = If(MatchingLow().bullish , MatchingLow(), MatchingLow_Trig[1]);

AddLabel(MatchingLow_Trig > 0  && showLabel_bull  && ThreeShows_6, "6=MatchingLow" , CreateColor(0, 255, 0));

Alert(MatchingLow() && !TurnAlertOff_bull, "MatchingLow", Alert.BAR, Sound.Chimes);

AddChartBubble(MatchingLow() && (BubVerb_bull or BubNumb_bull) && ThreeShows_6, low -15 ,  if BubNumb_bull

then "6" else if BubVerb_bull then "MatchingLow" else "" , CreateColor(0, 255, 0)  , no);

#MatHold_7,  #C
###### 7 ####################### MatHold() #############################
def ThreeShows_7 = If (ShowFirst == ShowFirst.MatHold_7 or ShowSecond == ShowSecond.MatHold_7 or ShowThird == ShowThird.MatHold_7, 1, 0);

rec MatHold_Trig = If(MatHold().bullish , MatHold(), MatHold_Trig[1]);

AddLabel(MatHold_Trig > 0  && showLabel_bull  && ThreeShows_7, "7=MatHold" , CreateColor(153, 255, 153));

Alert(MatHold() && !TurnAlertOff_bull, "MatHold", Alert.BAR, Sound.Chimes);

AddChartBubble(MatHold() && (BubVerb_bull or BubNumb_bull) && ThreeShows_7, low -15 ,  if BubNumb_bull

then "7" else if BubVerb_bull then "MatHold" else "" , CreateColor(153, 255, 153)  , no);



#MorningDojiStar_8,
###### 2 ####################### MorningDojiStar() #############################
def ThreeShows_8 = If (ShowFirst == ShowFirst.MorningDojiStar_8 or ShowSecond == ShowSecond.MorningDojiStar_8 or ShowThird == ShowThird.MorningDojiStar_8, 1, 0);

rec MorningDojiStar_Trig = If(MorningDojiStar().bullish , MorningDojiStar(), MorningDojiStar_Trig[1]);

AddLabel(MorningDojiStar_Trig > 0  && showLabel_bull  && ThreeShows_8, "8=MorningDojiStar" , CreateColor(0, 255, 0));

Alert(MorningDojiStar() && !TurnAlertOff_bull, "MorningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningDojiStar() && (BubVerb_bull or BubNumb_bull) && ThreeShows_8, low -15 ,  if BubNumb_bull

then "8" else if BubVerb_bull then "MorningDojiStar" else "" , CreateColor(0, 255, 0)  , no);



#MorningStar_9,
###### 9 ####################### MorningStar() #############################
def ThreeShows_9 = If (ShowFirst == ShowFirst.MorningStar_9 or ShowSecond == ShowSecond.MorningStar_9 or ShowThird == ShowThird.MorningStar_9, 1, 0);

rec MorningStar_Trig = If(MorningStar().bullish , MorningStar(), MorningStar_Trig[1]);

AddLabel(MorningStar_Trig > 0  && showLabel_bull  && ThreeShows_9, "9=MorningStar" , CreateColor(0, 255, 0));

Alert(MorningStar() && !TurnAlertOff_bull, "MorningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningStar() && (BubVerb_bull or BubNumb_bull) && ThreeShows_9, low -15 ,  if BubNumb_bull

then "9" else if BubVerb_bull then "MorningStar" else "" , CreateColor(0, 255, 0)  , no);



#OneWhiteSoldier_10,
###### 10 ####################### OneWhiteSoldier() #############################
def ThreeShows_10 = If (ShowFirst == ShowFirst.OneWhiteSoldier_10 or ShowSecond == ShowSecond.OneWhiteSoldier_10 or ShowThird == ShowThird.OneWhiteSoldier_10, 1, 0);

rec OneWhiteSoldier_Trig = If(OneWhiteSoldier().bullish , OneWhiteSoldier(), OneWhiteSoldier_Trig[1]);

AddLabel(OneWhiteSoldier_Trig > 0  && showLabel_bull  && ThreeShows_10, "10=OneWhiteSoldier" , CreateColor(0, 255, 0));

Alert(OneWhiteSoldier() && !TurnAlertOff_bull, "OneWhiteSoldier", Alert.BAR, Sound.Chimes);

AddChartBubble(OneWhiteSoldier() && (BubVerb_bull or BubNumb_bull) && ThreeShows_10, low -15 ,  if BubNumb_bull

then "10" else if BubVerb_bull then "OneWhiteSoldier" else "" , CreateColor(0, 255, 0)  , no);




#PiercingLine_11,
###### 11 ####################### PiercingLine() #############################
def ThreeShows_11 = If (ShowFirst == ShowFirst.PiercingLine_11 or ShowSecond == ShowSecond.PiercingLine_11 or ShowThird == ShowThird.PiercingLine_11, 1, 0);

rec PiercingLine_Trig = If(PiercingLine().bullish , PiercingLine(), Hammer_Trig[1]);

AddLabel(Hammer_Trig > 0  && showLabel_bull  && ThreeShows_11, "11=PiercingLine" , CreateColor(0, 255, 0));

Alert(PiercingLine() && !TurnAlertOff_bull, "PiercingLine", Alert.BAR, Sound.Chimes);

AddChartBubble(PiercingLine() && (BubVerb_bull or BubNumb_bull) && ThreeShows_11, low -15 ,  if BubNumb_bull

then "11" else if BubVerb_bull then "PiercingLine" else "" , CreateColor(0, 255, 0)  , no);



#RisingThreeMethods_12, #C
###### 12 ####################### RisingThreeMethods() #############################
def ThreeShows_12 = If (ShowFirst == ShowFirst.RisingThreeMethods_12 or ShowSecond == ShowSecond.RisingThreeMethods_12 or ShowThird == ShowThird.RisingThreeMethods_12, 1, 0);

rec RisingThreeMethods_Trig = If(RisingThreeMethods().bullish , RisingThreeMethods(), RisingThreeMethods_Trig[1]);

AddLabel(RisingThreeMethods_Trig > 0  && showLabel_bull  && ThreeShows_12, "3=RisingThreeMethods" , CreateColor(153, 255, 153));

Alert(RisingThreeMethods() && !TurnAlertOff_bull, "RisingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(RisingThreeMethods() && (BubVerb_bull or BubNumb_bull) && ThreeShows_12, low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "RisingThreeMethods" else "" , CreateColor(153, 255, 153)  , no);





#Sticksandwich_13,
###### 13 ####################### Sticksandwich() #############################
def ThreeShows_13 = If (ShowFirst == ShowFirst.Sticksandwich_13 or ShowSecond == ShowSecond.Sticksandwich_13 or ShowThird == ShowThird.Sticksandwich_13, 1, 0);

rec Sticksandwich_Trig = If(Sticksandwich().bullish , Sticksandwich(), Sticksandwich_Trig[1]);

AddLabel(Sticksandwich_Trig > 0  && showLabel_bull  && ThreeShows_13, "13=Sticksandwich" , CreateColor(0, 255, 0));

Alert(Sticksandwich() && !TurnAlertOff_bull, "Sticksandwich", Alert.BAR, Sound.Chimes);

AddChartBubble(Sticksandwich() && (BubVerb_bull or BubNumb_bull) && ThreeShows_13, low -15 ,  if BubNumb_bull

then "13" else if BubVerb_bull then "Sticksandwich" else "" , CreateColor(0, 255, 0)  , no);



#ThreeInsideUp_14,
###### 14 ####################### ThreeInsideUp() #############################
def ThreeShows_14 = If (ShowFirst == ShowFirst.ThreeInsideUp_14 or ShowSecond == ShowSecond.ThreeInsideUp_14 or ShowThird == ShowThird.ThreeInsideUp_14, 1, 0);

rec ThreeInsideUp_Trig = If(ThreeInsideUp().bullish , ThreeInsideUp(), ThreeInsideUp_Trig[1]);

AddLabel(ThreeInsideUp_Trig > 0  && showLabel_bull  && ThreeShows_14, "14=ThreeInsideUp" , CreateColor(0, 255, 0));

Alert(ThreeInsideUp() && !TurnAlertOff_bull, "ThreeInsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideUp() && (BubVerb_bull or BubNumb_bull) && ThreeShows_14, low -15 ,  if BubNumb_bull

then "14" else if BubVerb_bull then "ThreeInsideUp" else "" , CreateColor(0, 255, 0)  , no);




#ThreeOutsideUp_15,
###### 15 ####################### ThreeOutsideUp() #############################
def ThreeShows_15 = If (ShowFirst == ShowFirst.ThreeOutsideUp_15 or ShowSecond == ShowSecond.ThreeOutsideUp_15 or ShowThird == ShowThird.ThreeOutsideUp_15, 1, 0);

rec ThreeOutsideUp_Trig = If(ThreeOutsideUp().bullish , ThreeOutsideUp(), ThreeOutsideUp_Trig[1]);

AddLabel(ThreeOutsideUp_Trig > 0  && showLabel_bull  && ThreeShows_15, "15=ThreeOutsideUp" , CreateColor(0, 255, 0));

Alert(ThreeOutsideUp() && !TurnAlertOff_bull, "ThreeOutsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideUp() && (BubVerb_bull or BubNumb_bull) && ThreeShows_15, low -15 ,  if BubNumb_bull

then "15" else if BubVerb_bull then "ThreeOutsideUp" else "" , CreateColor(0, 255, 0)  , no);




#ThreeStarsInTheSouth_16,
###### 2 ####################### ThreeStarsInTheSouth() #############################
def ThreeShows_16 = If (ShowFirst == ShowFirst.ThreeStarsInTheSouth_16 or ShowSecond == ShowSecond.ThreeStarsInTheSouth_16 or ShowThird == ShowThird.ThreeStarsInTheSouth_16, 1, 0);

rec ThreeStarsInTheSouth_Trig = If(ThreeStarsInTheSouth().bullish , ThreeStarsInTheSouth(), ThreeStarsInTheSouth_Trig[1]);

AddLabel(ThreeStarsInTheSouth_Trig > 0  && showLabel_bull  && ThreeShows_16, "16=ThreeStarsInTheSouth" , CreateColor(0, 255, 0));

Alert(ThreeStarsInTheSouth() && !TurnAlertOff_bull, "ThreeStarsInTheSouth", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeStarsInTheSouth() && (BubVerb_bull or BubNumb_bull) && ThreeShows_16, low -15 ,  if BubNumb_bull

then "16" else if BubVerb_bull then "ThreeStarsInTheSouth" else "" , CreateColor(0, 255, 0)  , no);




#ThreeWhiteSoldiers_17,
###### 1 ####################### ThreeWhiteSoldiers() #############################
def ThreeShows_17 = If (ShowFirst == ShowFirst.ThreeWhiteSoldiers_17 or ShowSecond == ShowSecond.ThreeWhiteSoldiers_17 or ShowThird == ShowThird.ThreeWhiteSoldiers_17, 1, 0);

rec ThreeWhiteSoldiers_Trig = If(ThreeWhiteSoldiers().bullish , ThreeWhiteSoldiers(), ThreeWhiteSoldiers_Trig[1]);

AddLabel(ThreeWhiteSoldiers_Trig > 0  && showLabel_bull  && ThreeShows_17, "17=ThreeWhiteSoldiers" , CreateColor(0, 255, 0));

Alert(ThreeWhiteSoldiers() && !TurnAlertOff_bull, "ThreeWhiteSoldiers", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeWhiteSoldiers() && (BubVerb_bull or BubNumb_bull) && ThreeShows_17 , low -15 ,  if BubNumb_bull

then "17" else if BubVerb_bull then "ThreeWhiteSoldiers" else "" , CreateColor(0, 255, 0)  , no);




#UniqueThreeRiverBottom_18,
###### 18 ####################### UniqueThreeRiverBottom() #############################
def ThreeShows_18 = If (ShowFirst == ShowFirst.UniqueThreeRiverBottom_18 or ShowSecond == ShowSecond.UniqueThreeRiverBottom_18 or ShowThird == ShowThird.UniqueThreeRiverBottom_18, 1, 0);

rec UniqueThreeRiverBottom_Trig = If(UniqueThreeRiverBottom().bullish , UniqueThreeRiverBottom(), UniqueThreeRiverBottom_Trig[1]);

AddLabel(UniqueThreeRiverBottom_Trig > 0  && showLabel_bull  && ThreeShows_18, "18=UniqueThreeRiverBottom" , CreateColor(0, 255, 0));

Alert(UniqueThreeRiverBottom() && !TurnAlertOff_bull, "UniqueThreeRiverBottom", Alert.BAR, Sound.Chimes);

AddChartBubble(UniqueThreeRiverBottom() && (BubVerb_bull or BubNumb_bull) && ThreeShows_1 , low -15 ,  if BubNumb_bull

then "18" else if BubVerb_bull then "UniqueThreeRiverBottom" else "" , CreateColor(0, 255, 0)  , no);



#UpsideGapThreeMethods_19, #C
###### 19 ####################### UpsideGapThreeMethods() #############################
def ThreeShows_19 = If (ShowFirst == ShowFirst.UpsideGapThreeMethods_19 or ShowSecond == ShowSecond.UpsideGapThreeMethods_19 or ShowThird == ShowThird.UpsideGapThreeMethods_19, 1, 0);

rec UpsideGapThreeMethods_Trig = If(UpsideGapThreeMethods().bullish , UpsideGapThreeMethods(), UpsideGapThreeMethods_Trig[1]);

AddLabel(UpsideGapThreeMethods_Trig > 0  && showLabel_bull  && ThreeShows_19, "19=UpsideGapThreeMethods" , CreateColor(153, 255, 153));

Alert(UpsideGapThreeMethods() && !TurnAlertOff_bull, "UpsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapThreeMethods() && (BubVerb_bull or BubNumb_bull) && ThreeShows_19 , low -15 ,  if BubNumb_bull

then "19" else if BubVerb_bull then "UpsideGapThreeMethods" else "" , CreateColor(153, 255, 153)  , no);



#UpsideTasukiGap_20,    #C
###### 20 ####################### UpsideTasukiGap() #############################
def ThreeShows_20 = If (ShowFirst == ShowFirst.UpsideTasukiGap_20 or ShowSecond == ShowSecond.UpsideTasukiGap_20 or ShowThird == ShowThird.UpsideTasukiGap_20, 1, 0);

rec UpsideTasukiGap_Trig = If(UpsideTasukiGap().bullish , UpsideTasukiGap(), UpsideTasukiGap_Trig[1]);

AddLabel(UpsideTasukiGap_Trig > 0  && showLabel_bull  && ThreeShows_20, "20=UpsideTasukiGap" , CreateColor(153, 255, 153));

Alert(UpsideTasukiGap() && !TurnAlertOff_bull, "UpsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideTasukiGap() && (BubVerb_bull or BubNumb_bull) && ThreeShows_20 , low -15 ,  if BubNumb_bull

then "20" else if BubVerb_bull then "UpsideTasukiGap" else "" , CreateColor(153, 255, 153)  , no);


##################################################################################################################################


#ConcealingBabySwallow_1, # R
###### 1 ####################### ConcealingBabySwallow() #############################
def candleAll_1 =  If(ShowAll_bull == yes , ConcealingBabySwallow(), Double.NaN);

plot CBS = candleAll_1;

CBS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

CBS.SetDefaultColor(CreateColor(0, 255, 0));

CBS.SetLineWeight(5);

rec ConcealingBabySwallow_Trig_1 = If (ConcealingBabySwallow().bullish , + BarNumber(), ConcealingBabySwallow_Trig_1[1] );

AddLabel(ConcealingBabySwallow_Trig_1 > 0 && showLabel_bull && ShowAll_bull,  "1=ConcealingBabySwallow" , CreateColor(0, 255, 0));

Alert(ConcealingBabySwallow()  && !TurnAlertOff_bull && ShowAll_bull, "ConcealingBabySwallow", Alert.BAR, Sound.Chimes);

AddChartBubble(ConcealingBabySwallow() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "1" else if BubVerb_bull then "ConcealingBabySwallow" else "" ,  CreateColor(0, 255, 0) , no);



#Hammer_2,    # R
###### 2 ####################### Hammer() #############################
def candleAll_2 =  If(ShowAll_bull == yes , Hammer(), Double.NaN);

plot Hammer = candleAll_2;

Hammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Hammer.SetDefaultColor(CreateColor(0, 255, 0));

Hammer.SetLineWeight(5);

rec Hammer_Trig_2 = If (Hammer().bullish , + BarNumber(), Hammer_Trig_2[1] );

AddLabel(Hammer_Trig_2 > 0 && showLabel_bull && ShowAll_bull,  "2=Hammer" , CreateColor(0, 255, 0));

Alert(Hammer()  && !TurnAlertOff_bull && ShowAll_bull, "Hammer", Alert.BAR, Sound.Chimes);

AddChartBubble(Hammer() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "2" else if BubVerb_bull then "Hammer" else "" ,  CreateColor(0, 255, 0) , no);




#HighPriceGappingPlay_3, #C
###### 3 ####################### HighPriceGappingPlay() & showAll #################################
def  candleAll_3 = If(ShowAll_bull == yes , HighPriceGappingPlay(), Double.NaN);

plot AB = candleAll_3;

AB.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

AB.SetDefaultColor(CreateColor(153, 255, 153));

AB.SetLineWeight(5);

rec HighPriceGappingPlay_Trig_3 = If (HighPriceGappingPlay().bullish, + BarNumber(), HighPriceGappingPlay_Trig_3[1] );

AddLabel(HighPriceGappingPlay_Trig_3 > 0 && showLabel_bull && ShowAll_bull, "3=HighPriceGappingPlay" , CreateColor(153, 255, 153));

Alert(HighPriceGappingPlay()  && !TurnAlertOff_bull && ShowAll_bull, "HighPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(HighPriceGappingPlay() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "HighPriceGappingPlay" else "" ,  CreateColor(153, 255, 153) , no);





#HomingPigeon_4, #R
###### 4 ####################### HomingPigeon() & showAll #################################
def candleAll_4 =  If(ShowAll_bull == yes , HomingPigeon(), Double.NaN);

plot HP = candleAll_4;

HP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

HP.SetDefaultColor(CreateColor(0, 255, 0));

HP.SetLineWeight(5);

rec HomingPigeon_Trig_4 = If (HomingPigeon().bullish , + BarNumber(), HomingPigeon_Trig_4[1] );

AddLabel(HomingPigeon_Trig_4 > 0 && showLabel_bull && ShowAll_bull,  "4=HomingPigeon" , CreateColor(0, 255, 0));

Alert(HomingPigeon()  && !TurnAlertOff_bull && ShowAll_bull, "HomingPigeon", Alert.BAR, Sound.Chimes);

AddChartBubble(HomingPigeon() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "4" else if BubVerb_bull then "HomingPigeon" else "" ,  CreateColor(0, 255, 0) , no);



#InvertedHammer_5,
###### 5 ####################### InvertedHammer() #############################
def candleAll_5 =  If(ShowAll_bull == yes , InvertedHammer(), Double.NaN);

plot INVHammer = candleAll_5;

INVHammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

INVHammer.SetDefaultColor(CreateColor(0, 255, 0));

INVHammer.SetLineWeight(5);

rec InvertedHammer_Trig_5 = If (InvertedHammer().bullish , + BarNumber(), InvertedHammer_Trig_5[1] );

AddLabel(InvertedHammer_Trig_5 > 0 && showLabel_bull && ShowAll_bull,  "5=InvertedHammer" , CreateColor(0, 255, 0));

Alert(InvertedHammer()  && !TurnAlertOff_bull && ShowAll_bull, "InvertedHammer", Alert.BAR, Sound.Chimes);

AddChartBubble(InvertedHammer() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "5" else if BubVerb_bull then "InvertedHammer" else "" ,  CreateColor(0, 255, 0) , no);



#MatchingLow_6,
###### 6 ####################### MatchingLow() #############################
def candleAll_6 =  If(ShowAll_bull == yes , MatchingLow(), Double.NaN);

plot ML = candleAll_6;

ML.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

ML.SetDefaultColor(CreateColor(0, 255, 0));

ML.SetLineWeight(5);

rec MatchingLow_Trig_6 = If (MatchingLow().bullish , + BarNumber(), MatchingLow_Trig_6[1] );

AddLabel(MatchingLow_Trig_6 > 0 && showLabel_bull && ShowAll_bull,  "6=MatchingLow" , CreateColor(0, 255, 0));

Alert(MatchingLow()  && !TurnAlertOff_bull && ShowAll_bull, "MatchingLow", Alert.BAR, Sound.Chimes);

AddChartBubble(MatchingLow() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "6" else if BubVerb_bull then "MatchingLow" else "" ,  CreateColor(0, 255, 0) , no);





#MatHold_7, #C
###### 7 ####################### MatHold() #############################
def  candleAll_7 = If(ShowAll_bull == yes , MatHold(), Double.NaN);

plot MH = candleAll_7;

MH.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MH.SetDefaultColor(CreateColor(153, 255, 153));

MH.SetLineWeight(5);

rec MatHold_Trig_7 = If (MatHold().bullish, + BarNumber(), MatHold_Trig_7[1] );

AddLabel(MatHold_Trig_7 > 0 && showLabel_bull && ShowAll_bull, "7=MatHold" , CreateColor(153, 255, 153));

Alert(MatHold()  && !TurnAlertOff_bull && ShowAll_bull, "MatHold", Alert.BAR, Sound.Chimes);

AddChartBubble(MatHold() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "7" else if BubVerb_bull then "MatHold" else "" ,  CreateColor(153, 255, 153) , no);

#MorningDojiStar_8,
###### 2 ####################### MorningDojiStar() #############################
def candleAll_8 =  If(ShowAll_bull == yes , MorningDojiStar(), Double.NaN);

plot MDS = candleAll_8;

MDS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MDS.SetDefaultColor(CreateColor(0, 255, 0));

MDS.SetLineWeight(5);

rec MorningDojiStar_Trig_8 = If (MorningDojiStar().bullish , + BarNumber(), MorningDojiStar_Trig_8[1] );

AddLabel(MorningDojiStar_Trig_8 > 0 && showLabel_bull && ShowAll_bull,  "8=MorningDojiStar" , CreateColor(0, 255, 0));

Alert(MorningDojiStar()  && !TurnAlertOff_bull && ShowAll_bull, "MorningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningDojiStar() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "8" else if BubVerb_bull then "MorningDojiStar" else "" ,  CreateColor(0, 255, 0) , no);




#MorningStar_9,
###### 9 ####################### MorningStar() #############################
def candleAll_9 =  If(ShowAll_bull == yes , MorningStar(), Double.NaN);

plot MS = candleAll_9;

MS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MS.SetDefaultColor(CreateColor(0, 255, 0));

MS.SetLineWeight(5);

rec MorningStar_Trig_9 = If (MorningStar().bullish , + BarNumber(), MorningStar_Trig_9[1] );

AddLabel(MorningStar_Trig_9 > 0 && showLabel_bull && ShowAll_bull,  "9=MorningStar" , CreateColor(0, 255, 0));

Alert(MorningStar()  && !TurnAlertOff_bull && ShowAll_bull, "MorningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningStar() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "9" else if BubVerb_bull then "MorningStar" else "" ,  CreateColor(0, 255, 0) , no);


#OneWhiteSoldier_10,
###### 10 ####################### OneWhiteSoldier() #############################
def candleAll_10 =  If(ShowAll_bull == yes , OneWhiteSoldier(), Double.NaN);

plot OWS = candleAll_10;

OWS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

OWS.SetDefaultColor(CreateColor(0, 255, 0));

OWS.SetLineWeight(5);

rec OneWhiteSoldier_Trig_10 = If (OneWhiteSoldier().bullish , + BarNumber(), OneWhiteSoldier_Trig_10[1] );

AddLabel(OneWhiteSoldier_Trig_10 > 0 && showLabel_bull && ShowAll_bull,  "10=OneWhiteSoldier" , CreateColor(0, 255, 0));

Alert(OneWhiteSoldier()  && !TurnAlertOff_bull && ShowAll_bull, "OneWhiteSoldier", Alert.BAR, Sound.Chimes);

AddChartBubble(OneWhiteSoldier() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "10" else if BubVerb_bull then "OneWhiteSoldier" else "" ,  CreateColor(0, 255, 0) , no);



#PiercingLine_11,
###### 11 ####################### PiercingLine() #############################
def candleAll_11 =  If(ShowAll_bull == yes , PiercingLine(), Double.NaN);

plot PL = candleAll_11;

PL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

PL.SetDefaultColor(CreateColor(0, 255, 0));

PL.SetLineWeight(5);

rec PiercingLine_Trig_11 = If (PiercingLine().bullish , + BarNumber(), PiercingLine_Trig_11[1] );

AddLabel(PiercingLine_Trig_11 > 0 && showLabel_bull && ShowAll_bull,  "11=PiercingLine" , CreateColor(0, 255, 0));

Alert(PiercingLine()  && !TurnAlertOff_bull && ShowAll_bull, "PiercingLine", Alert.BAR, Sound.Chimes);

AddChartBubble(PiercingLine() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "11" else if BubVerb_bull then "PiercingLine" else "" ,  CreateColor(0, 255, 0) , no);



#RisingThreeMethods_12, #C
###### 12 ####################### RisingThreeMethods() #############################
def  candleAll_12 = If(ShowAll_bull == yes , RisingThreeMethods(), Double.NaN);

plot RTM = candleAll_12;

RTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

RTM.SetDefaultColor(CreateColor(153, 255, 153));

RTM.SetLineWeight(5);

rec RisingThreeMethods_Trig_12 = If (RisingThreeMethods().bullish, + BarNumber(), RisingThreeMethods_Trig_12[1] );

AddLabel(RisingThreeMethods_Trig_12 > 0 && showLabel_bull && ShowAll_bull, "12=RisingThreeMethods" , CreateColor(153, 255, 153));

Alert(RisingThreeMethods()  && !TurnAlertOff_bull && ShowAll_bull, "RisingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(RisingThreeMethods() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "12" else if BubVerb_bull then "RisingThreeMethods" else "" ,  CreateColor(153, 255, 153) , no);



#Sticksandwich_13,
###### 13 ####################### Sticksandwich() #############################
def candleAll_13 =  If(ShowAll_bull == yes , Sticksandwich(), Double.NaN);

plot SS = candleAll_13;

SS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SS.SetDefaultColor(CreateColor(0, 255, 0));

SS.SetLineWeight(5);

rec Sticksandwich_Trig_13 = If (Sticksandwich().bullish , + BarNumber(), Sticksandwich_Trig_13[1] );

AddLabel(Sticksandwich_Trig_13 > 0 && showLabel_bull && ShowAll_bull,  "13=Sticksandwich" , CreateColor(0, 255, 0));

Alert(Sticksandwich()  && !TurnAlertOff_bull && ShowAll_bull, "Sticksandwich", Alert.BAR, Sound.Chimes);

AddChartBubble(Sticksandwich() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "13" else if BubVerb_bull then "Sticksandwich" else "" ,  CreateColor(0, 255, 0) , no);



#ThreeInsideUp_14,
###### 14 ####################### ThreeInsideUp() #############################
def candleAll_14 =  If(ShowAll_bull == yes , ThreeInsideUp(), Double.NaN);

plot TIU = candleAll_14;

TIU.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TIU.SetDefaultColor(CreateColor(0, 255, 0));

TIU.SetLineWeight(5);

rec ThreeInsideUp_Trig_14 = If (ThreeInsideUp().bullish , + BarNumber(), ThreeInsideUp_Trig_14[1] );

AddLabel(ThreeInsideUp_Trig_14 > 0 && showLabel_bull && ShowAll_bull,  "14=ThreeInsideUp" , CreateColor(0, 255, 0));

Alert(ThreeInsideUp()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeInsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideUp() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "14" else if BubVerb_bull then "ThreeInsideUp" else "" ,  CreateColor(0, 255, 0) , no);



#ThreeOutsideUp_15,
###### 15 ####################### ThreeOutsideUp() #############################
def candleAll_15 =  If(ShowAll_bull == yes , ThreeOutsideUp(), Double.NaN);

plot TOU = candleAll_15;

TOU.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TOU.SetDefaultColor(CreateColor(0, 255, 0));

TOU.SetLineWeight(5);

rec ThreeOutsideUp_Trig_15 = If (ThreeOutsideUp().bullish , + BarNumber(), ThreeOutsideUp_Trig_15[1] );

AddLabel(ThreeOutsideUp_Trig_15 > 0 && showLabel_bull && ShowAll_bull,  "15=ThreeOutsideUp" , CreateColor(0, 255, 0));

Alert(ThreeOutsideUp()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeOutsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideUp() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "15" else if BubVerb_bull then "ThreeOutsideUp" else "" ,  CreateColor(0, 255, 0) , no);




#ThreeStarsInTheSouth_16,
###### 16 ####################### ThreeStarsInTheSouth() #############################
def candleAll_16 =  If(ShowAll_bull == yes , ThreeStarsInTheSouth(), Double.NaN);

plot TSITS = candleAll_16;

TSITS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TSITS.SetDefaultColor(CreateColor(0, 255, 0));

TSITS.SetLineWeight(5);

rec ThreeStarsInTheSouth_Trig_16 = If (ThreeStarsInTheSouth().bullish , + BarNumber(), ThreeStarsInTheSouth_Trig_16[1] );

AddLabel(ThreeStarsInTheSouth_Trig_16 > 0 && showLabel_bull && ShowAll_bull,  "16=ThreeStarsInTheSouth" , CreateColor(0, 255, 0));

Alert(ThreeStarsInTheSouth()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeStarsInTheSouth", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeStarsInTheSouth() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "16" else if BubVerb_bull then "ThreeStarsInTheSouth" else "" ,  CreateColor(0, 255, 0) , no);


#ThreeWhiteSoldiers_17,
###### 17 ####################### ThreeWhiteSoldiers() #############################
def candleAll_17 =  If(ShowAll_bull == yes , ThreeWhiteSoldiers(), Double.NaN);

plot TWS = candleAll_17;

TWS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TWS.SetDefaultColor(CreateColor(0, 255, 0));

TWS.SetLineWeight(5);

rec ThreeWhiteSoldiers_Trig_17 = If (ThreeWhiteSoldiers().bullish , + BarNumber(), ThreeWhiteSoldiers_Trig_17[1] );

AddLabel(ThreeWhiteSoldiers_Trig_17 > 0 && showLabel_bull && ShowAll_bull,  "17=ThreeWhiteSoldiers" , CreateColor(0, 255, 0));

Alert(ThreeWhiteSoldiers()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeWhiteSoldiers", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeWhiteSoldiers() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "17" else if BubVerb_bull then "ThreeWhiteSoldiers" else "" ,  CreateColor(0, 255, 0) , no);



#UniqueThreeRiverBottom_18,
###### 18 ####################### UniqueThreeRiverBottom() #############################
def candleAll_18 =  If(ShowAll_bull == yes , UniqueThreeRiverBottom(), Double.NaN);

plot UTRB = candleAll_18;

UTRB.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UTRB.SetDefaultColor(CreateColor(0, 255, 0));

UTRB.SetLineWeight(5);

rec UniqueThreeRiverBottom_Trig_18 = If (UniqueThreeRiverBottom().bullish, + BarNumber(), UniqueThreeRiverBottom_Trig_18[1] );

AddLabel(UniqueThreeRiverBottom_Trig_18 > 0 && showLabel_bull && ShowAll_bull,  "18=UniqueThreeRiverBottom" , CreateColor(0, 255, 0));

Alert(UniqueThreeRiverBottom()  && !TurnAlertOff_bull && ShowAll_bull, "UniqueThreeRiverBottom", Alert.BAR, Sound.Chimes);

AddChartBubble(UniqueThreeRiverBottom() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "18" else if BubVerb_bull then "UniqueThreeRiverBottom" else "" ,  CreateColor(0, 255, 0) , no);



#UpsideGapThreeMethods_19, #C
###### 19 ####################### UpsideGapThreeMethods() #############################
def  candleAll_19 = If(ShowAll_bull == yes , UpsideGapThreeMethods(), Double.NaN);

plot UGTM = candleAll_19;

UGTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UGTM.SetDefaultColor(CreateColor(153, 255, 153));

UGTM.SetLineWeight(5);

rec UpsideGapThreeMethods_Trig_19 = If (UpsideGapThreeMethods().bullish, + BarNumber(), UpsideGapThreeMethods_Trig_19[1] );

AddLabel(UpsideGapThreeMethods_Trig_19 > 0 && showLabel_bull && ShowAll_bull, "19=UpsideGapThreeMethods" , CreateColor(153, 255, 153));

Alert(UpsideGapThreeMethods()  && !TurnAlertOff_bull && ShowAll_bull, "UpsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapThreeMethods() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "19" else if BubVerb_bull then "UpsideGapThreeMethods" else "" ,  CreateColor(153, 255, 153) , no);




#UpsideTasukiGap_20  #C
###### 20 ####################### UpsideTasukiGap() #############################
def  candleAll_20 = If(ShowAll_bull == yes , UpsideTasukiGap().bullish, Double.NaN);

plot UTG = candleAll_20;

UTG.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UTG.SetDefaultColor(CreateColor(153, 255, 153));

UTG.SetLineWeight(5);

rec UpsideTasukiGap_Trig_20 = If (UpsideTasukiGap().bullish, + BarNumber(), UpsideTasukiGap_Trig_20[1] );

AddLabel(UpsideTasukiGap_Trig_20 > 0 && showLabel_bull && ShowAll_bull, "20=UpsideTasukiGap" , CreateColor(153, 255, 153));

Alert(UpsideTasukiGap()  && !TurnAlertOff_bull && ShowAll_bull, "UpsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideTasukiGap() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "20" else if BubVerb_bull then "UpsideTasukiGap" else "" ,  CreateColor(153, 255, 153) , no);

The bear pattern is here but it needed a lot of work. So I stripped it down and started from scratch using the basic format, and here is the final product.

This is verbose bear only:
fOvmmzo.png


This is ID # bear only:
GjJ6mz8.png


This is select 3 to show example 1-verbose:
aodyGJ2.png


This is select 3 to show example 2-ID #: as you can see the choose display format works for both show all or pick n choose.
oNnav0N.png


Code Bear only:
Code:
#Bearish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 20 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#reformated by mourningwood4521 on usethinkscript to go in order of libray terms as of March 2021
#Report any problems to 'StanL' on TOS' ThinkScript Lounge
#Revision date 3:36 PM 9/29/2013


addlabel(yes, "Bearish Only Reversals",  createcolor(255, 0, 0));
addlabel(yes, "Bearish only Continuations: 4, 5, 8, 11, 12, 14, 19", createcolor(255, 153, 153));


input TurnAlertOff = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubble = {default none, Verbose, ID_Number};#Hint showBubble:Choice of what format the candle bubble ID should have

input ShowAll = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.


def BubNone = If (showBubble == showBubble.none, 1, 0);

def BubVerb = If (showBubble == showBubble.Verbose, 1, 0);

def BubNumb =  If (showBubble == showBubble.ID_Number, 1, 0);

#####################################################

############ Define the three selection Enums #################

#####################################################

input ShowFirst =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show


input ShowSecond =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show


input ShowThird =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show

###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle;

switch (ShowFirst) {
case AdvanceBlock_1:

    candle = If(ShowFirst.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle =  If(ShowFirst.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle = If(ShowFirst.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle = If(ShowFirst.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle = If(ShowFirst.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle = If(ShowFirst.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle = If(ShowFirst.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle = If(ShowFirst.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle = If(ShowFirst.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle = If(ShowFirst.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle = If(ShowFirst.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle = If(ShowFirst.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle = If(ShowFirst.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle = If(ShowFirst.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle = If(ShowFirst.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle = If(ShowFirst.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle = If(ShowFirst.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle = If(ShowFirst.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle = If(ShowFirst.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle = If(ShowFirst.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle = If(ShowFirst.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show1st = candle;

Show1st.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show1st.SetDefaultColor(Color.GREEN);

Show1st.SetLineWeight(5);
#####################################################

############ Process Input 'ShowSecond' Enum #################

#####################################################
def candle2;

switch (ShowSecond) {
case AdvanceBlock_1:

    candle2 = If(ShowSecond.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle2 =  If(ShowSecond.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle2 = If(ShowSecond.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle2 = If(ShowSecond.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle2 = If(ShowSecond.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle2 = If(ShowSecond.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle2 = If(ShowSecond.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle2 = If(ShowSecond.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle2 = If(ShowSecond.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle2 = If(ShowSecond.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle2 = If(ShowSecond.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle2 = If(ShowSecond.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle2 = If(ShowSecond.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle2 = If(ShowSecond.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle2 = If(ShowSecond.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle2 = If(ShowSecond.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle2 = If(ShowSecond.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle2 = If(ShowSecond.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle2 = If(ShowSecond.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle2 = If(ShowSecond.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle2 = If(ShowSecond.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle2 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show2nd = candle2;

Show2nd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show2nd.SetDefaultColor(Color.GREEN);

Show2nd.SetLineWeight(5);
###########################################################

############ Process Input 'Showthird' Enum ###############

###########################################################
def candle3;

switch (ShowThird) {
case AdvanceBlock_1:

    candle3 = If(ShowThird.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle3 =  If(ShowThird.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle3 = If(ShowThird.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle3 = If(ShowThird.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle3 = If(ShowThird.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle3 = If(ShowThird.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle3 = If(ShowThird.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle3 = If(ShowThird.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle3 = If(ShowThird.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle3 = If(ShowThird.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle3 = If(ShowThird.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle3 = If(ShowThird.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle3 = If(ShowThird.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle3 = If(ShowThird.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle3 = If(ShowThird.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle3 = If(ShowThird.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle3 = If(ShowThird.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle3 = If(ShowThird.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle3 = If(ShowThird.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle3 = If(ShowThird.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle3 = If(ShowThird.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle3 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show3rd = candle3;

Show3rd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show3rd.SetDefaultColor(Color.GREEN);

Show3rd.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

#AdvanceBlock_1,
###### 1 ####################### AdvanceBlock() #############################
def ThreeShows_1 = If (ShowFirst == ShowFirst.AdvanceBlock_1 or ShowSecond == ShowSecond.AdvanceBlock_1 or ShowThird == ShowThird.AdvanceBlock_1, 1, 0);

rec AdvancedB_Trig = If(AdvanceBlock().bearish , BarNumber(), AdvancedB_Trig[1]);

#Def AB_label = if(Trig_bar > 0, 1, 0);

AddLabel(AdvancedB_Trig > 0  && showLabel  && ThreeShows_1, "1=AdvanceBlock" , CreateColor(255, 0, 0));

Alert(AdvanceBlock() && !TurnAlertOff, "AdvanceBlockAlert", Alert.BAR, Sound.Chimes);

AddChartBubble(AdvanceBlock() && (BubVerb or BubNumb) && ThreeShows_1 , 15 + high ,  if BubNumb

then "1" else if BubVerb then "AdvanceBlock" else "" , CreateColor(255, 0, 0)  , yes);



#DarkcloudCover_2,
###### 2 ####################### DarkCloudCover() #################################
def ThreeShows_2 = If (ShowFirst == ShowFirst.DarkCloudCover_2 or ShowSecond == ShowSecond.DarkCloudCover_2 or ShowThird == ShowThird.DarkCloudCover_2, 1, 0);

rec DarkCloudCover_Trig = If(DarkCloudCover().bearish , BarNumber(), DarkCloudCover_Trig[1]);

AddLabel(DarkCloudCover_Trig > 0  && showLabel  && ThreeShows_2, "2=DarkCloudCover", CreateColor(255, 0, 0));

Alert(DarkCloudCover() && !TurnAlertOff, "DarkCloudCover Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DarkCloudCover() && (BubVerb or BubNumb) && ThreeShows_2, 15 + high ,  if BubNumb

then "2" else if BubVerb then "DarkCloudCover" else "" , CreateColor(255, 0, 0) , yes);



#Deliberation_3,
###### 3 ####################### Deliberation() #################################
def ThreeShows_3 = If (ShowFirst == ShowFirst.Deliberation_3 or ShowSecond == ShowSecond.Deliberation_3 or ShowThird == ShowThird.Deliberation_3, 1, 0);

rec Deliberation_Trig = If(Deliberation().bearish , BarNumber(), Deliberation_Trig[1]);

AddLabel(Deliberation_Trig > 0  && showLabel  && ThreeShows_3, "3=Deliberation", CreateColor(255, 0, 0));

Alert(Deliberation() && !TurnAlertOff, "Deliberation Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(Deliberation() && (BubVerb or BubNumb) && ThreeShows_3, 15 + high ,  if BubNumb

then "3" else if BubVerb then "Deliberation" else "" , CreateColor(255, 0, 0) , yes);




# DownsideGapThreeMethods_4,   #C
###### 4 ####################### DownsideGapThreeMethods() #################################
def ThreeShows_4 = If (ShowFirst == ShowFirst.DownsideGapThreeMethods_4 or ShowSecond == ShowSecond.DownsideGapThreeMethods_4 or ShowThird == ShowThird.DownsideGapThreeMethods_4, 1, 0);

rec DownsideGapThreeMethods_Trig = If(DownsideGapThreeMethods().bearish , BarNumber(), DownsideGapThreeMethods_Trig[1]);

AddLabel(DownsideGapThreeMethods_Trig > 0  && showLabel  && ThreeShows_4, "4=DownsideGapThreeMethods", CreateColor(255, 153, 153));

Alert(DownsideGapThreeMethods() && !TurnAlertOff, "DownsideGapThreeMethods Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideGapThreeMethods() && (BubVerb or BubNumb) && ThreeShows_4, 15 + high ,  if BubNumb

then "4" else if BubVerb then "DownsideGapThreeMethods" else "" , CreateColor(255, 153, 153) , yes);




#DownsideTasukiGap_5, #C
###### 5 ####################### DownsideTasukiGap() #################################
def ThreeShows_5 = If (ShowFirst == ShowFirst.DownsideTasukiGap_5 or ShowSecond == ShowSecond.DownsideTasukiGap_5 or ShowThird == ShowThird.DownsideTasukiGap_5, 1, 0);

rec DownsideTasukiGap_Trig = If(DownsideTasukiGap().bearish , BarNumber(), DownsideTasukiGap_Trig[1]);

AddLabel(DownsideTasukiGap_Trig > 0  && showLabel  && ThreeShows_5, "5=DownsideTasukiGap", CreateColor(255, 153, 153));

Alert(DownsideTasukiGap() && !TurnAlertOff, "DownsideTasukiGap Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideTasukiGap() && (BubVerb or BubNumb) && ThreeShows_5, 15 + high ,  if BubNumb

then "5" else if BubVerb then "DownsideTasukiGap" else "" , CreateColor(255, 153, 153) , yes);


#EveningDojiStar_6,  
###### 6 ####################### EveningDojiStar() #################################
def ThreeShows_6 = If (ShowFirst == ShowFirst.EveningDojiStar_6 or ShowSecond == ShowSecond.EveningDojiStar_6 or ShowThird == ShowThird.EveningDojiStar_6, 1, 0);

rec EveningDojiStar_Trig = If(EveningDojiStar().bearish , BarNumber(), EveningDojiStar_Trig[1]);

AddLabel(EveningDojiStar_Trig > 0  && showLabel  && ThreeShows_6, "6=EveningDojiStar", CreateColor(255, 0, 0));

Alert(EveningDojiStar() && !TurnAlertOff, "EveningDojiStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningDojiStar() && (BubVerb or BubNumb) && ThreeShows_6, 15 + high ,  if BubNumb

then "6" else if BubVerb then "EveningDojiStar" else "" , CreateColor(255, 0, 0) , yes);



#EveningStar_7,  
###### 7 ####################### EveningStar() #################################
def ThreeShows_7 = If (ShowFirst == ShowFirst.EveningStar_7 or ShowSecond == ShowSecond.EveningStar_7 or ShowThird == ShowThird.EveningStar_7, 1, 0);

rec EveningStar_Trig = If(EveningStar().bearish , BarNumber(), EveningStar_Trig[1]);

AddLabel(EveningStar_Trig > 0  && showLabel  && ThreeShows_7, "7=EveningStar", CreateColor(255, 0, 0));

Alert(EveningStar() && !TurnAlertOff, "EveningStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningStar() && (BubVerb or BubNumb) && ThreeShows_7, 15 + high ,  if BubNumb

then "7" else if BubVerb then "EveningStar" else "" , CreateColor(255, 0, 0) , yes);



#FallingThreeMethods_8, #C
###### 8 ####################### FallingThreeMethods() #################################
def ThreeShows_8 = If (ShowFirst == ShowFirst.FallingThreeMethods_8 or ShowSecond == ShowSecond.FallingThreeMethods_8 or ShowThird == ShowThird.FallingThreeMethods_8, 1, 0);

rec FallingThreeMethods_Trig = If(FallingThreeMethods().bearish , BarNumber(), FallingThreeMethods_Trig[1]);

AddLabel(FallingThreeMethods_Trig > 0  && showLabel  && ThreeShows_8, "8=FallingThreeMethods", CreateColor(255, 153, 153));

Alert(FallingThreeMethods() && !TurnAlertOff, "FallingThreeMethods Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(FallingThreeMethods() && (BubVerb or BubNumb) && ThreeShows_8, 15 + high ,  if BubNumb

then "8" else if BubVerb then "FallingThreeMethods" else "" , CreateColor(255, 153, 153) , yes);




#HangingMan_9,  
###### 9 ####################### HangingMan() #################################
def ThreeShows_9 = If (ShowFirst == ShowFirst.HangingMan_9 or ShowSecond == ShowSecond.HangingMan_9 or ShowThird == ShowThird.HangingMan_9, 1, 0);

rec HangingMan_Trig = If(HangingMan().bearish , BarNumber(), HangingMan_Trig[1]);

AddLabel(HangingMan_Trig > 0  && showLabel  && ThreeShows_9, "9=HangingMan", CreateColor(255, 0, 0));

Alert(HangingMan() && !TurnAlertOff, "HangingMan Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(HangingMan() && (BubVerb or BubNumb) && ThreeShows_9,  15 + high,  if BubNumb

then "9" else if BubVerb then "HangingMan" else "" , CreateColor(255, 0, 0), yes);



#IdenticalThreeCrows_10,  
###### 10 ####################### IdenticalThreeCrows() #################################
def ThreeShows_10 = If (ShowFirst == ShowFirst.IdenticalThreeCrows_10 or ShowSecond == ShowSecond.IdenticalThreeCrows_10 or ShowThird == ShowThird.IdenticalThreeCrows_10, 1, 0);

rec IdenticalThreeCrows_Trig = If(IdenticalThreeCrows().bearish , BarNumber(), IdenticalThreeCrows_Trig[1]);

AddLabel(IdenticalThreeCrows_Trig > 0  && showLabel  && ThreeShows_10, "10=IdenticalThreeCrows", CreateColor(255, 0, 0));

Alert(IdenticalThreeCrows() && !TurnAlertOff, "IdenticalThreeCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(IdenticalThreeCrows() && (BubVerb or BubNumb) && ThreeShows_10, 15 + high ,  if BubNumb

then "10" else if BubVerb then "IdenticalThreeCrows" else "" , CreateColor(255, 0, 0) , yes);



#InNeck_11,    #C
###### 11 ####################### InNeck() #################################
def ThreeShows_11 = If (ShowFirst == ShowFirst.InNeck_11 or ShowSecond == ShowSecond.InNeck_11 or ShowThird == ShowThird.InNeck_11, 1, 0);

rec InNeck_Trig = If(InNeck().bearish , BarNumber(), InNeck_Trig[1]);

AddLabel(InNeck_Trig > 0  && showLabel  && ThreeShows_11, "11=InNeck", CreateColor(255, 153, 153));

Alert(InNeck() && !TurnAlertOff, "InNeck Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(InNeck() && (BubVerb or BubNumb) && ThreeShows_11, 15 + high ,  if BubNumb

then "11" else if BubVerb then "InNeck" else "" , CreateColor(255, 153, 153) , yes);




#LowPriceGappingPlay_12, #C
###### 12 ####################### LowPriceGappingPlay() #################################
def ThreeShows_12 = If (ShowFirst == ShowFirst.LowPriceGappingPlay_12 or ShowSecond == ShowSecond.LowPriceGappingPlay_12 or ShowThird == ShowThird.LowPriceGappingPlay_12, 1, 0);

rec LowPriceGappingPlay_Trig = If(LowPriceGappingPlay().bearish , BarNumber(), LowPriceGappingPlay_Trig[1]);

AddLabel(LowPriceGappingPlay_Trig > 0  && showLabel  && ThreeShows_12, "12=LowPriceGappingPlay", CreateColor(255, 153, 153));

Alert(LowPriceGappingPlay() && !TurnAlertOff, "LowPriceGappingPlay Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(LowPriceGappingPlay() && (BubVerb or BubNumb) && ThreeShows_12, 15 + high ,  if BubNumb

then "12" else if BubVerb then "LowPriceGappingPlay" else "" , CreateColor(255, 153, 153) , yes);



#OneBlackCrow_13,
###### 13 ####################### OneBlackCrow() #################################
def ThreeShows_13 = If (ShowFirst == ShowFirst.OneBlackCrow_13 or ShowSecond == ShowSecond.OneBlackCrow_13 or ShowThird == ShowThird.OneBlackCrow_13, 1, 0);

rec OneBlackCrow_Trig = If(OneBlackCrow().bearish , BarNumber(), OneBlackCrow_Trig[1]);

AddLabel(OneBlackCrow_Trig > 0  && showLabel  && ThreeShows_13, "13=OneBlackCrow", CreateColor(255, 0, 0));

Alert(OneBlackCrow() && !TurnAlertOff, "OneBlackCrow Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(OneBlackCrow() && (BubVerb or BubNumb) && ThreeShows_13, 15 + high ,  if BubNumb

then "13" else if BubVerb then "OneBlackCrow" else "" , CreateColor(255, 0, 0) , yes);



#OnNeck_14, #C
###### 14 ####################### OnNeck() #################################
def ThreeShows_14 = If (ShowFirst == ShowFirst.OnNeck_14 or ShowSecond == ShowSecond.OnNeck_14 or ShowThird == ShowThird.OnNeck_14, 1, 0);

rec OnNeck_Trig = If(OnNeck().bearish , BarNumber(), OnNeck_Trig[1]);

AddLabel(OnNeck_Trig > 0  && showLabel  && ThreeShows_14, "14=OnNeck", CreateColor(255, 153, 153));

Alert(OnNeck() && !TurnAlertOff, "OnNeck Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(OnNeck() && (BubVerb or BubNumb) && ThreeShows_14, 15 + high ,  if BubNumb

then "14" else if BubVerb then "OnNeck" else "" , CreateColor(255, 153, 153) , yes);



#ShootingStar_15,
###### 15 ####################### ShootingStar() #################################
def ThreeShows_15 = If (ShowFirst == ShowFirst.ShootingStar_15 or ShowSecond == ShowSecond.ShootingStar_15 or ShowThird == ShowThird.ShootingStar_15, 1, 0);

rec ShootingStar_Trig = If(ShootingStar().bearish , BarNumber(), ShootingStar_Trig[1]);

AddLabel(ShootingStar_Trig > 0  && showLabel  && ThreeShows_15, "15=ShootingStar", CreateColor(255, 0, 0));

Alert(ShootingStar() && !TurnAlertOff, "ShootingStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ShootingStar() && (BubVerb or BubNumb) && ThreeShows_15, 15 + high ,  if BubNumb

then "15" else if BubVerb then "ShootingStar" else "" , CreateColor(255, 0, 0) , yes);



#ThreeBlackCrows_16,
###### 16 ####################### ThreeBlackCrows() #################################
def ThreeShows_16 = If (ShowFirst == ShowFirst.ThreeBlackCrows_16 or ShowSecond == ShowSecond.ThreeBlackCrows_16 or ShowThird == ShowThird.ThreeBlackCrows_16, 1, 0);

rec ThreeBlackCrows_Trig = If(ThreeBlackCrows().bearish , BarNumber(), ThreeBlackCrows_Trig[1]);

AddLabel(ThreeBlackCrows_Trig > 0  && showLabel  && ThreeShows_16, "16=ThreeBlackCrows", CreateColor(255, 0, 0));

Alert(ThreeBlackCrows() && !TurnAlertOff, "ThreeBlackCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeBlackCrows() && (BubVerb or BubNumb) && ThreeShows_16, 15 + high ,  if BubNumb

then "16" else if BubVerb then "ThreeBlackCrows" else "" , CreateColor(255, 0, 0) , yes);




#ThreeInsideDown_17,
###### 17 ####################### ThreeInsideDown() #################################
def ThreeShows_17 = If (ShowFirst == ShowFirst.ThreeInsideDown_17 or ShowSecond == ShowSecond.ThreeInsideDown_17 or ShowThird == ShowThird.ThreeInsideDown_17, 1, 0);

rec ThreeInsideDown_Trig = If(DarkCloudCover().bearish , BarNumber(), ThreeInsideDown_Trig[1]);

AddLabel(ThreeInsideDown_Trig > 0  && showLabel  && ThreeShows_17, "17=ThreeInsideDown", Color.GREEN);

Alert(ThreeInsideDown() && !TurnAlertOff, "ThreeInsideDown Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideDown() && (BubVerb or BubNumb) && ThreeShows_17, 15 + high ,  if BubNumb

then "17" else if BubVerb then "ThreeInsideDown" else "" , CreateColor(255, 0, 0) , yes);



#ThreeOutsideDown_18,
###### 18 ####################### ThreeOutsideDown() #################################
def ThreeShows_18 = If (ShowFirst == ShowFirst.ThreeOutsideDown_18 or ShowSecond == ShowSecond.ThreeOutsideDown_18 or ShowThird == ShowThird.ThreeOutsideDown_18, 1, 0);

rec ThreeOutsideDown_Trig = If(DarkCloudCover().bearish , BarNumber(), ThreeOutsideDown_Trig[1]);

AddLabel(ThreeOutsideDown_Trig > 0  && showLabel  && ThreeShows_18, "18=ThreeOutsideDown", CreateColor(255, 0, 0));

Alert(ThreeOutsideDown() && !TurnAlertOff, "ThreeOutsideDown Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideDown() && (BubVerb or BubNumb) && ThreeShows_18, 15 + high ,  if BubNumb

then "18" else if BubVerb then "ThreeOutsideDown" else "" , CreateColor(255, 0, 0) , yes);






#Thrusting_19, #C
###### 19 ####################### Thrusting() #################################
def ThreeShows_19 = If (ShowFirst == ShowFirst.Thrusting_19 or ShowSecond == ShowSecond.Thrusting_19 or ShowThird == ShowThird.Thrusting_19, 1, 0);

rec Thrusting_Trig = If(DarkCloudCover().bearish , BarNumber(), Thrusting_Trig[1]);

AddLabel(Thrusting_Trig > 0  && showLabel  && ThreeShows_19, "19=Thrusting", CreateColor(255, 153, 153));

Alert(Thrusting() && !TurnAlertOff, "Thrusting Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(Thrusting() && (BubVerb or BubNumb) && ThreeShows_19, 15 + high ,  if BubNumb

then "19" else if BubVerb then "Thrusting" else "" , CreateColor(255, 153, 153) , yes);



#TwoCrows_20,
###### 20 ####################### TwoCrows() #################################
def ThreeShows_20 = If (ShowFirst == ShowFirst.TwoCrows_20 or ShowSecond == ShowSecond.TwoCrows_20 or ShowThird == ShowThird.TwoCrows_20, 1, 0);

rec TwoCrows_Trig = If(TwoCrows().bearish , BarNumber(), TwoCrows_Trig[1]);

AddLabel(TwoCrows_Trig > 0  && showLabel  && ThreeShows_20, "20=TwoCrows", CreateColor(255, 0, 0));

Alert(TwoCrows() && !TurnAlertOff, "TwoCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(TwoCrows() && (BubVerb or BubNumb) && ThreeShows_20, 15 + high ,  if BubNumb

then "20" else if BubVerb then "TwoCrows" else "" , CreateColor(255, 0, 0) , yes);



#UpsideGapTwoCrows_21};
###### 21 ####################### UpsideGapTwoCrows() #################################
def ThreeShows_21 = If (ShowFirst == ShowFirst.UpsideGapTwoCrows_21 or ShowSecond == ShowSecond.UpsideGapTwoCrows_21 or ShowThird == ShowThird.UpsideGapTwoCrows_21, 1, 0);

rec UpsideGapTwoCrows_Trig = If(DarkCloudCover().bearish , BarNumber(), UpsideGapTwoCrows_Trig[1]);

AddLabel(UpsideGapTwoCrows_Trig > 0  && showLabel  && ThreeShows_21, "21=UpsideGapTwoCrows", CreateColor(255, 0, 0));

Alert(UpsideGapTwoCrows() && !TurnAlertOff, "UpsideGapTwoCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapTwoCrows() && (BubVerb or BubNumb) && ThreeShows_21, 15 + high ,  if BubNumb

then "21" else if BubVerb then "UpsideGapTwoCrows" else "" , CreateColor(255, 0, 0) , yes);




#############################################################################

############## Processing 'Show All' = yes #######################

#############################################################################
###all adjustments to bubble locations are imput using this second section and the placement is in the second section



# AdvanceBlock_1, #R
###### 1 ####################### AdvanceBlock() & showAll #################################
def  candleAll_41 = If(ShowAll == yes , AdvanceBlock(), Double.NaN);

plot AdvBlk = candleAll_41;

AdvBlk.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

AdvBlk.SetDefaultColor(CreateColor(255, 0, 0));

AdvBlk.SetLineWeight(5);

rec AdvanceBlock_Trig_41 = If (AdvanceBlock().bearish, + BarNumber(), AdvanceBlock_Trig_41[1] );

AddLabel(AdvanceBlock_Trig_41 > 0 && showLabel && ShowAll, "1=AdvanceBlock" , CreateColor(255, 0, 0));

Alert(AdvanceBlock()  && !TurnAlertOff && ShowAll, "AdvanceBlock", Alert.BAR, Sound.Chimes);

AddChartBubble(AdvanceBlock() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "1" else if BubVerb then "AdvanceBlock" else "" ,  CreateColor(255, 0, 0) , yes);



#DarkCloudCover_2, #R
###### 2 ####################### DarkCloudCover() & showAll #################################
def candleAll_42 =  If(ShowAll == yes , DarkCloudCover(), Double.NaN);

plot DCC = candleAll_42;

DCC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DCC.SetDefaultColor(CreateColor(255, 0, 0));

DCC.SetLineWeight(5);

rec DarkCloudCover_Trig_42 = If (DarkCloudCover().bearish , + BarNumber(), DarkCloudCover_Trig_42[1] );

AddLabel(DarkCloudCover_Trig_42 > 0 && showLabel && ShowAll,  "2=DarkCloudCover" , CreateColor(255, 0, 0));

Alert(DarkCloudCover()  && !TurnAlertOff && ShowAll, "DarkCloudCover", Alert.BAR, Sound.Chimes);

AddChartBubble(DarkCloudCover() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "2" else if BubVerb then "DarkCloudCover" else "" ,  CreateColor(255, 0, 0) , yes);



#Deliberation_3, #R
###### 3 ####################### Deliberation() & showAll #################################
def  candleAll_43 = If(ShowAll == yes , Deliberation(), Double.NaN);

plot Delib = candleAll_43;

Delib.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Delib.SetDefaultColor(CreateColor(255, 0, 0));

Delib.SetLineWeight(5);

rec Deliberation_Trig_43 = If (Deliberation().bearish, + BarNumber(), Deliberation_Trig_43[1] );

AddLabel(Deliberation_Trig_43 > 0 && showLabel && ShowAll, "3=Deliberation" , CreateColor(255, 0, 0));

Alert(Deliberation()  && !TurnAlertOff && ShowAll, "Deliberation", Alert.BAR, Sound.Chimes);

AddChartBubble(Deliberation() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "3" else if BubVerb then "Deliberation" else "" ,  CreateColor(255, 0, 0) , yes);



#DownsideGapThreeMethods_4, #C
###### 4 ####################### DownsideGapThreeMethods() & showAll #################################
def candleAll_44 =  If(ShowAll == yes , DownsideGapThreeMethods(), Double.NaN);

plot DGTM = candleAll_44;

DGTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DGTM.SetDefaultColor(CreateColor(255, 153, 153));

DGTM.SetLineWeight(5);

rec DownsideGapThreeMethods_Trig_44 = If (DownsideGapThreeMethods().bearish , + BarNumber(), DownsideGapThreeMethods_Trig_44[1] );

AddLabel(DownsideGapThreeMethods_Trig_44 > 0 && showLabel && ShowAll,  "4=DownsideGapThreeMethods" , CreateColor(255, 153, 153));

Alert(DownsideGapThreeMethods()  && !TurnAlertOff && ShowAll, "DownsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideGapThreeMethods() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "4" else if BubVerb then "DownsideGapThreeMethods" else "" ,  CreateColor(255, 153, 153) , yes);



# DownsideTasukiGap_5, #C
###### 5 ####################### DownsideTasukiGap() & showAll #################################
def candleAll_45 =  If(ShowAll == yes , DownsideTasukiGap(), Double.NaN);

plot DTG = candleAll_45;

DTG.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DTG.SetDefaultColor(CreateColor(255, 153, 153));

DTG.SetLineWeight(5);

rec DownsideTasukiGap_Trig_45 = If (DownsideTasukiGap().bearish , + BarNumber(), DownsideTasukiGap_Trig_45[1] );

AddLabel(DownsideTasukiGap_Trig_45 > 0 && showLabel && ShowAll,  "5=DownsideTasukiGap" , CreateColor(255, 153, 153));

Alert(DownsideTasukiGap()  && !TurnAlertOff && ShowAll, "DownsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideTasukiGap() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "5" else if BubVerb then "DownsideTasukiGap" else "" ,  CreateColor(255, 153, 153) , yes);


#EveningDojiStar_6, #R
###### 6 ####################### EveningDojiStar() & showAll #################################
def candleAll_46 =  If(ShowAll == yes , EveningDojiStar(), Double.NaN);

plot EDS = candleAll_46;

EDS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

EDS.SetDefaultColor(CreateColor(255, 0, 0));

EDS.SetLineWeight(5);

rec EveningDojiStar_Trig_46 = If (EveningDojiStar().bearish , + BarNumber(), EveningDojiStar_Trig_46[1] );

AddLabel(EveningDojiStar_Trig_46 > 0 && showLabel && ShowAll,  "6=EveningDojiStar" , CreateColor(255, 0, 0));

Alert(EveningDojiStar()  && !TurnAlertOff && ShowAll, "EveningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningDojiStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "6" else if BubVerb then "EveningDojiStar" else "" ,  CreateColor(255, 0, 0) , yes);



#EveningStar_7, #R
###### 7 ####################### EveningStar() & showAll #################################
def candleAll_47 =  If(ShowAll == yes , EveningStar(), Double.NaN);

plot ES = candleAll_47;

ES.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ES.SetDefaultColor(CreateColor(255, 0, 0));

ES.SetLineWeight(5);

rec EveningStar_Trig_47 = If (EveningStar().bearish , + BarNumber(), EveningStar_Trig_47[1] );

AddLabel(EveningStar_Trig_47 > 0 && showLabel && ShowAll,  "7=EveningStar" , CreateColor(255, 0, 0));

Alert(EveningStar()  && !TurnAlertOff && ShowAll, "EveningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "7" else if BubVerb then "EveningStar" else "" ,  CreateColor(255, 0, 0) , yes);



#FallingThreeMethods_8,   #C
###### 8 ####################### FallingThreeMethods() & showAll #################################
def candleAll_48 =  If(ShowAll == yes , FallingThreeMethods(), Double.NaN);

plot FTM = candleAll_48;

FTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

FTM.SetDefaultColor(CreateColor(255, 153, 153));

FTM.SetLineWeight(5);

rec FallingThreeMethods_Trig_48 = If (FallingThreeMethods().bearish , + BarNumber(), FallingThreeMethods_Trig_48[1] );

AddLabel(FallingThreeMethods_Trig_48 > 0 && showLabel && ShowAll,  "8=FallingThreeMethods" , CreateColor(255, 153, 153));

Alert(FallingThreeMethods()  && !TurnAlertOff && ShowAll, "FallingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(FallingThreeMethods() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "8" else if BubVerb then "FallingThreeMethods" else "" ,  CreateColor(255, 153, 153) , yes);



#HangingMan_9, #R
###### 9 ####################### HangingMan() & showAll #################################
def candleAll_49 =  If(ShowAll == yes , HangingMan(), Double.NaN);

plot HM = candleAll_49;

HM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

HM.SetDefaultColor(CreateColor(255, 0, 0));

HM.SetLineWeight(5);

rec HangingMan_Trig_49 = If (HangingMan().bearish , + BarNumber(), HangingMan_Trig_49[1] );

AddLabel(HangingMan_Trig_49 > 0 && showLabel && ShowAll,  "9=HangingMan" , CreateColor(255, 0, 0));

Alert(HangingMan()  && !TurnAlertOff && ShowAll, "HangingMan", Alert.BAR, Sound.Chimes);

AddChartBubble(HangingMan() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "9" else if BubVerb then "HangingMan" else "" ,  CreateColor(255, 0, 0) , yes);



#IdenticalThreeCrows_10, #R
###### 10 ####################### IdenticalThreeCrows() & showAll #################################
def candleAll_50 =  If(ShowAll == yes , IdenticalThreeCrows(), Double.NaN);

plot ITC = candleAll_50;

ITC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ITC.SetDefaultColor(CreateColor(255, 0, 0));

ITC.SetLineWeight(5);

rec IdenticalThreeCrows_Trig_50 = If (IdenticalThreeCrows().bearish , + BarNumber(), IdenticalThreeCrows_Trig_50[1] );

AddLabel(IdenticalThreeCrows_Trig_50 > 0 && showLabel && ShowAll,  "10=IdenticalThreeCrows" , CreateColor(255, 0, 0));

Alert(IdenticalThreeCrows()  && !TurnAlertOff && ShowAll, "IdenticalThreeCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(IdenticalThreeCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "10" else if BubVerb then "IdenticalThreeCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#InNeck_11, # C
###### 11 ####################### InNeck() & showAll #################################
def candleAll_51 =  If(ShowAll == yes , InNeck(), Double.NaN);

plot IN = candleAll_51;

IN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

IN.SetDefaultColor(CreateColor(255, 153, 153));

IN.SetLineWeight(5);

rec InNeck_Trig_52 = If (InNeck().bearish , + BarNumber(), InNeck_Trig_52[1] );

AddLabel(InNeck_Trig_52 > 0 && showLabel && ShowAll,  "11=InNeck" , CreateColor(255, 153, 153));

Alert(InNeck()  && !TurnAlertOff && ShowAll, "InNeck", Alert.BAR, Sound.Chimes);

AddChartBubble(InNeck() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "11" else if BubVerb then "InNeck" else "" ,  CreateColor(255, 153, 153) , yes);



#LowPriceGappingPlay_12, # C
###### 12 ####################### LowPriceGappingPlay() & showAll #################################
def candleAll_52 =  If(ShowAll == yes , LowPriceGappingPlay(), Double.NaN);

plot LPGP = candleAll_52;

LPGP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

LPGP.SetDefaultColor(CreateColor(255, 153, 153));

LPGP.SetLineWeight(5);

rec LowPriceGappingPlay_Trig_52 = If (LowPriceGappingPlay().bearish , + BarNumber(), LowPriceGappingPlay_Trig_52[1] );

AddLabel(LowPriceGappingPlay_Trig_52 > 0 && showLabel && ShowAll,  "12=LowPriceGappingPlay" , CreateColor(255, 153, 153));

Alert(LowPriceGappingPlay()  && !TurnAlertOff && ShowAll, "LowPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(LowPriceGappingPlay() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "12" else if BubVerb then "LowPriceGappingPlay" else "" ,  CreateColor(255, 153, 153) , yes);



#OneBlackCrow_13, # R
###### 13 ####################### OneBlackCrow() & showAll #################################
def candleAll_53 =  If(ShowAll == yes , OneBlackCrow(), Double.NaN);

plot OBC = candleAll_53;

OBC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

OBC.SetDefaultColor(CreateColor(255, 0, 0));

OBC.SetLineWeight(5);

rec OneBlackCrow_Trig_53 = If (OneBlackCrow().bearish , + BarNumber(), OneBlackCrow_Trig_53[1] );

AddLabel(OneBlackCrow_Trig_53 > 0 && showLabel && ShowAll,  "13=OneBlackCrow" , CreateColor(255, 0, 0));

Alert(OneBlackCrow()  && !TurnAlertOff && ShowAll, "OneBlackCrow", Alert.BAR, Sound.Chimes);

AddChartBubble(OneBlackCrow() && (BubVerb or BubNumb) && (ShowAll) , 15 +  high ,  if BubNumb

then "13" else if BubVerb then "OneBlackCrow" else "" ,  CreateColor(255, 0, 0) , yes);



#OnNeck_14, # C
###### 14 ####################### OnNeck() & showAll #################################
def candleAll_54 =  If(ShowAll == yes , OnNeck(), Double.NaN);

plot ON = candleAll_54;

ON.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ON.SetDefaultColor(CreateColor(255, 153, 153));

ON.SetLineWeight(5);

rec OnNeck_Trig_54 = If (OnNeck().bearish , + BarNumber(), OnNeck_Trig_54[1] );

AddLabel(OnNeck_Trig_54 > 0 && showLabel && ShowAll,  "14=OnNeck" , CreateColor(255, 153, 153));

Alert(OnNeck()  && !TurnAlertOff && ShowAll, "OnNeck", Alert.BAR, Sound.Chimes);

AddChartBubble(OnNeck() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "14" else if BubVerb then "OnNeck" else "" ,  CreateColor(255, 153, 153) , yes);



#ShootingStar_15,
###### 15 ####################### ShootingStar() & showAll #################################
def candleAll_55 =  If(ShowAll == yes , ShootingStar(), Double.NaN);

plot SS = candleAll_55;

SS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SS.SetDefaultColor(CreateColor(255, 0, 0));

SS.SetLineWeight(5);

rec ShootingStar_Trig_55 = If (ShootingStar().bearish , + BarNumber(), ShootingStar_Trig_55[1] );

AddLabel(ShootingStar_Trig_55 > 0 && showLabel && ShowAll,  "15=ShootingStar" , CreateColor(255, 0, 0));

Alert(ShootingStar()  && !TurnAlertOff && ShowAll, "ShootingStar", Alert.BAR, Sound.Chimes);

AddChartBubble(ShootingStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "15" else if BubVerb then "ShootingStar" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeBlackCrows_16,
###### 16 ####################### ThreeBlackCrows() & showAll #################################
def candleAll_56 =  If(ShowAll == yes , ThreeBlackCrows(), Double.NaN);

plot TBC = candleAll_56;

TBC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TBC.SetDefaultColor(CreateColor(255, 0, 0));

TBC.SetLineWeight(5);

rec ThreeBlackCrows_Trig_56 = If (ThreeBlackCrows().bearish , + BarNumber(), ThreeBlackCrows_Trig_56[1] );

AddLabel(ThreeBlackCrows_Trig_56 > 0 && showLabel && ShowAll,  "16=ThreeBlackCrows" , CreateColor(255, 0, 0));

Alert(ThreeBlackCrows()  && !TurnAlertOff && ShowAll, "ThreeBlackCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeBlackCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high  ,  if BubNumb

then "16" else if BubVerb then "ThreeBlackCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeInsideDown_17,
###### 17 ####################### ThreeInsideDown() & showAll #################################
def candleAll_57 =  If(ShowAll == yes , ThreeInsideDown(), Double.NaN);

plot TID = candleAll_57;

TID.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TID.SetDefaultColor(CreateColor(255, 0, 0));

TID.SetLineWeight(5);

rec ThreeInsideDown_Trig_57 = If (ThreeInsideDown().bearish , + BarNumber(), ThreeInsideDown_Trig_57[1] );

AddLabel(ThreeInsideDown_Trig_57 > 0 && showLabel && ShowAll,  "17=ThreeInsideDown" , CreateColor(255, 0, 0));

Alert(ThreeInsideDown()  && !TurnAlertOff && ShowAll, "ThreeInsideDown", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideDown() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "17" else if BubVerb then "ThreeInsideDown" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeOutsideDown_18,
###### 18 ####################### ThreeOutsideDown() & showAll #################################
def candleAll_58 =  If(ShowAll == yes , ThreeOutsideDown(), Double.NaN);

plot TOD = candleAll_58;

TOD.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TOD.SetDefaultColor(CreateColor(255, 0, 0));

TOD.SetLineWeight(5);

rec ThreeOutsideDown_Trig_58 = If (ThreeOutsideDown().bearish , + BarNumber(), ThreeOutsideDown_Trig_58[1] );

AddLabel(ThreeOutsideDown_Trig_58 > 0 && showLabel && ShowAll,  "18=ThreeOutsideDown" , CreateColor(255, 0, 0));

Alert(ThreeOutsideDown()  && !TurnAlertOff && ShowAll, "ThreeOutsideDown", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideDown() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "18" else if BubVerb then "ThreeOutsideDown" else "" ,  CreateColor(255, 0, 0) , yes);



#Thrusting_19, # C
###### 19 ####################### Thrusting() & showAll #################################
def candleAll_59 =  If(ShowAll == yes , Thrusting(), Double.NaN);

plot Thrust = candleAll_59;

Thrust.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Thrust.SetDefaultColor(CreateColor(255, 153, 153));

Thrust.SetLineWeight(5);

rec Thrusting_Trig_59 = If (Thrusting().bearish , + BarNumber(), Thrusting_Trig_59[1] );

AddLabel(Thrusting_Trig_59 > 0 && showLabel && ShowAll,  "19=Thrusting" , CreateColor(255, 153, 153));

Alert(Thrusting()  && !TurnAlertOff && ShowAll, "Thrusting", Alert.BAR, Sound.Chimes);

AddChartBubble(Thrusting() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "19" else if BubVerb then "Thrusting" else "" ,  CreateColor(255, 153, 153) , yes);



#TwoCrows_20,
###### 20 ####################### TwoCrows() & showAll #################################
def candleAll_60 =  If(ShowAll == yes , TwoCrows(), Double.NaN);

plot TC = candleAll_60;

TC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TC.SetDefaultColor(CreateColor(255, 0, 0));

TC.SetLineWeight(5);

rec TwoCrows_Trig_60 = If (TwoCrows().bearish , + BarNumber(), TwoCrows_Trig_60[1] );

AddLabel(TwoCrows_Trig_60 > 0 && showLabel && ShowAll,  "20=TwoCrows" , CreateColor(255, 0, 0));

Alert(TwoCrows()  && !TurnAlertOff && ShowAll, "TwoCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(TwoCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "20" else if BubVerb then "TwoCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#UpsideGapTwoCrows_21,
###### 21 ####################### UpsideGapTwoCrows() & showAll #################################
def candleAll_61 =  If(ShowAll == yes , UpsideGapTwoCrows(), Double.NaN);

plot UGTC = candleAll_61;

UGTC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

UGTC.SetDefaultColor(CreateColor(255, 0, 0));

UGTC.SetLineWeight(5);

rec UpsideGapTwoCrows_Trig_61 = If (UpsideGapTwoCrows().bearish , + BarNumber(), UpsideGapTwoCrows_Trig_61[1] );

AddLabel(UpsideGapTwoCrows_Trig_61 > 0 && showLabel && ShowAll,  "21=UpsideGapTwoCrows" , CreateColor(255, 0, 0));

Alert(UpsideGapTwoCrows()  && !TurnAlertOff && ShowAll, "UpsideGapTwoCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapTwoCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "21" else if BubVerb then "UpsideGapTwoCrows" else "" ,  CreateColor(255, 0, 0) , yes);

The next 2 sections took me the longest. I had to make the system know each pattern was either bullish only or bearish only since each study will plot both a bullish arrow and bearish arrow unless you state otherwise, which is what I have done.
One thing to note, which I noted in the top of both of these studies, I took out 3 of the studies with # in front of but the format is there if you want to mess around with it.
I've taken out #Diji, #Williams Fractal & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.
Here is why I have #'ed out the Williams Fractal and zig zag:
Adzc2Bi.png


# Bullish&&Bearish Bullish only

This is the verbose B&B Bullish only:
NlQZh8p.png


This is the ID# B&B Bullish only:
bBcTwJV.png


B&B Bull Code:
Code:
#Bullish_AND_Bearish_Bullish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 14 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#formated by mourningwood4521 on usethinkscript using the format outlined by 'StanL' on TOS' ThinkScript Lounge for bull only.

AddLabel(yes, "Bull & Bear Bullish only Reversals", color.blue);
AddLabel(yes, "Bull & Bear Bullish only Continuations: 10, 12, 13, 14", createColor(0, 202, 236));

#shows all bullish only patterns of the bullish and bearish patterns on TOS except for #Diji, #Williams Fractural & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.


input TurnAlertOff_BBl = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_BBl = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubbleBull = {default none_Bull, Verbose_Bull, BullishID_Number}; #Hint showBubble:Choice of what format the candle bubble ID should have

def BubNoneBull = If (showBubbleBull == showBubbleBull.none_Bull, 1, 0);

def BubVerbBull = If (showBubbleBull == showBubbleBull.Verbose_Bull, 1, 0);

def BubNumbBull = If (showBubbleBull == showBubbleBull.BullishID_Number, 1, 0);

input ShowAll_BBl = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.

#####################################################
############ Define the three selection Enums #################
#####################################################

input ShowSeventh =   {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input ShowEighth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input ShowNinth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show
###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle7;

switch (ShowSeventh) {
case AbandonedBaby_1:

    candle7 = If(ShowSeventh.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle7 = If(ShowSeventh.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle7 = If(ShowSeventh.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle7 = If(ShowSeventh.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle7 = If(ShowSeventh.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle7 = If(ShowSeventh.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle7 = If(ShowSeventh.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle7 = If(ShowSeventh.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle7 = If(ShowSeventh.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle7 = If(ShowSeventh.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle7 = If(ShowSeventh.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle7 = If(ShowSeventh.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle7 = If(ShowSeventh.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle7 = If(ShowSeventh.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle7 = If(ShowSeventh.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle7 = If(ShowSeventh.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle7 = If(ShowSeventh.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle7 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show7th = candle7;

Show7th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show7th.SetDefaultColor(Color.GREEN);

Show7th.SetLineWeight(5);
###################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle8;

switch (ShowEighth) {
case AbandonedBaby_1:

    candle8 = If(ShowEighth.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle8 = If(ShowEighth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle8 = If(ShowEighth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle8 = If(ShowEighth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle8 = If(ShowEighth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle8 = If(ShowEighth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle8 = If(ShowEighth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle8 = If(ShowEighth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle8 = If(ShowEighth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle8 = If(ShowEighth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle8 = If(ShowEighth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle8 = If(ShowEighth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle8 = If(ShowEighth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle8 = If(ShowEighth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle8 = If(ShowEighth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle8 = If(ShowEighth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle8 = If(ShowEighth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle8 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show8th = candle8;

Show8th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show8th.SetDefaultColor(Color.GREEN);

Show8th.SetLineWeight(5);

###################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle9;

switch (ShowNinth) {
case AbandonedBaby_1:

    candle9 = If(ShowNinth.AbandonedBaby(), AbandonedBaby().bullish, Double.NaN);   # edited in .bullish.need to do this  for.bearish for all
case BeltHold_2:

    candle9 = If(ShowNinth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle9 = If(ShowNinth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle9 = If(ShowNinth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle9 = If(ShowNinth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle9 = If(ShowNinth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle9 = If(ShowNinth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle9 = If(ShowNinth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle9 = If(ShowNinth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle9 = If(ShowNinth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle9 = If(ShowNinth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle9 = If(ShowNinth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle9 = If(ShowNinth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle9 = If(ShowNinth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle9 = If(ShowNinth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle9 = If(ShowNinth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle9 = If(ShowNinth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle9 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show9th = candle9;

Show9th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show9th.SetDefaultColor(Color.GREEN);

Show9th.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

###### 1 ####################### AbandonedBaby() #############################
def ThreeShows_71 = If (ShowSeventh == ShowSeventh.AbandonedBaby_1 or ShowEighth == ShowEighth.AbandonedBaby_1 or ShowNinth == ShowNinth.AbandonedBaby_1, 1, 0);

rec AbandonedBaby_Trig_bull = If(AbandonedBaby().bullish , BarNumber(), AbandonedBaby_Trig_bull[1]);

AddLabel(AbandonedBaby_Trig_bull > 0  && showLabel_BBl  && ThreeShows_71, "1=AbandonedBaby" , Color.GREEN);

Alert(AbandonedBaby().bullish && !TurnAlertOff_BBl, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_71 , low - 6 ,  if BubNumbBull

then "1" else if BubVerbBull then "AbandonedBaby" else "" , color.white  , no);



#BeltHold_2, #Bear
###### 2 ####################### BeltHold() #############################
def ThreeShows_72 = If (ShowSeventh == ShowSeventh.BeltHold_2 or ShowEighth == ShowEighth.BeltHold_2 or ShowNinth == ShowNinth.BeltHold_2, 1, 0);

rec BeltHold_Trig_bull = If(BeltHold().bullish , BarNumber(), BeltHold_Trig_bull[1]);

AddLabel(BeltHold_Trig_bull > 0  && showLabel_BBl  && ThreeShows_72, "2=BeltHold" , Color.RED);

Alert(BeltHold().bullish && !TurnAlertOff_BBl, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_72 , low - 6 ,  if BubNumbBull

then "2" else if BubVerbBull then "BeltHold" else "" , Color.WHITE  , no);



#Breakaway_3,
###### 3 ####################### Breakaway() #############################
def ThreeShows_73 = If (ShowSeventh == ShowSeventh.Breakaway_3 or ShowEighth == ShowEighth.Breakaway_3 or ShowNinth == ShowNinth.Breakaway_3, 1, 0);

rec Breakaway_Trig_bull = If(Breakaway().bullish , BarNumber(), Breakaway_Trig_bull[1]);

AddLabel(Breakaway_Trig_bull > 0  && showLabel_BBl  && ThreeShows_73, "3=Breakaway" , Color.RED);

Alert(Breakaway().bullish && !TurnAlertOff_BBl, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway() && (BubVerbBull or BubNumbBull) && ThreeShows_73 , low - 6 ,  if BubNumbBull

then "3" else if BubVerbBull then "Breakaway" else "" , Color.WHITE  , no);


#Doji_4,
###### 4 ####################### Doji() #############################
#def ThreeShows_84 = If (ShowSeventh == ShowSeventh.Doji_4 or ShowEighth == ShowEighth.Doji_4 or ShowNinth == ShowNinth.Doji_4, 1, 0);
#rec Doji_Trig_bull = If(Doji(), BarNumber(), Doji_Trig_bull[1]);
#AddLabel(Doji_Trig_bull > 0  && showLabel_BBl  && ThreeShows_84, "4=Doji" , Color.RED);
#Alert(Doji() && !TurnAlertOff_BBl, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBull or BubNumbBull) && ThreeShows_84 , low - 6  ,  if BubNumbBull
#then "4" else if BubVerbBull then "Doji" else "" , Color.WHITE  , no);


#Engulfing_5,
###### 5 ####################### Engulfing() #############################
def ThreeShows_75 = If (ShowSeventh == ShowSeventh.Engulfing_5 or ShowEighth == ShowEighth.Engulfing_5 or ShowNinth == ShowNinth.Engulfing_5, 1, 0);

rec Engulfing_Trig_bull = If(Engulfing().bullish , BarNumber(), Engulfing_Trig_bull[1]);

AddLabel(Engulfing_Trig_bull > 0  && showLabel_BBl  && ThreeShows_75, "5=Engulfing" , Color.RED);

Alert(Engulfing().bullish && !TurnAlertOff_BBl, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_75 , low - 6 ,  if BubNumbBull

then "5" else if BubVerbBull then "Engulfing" else "" , Color.WHITE  , no);



#Harami_6,
###### 6 ####################### Harami() #############################
def ThreeShows_76 = If (ShowSeventh == ShowSeventh.Harami_6 or ShowEighth == ShowEighth.Harami_6 or ShowNinth == ShowNinth.Harami_6, 1, 0);

rec Harami_Trig_bull = If(Harami().bullish , BarNumber(), Harami_Trig_bull[1]);

AddLabel(Harami_Trig_bull > 0  && showLabel_BBl  && ThreeShows_76, "6=Harami" , Color.RED);

Alert(Harami().bullish && !TurnAlertOff_BBl, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_76 , low - 6 ,  if BubNumbBull

then "6" else if BubVerbBull then "Harami" else "" , Color.WHITE  , no);



#HaramiCross_7,
###### 7 ####################### HaramiCross() #############################
def ThreeShows_77 = If (ShowSeventh == ShowSeventh.HaramiCross_7 or ShowEighth == ShowEighth.HaramiCross_7 or ShowNinth == ShowNinth.HaramiCross_7, 1, 0);

rec HaramiCross_Trig_bull = If(HaramiCross().bullish , BarNumber(), HaramiCross_Trig_bull[1]);

AddLabel(HaramiCross_Trig_bull > 0  && showLabel_BBl  && ThreeShows_77, "7=HaramiCross" , Color.RED);

Alert(HaramiCross().bullish && !TurnAlertOff_BBl, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_77 , low - 6 ,  if BubNumbBull

then "7" else if BubVerbBull then "HaramiCross" else "" , Color.WHITE  , no);



#Kicking_8,
###### 8 ####################### BeltHold() #############################
def ThreeShows_78 = If (ShowSeventh == ShowSeventh.Kicking_8 or ShowEighth == ShowEighth.Kicking_8 or ShowNinth == ShowNinth.Kicking_8, 1, 0);

rec Kicking_Trig_bull = If(Kicking().bullish , BarNumber(), Kicking_Trig_bull[1]);

AddLabel(Kicking_Trig_bull > 0  && showLabel_BBl  && ThreeShows_78, "8=Kicking" , Color.RED);

Alert(Kicking().bullish && !TurnAlertOff_BBl, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_78 , low - 6 ,  if BubNumbBull

then "8" else if BubVerbBull then "Kicking" else "" , Color.WHITE  , no);



#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() #############################
def ThreeShows_79 = If (ShowSeventh == ShowSeventh.LongLeggedDoji_9 or ShowEighth == ShowEighth.LongLeggedDoji_9 or ShowNinth == ShowNinth.LongLeggedDoji_9, 1, 0);

rec LongLeggedDoji_Trig_bull = If(LongLeggedDoji().bullish , BarNumber(), LongLeggedDoji_Trig_bull[1]);

AddLabel(LongLeggedDoji_Trig_bull > 0  && showLabel_BBl  && ThreeShows_79, "9=LongLeggedDoji" , Color.RED);

Alert(LongLeggedDoji().bullish && !TurnAlertOff_BBl, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_79 , low - 6 ,  if BubNumbBull

then "9" else if BubVerbBull then "LongLeggedDoji" else "" , Color.WHITE  , no);



#Marubozu_10,
###### 10 ####################### Marubozu() #############################
def ThreeShows_80 = If (ShowSeventh == ShowSeventh.Marubozu_10 or ShowEighth == ShowEighth.Marubozu_10 or ShowNinth == ShowNinth.Marubozu_10, 1, 0);

rec Marubozu_Trig_bull = If(Marubozu().bullish , BarNumber(), Marubozu_Trig_bull[1]);

AddLabel(Marubozu_Trig_bull > 0  && showLabel_BBl  && ThreeShows_80, "10=Marubozu" , createColor(0, 202, 236));

Alert(Marubozu().bullish && !TurnAlertOff_BBl, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_80, low - 6 ,  if BubNumbBull

then "10" else if BubVerbBull then "Marubozu" else "" , createColor(0, 202, 236)  , no);



#MeetingLines_11,
###### 11 ####################### MeetingLines() #############################
def ThreeShows_81 = If (ShowSeventh == ShowSeventh.MeetingLines_11 or ShowEighth == ShowEighth.MeetingLines_11 or ShowNinth == ShowNinth.MeetingLines_11, 1, 0);

rec MeetingLines_Trig_bull = If(MeetingLines().bullish , BarNumber(), MeetingLines_Trig_bull[1]);

AddLabel(MeetingLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_81, "11=MeetingLines" , Color.GREEN);

Alert(MeetingLines().bullish && !TurnAlertOff_BBl, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_81, low - 6 ,  if BubNumbBull

then "1" else if BubVerbBull then "MeetingLines" else "" , Color.WHITE  , no);



#SeparatingLines_12,
###### 12 ####################### SeparatingLines() #############################
def ThreeShows_82 = If (ShowSeventh == ShowSeventh.SeparatingLines_12 or ShowEighth == ShowEighth.SeparatingLines_12 or ShowNinth == ShowNinth.SeparatingLines_12, 1, 0);

rec SeparatingLines_Trig_bull = If(SeparatingLines().bullish , BarNumber(), SeparatingLines_Trig_bull[1]);

AddLabel(SeparatingLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_82, "12=SeparatingLines" , createColor(0, 202, 236));

Alert(SeparatingLines().bullish && !TurnAlertOff_BBl, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_82, low - 6 ,  if BubNumbBull

then "12" else if BubVerbBull then "SeparatingLines" else "" , createColor(0, 202, 236)  , no);



#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() #############################
def ThreeShows_83 = If (ShowSeventh == ShowSeventh.SideBySideWhiteLines_13 or ShowEighth == ShowEighth.SideBySideWhiteLines_13 or ShowNinth == ShowNinth.SideBySideWhiteLines_13, 1, 0);

rec SideBySideWhiteLines_Trig_bull = If(SideBySideWhiteLines().bullish , BarNumber(), SideBySideWhiteLines_Trig_bull[1]);

AddLabel(SideBySideWhiteLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_83, "13=SideBySideWhiteLines" , createColor(0, 202, 236));

Alert(SideBySideWhiteLines().bullish && !TurnAlertOff_BBl, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_83, low - 6 ,  if BubNumbBull

then "13" else if BubVerbBull then "SideBySideWhiteLines" else "" , createColor(0, 202, 236)  , no);



#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() #############################
def ThreeShows_84 = If (ShowSeventh == ShowSeventh.ThreeLineStrike_14 or ShowEighth == ShowEighth.ThreeLineStrike_14 or ShowNinth == ShowNinth.ThreeLineStrike_14, 1, 0);

rec ThreeOutsideUp_Trig_bull = If(ThreeLineStrike().bullish , BarNumber(), ThreeOutsideUp_Trig_bull[1]);

AddLabel(ThreeOutsideUp_Trig_bull > 0  && showLabel_BBl  && ThreeShows_84 , "14=ThreeLineStrike" , createColor(0, 202, 236));

Alert(ThreeLineStrike().bullish && !TurnAlertOff_BBl, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_84, low - 6 ,  if BubNumbBull

then "14" else if BubVerbBull then "ThreeLineStrike" else "" , createColor(0, 202, 236)  , no);


#TriStar_15,
###### 15 ####################### TriStar() #############################
def ThreeShows_85 = If (ShowSeventh == ShowSeventh.TriStar_15 or ShowEighth == ShowEighth.TriStar_15 or ShowNinth == ShowNinth.TriStar_15, 1, 0);

rec TriStar_Trig_bull = If(TriStar().bullish , BarNumber(), TriStar_Trig_bull[1]);

AddLabel(TriStar_Trig_bull > 0  && showLabel_BBl  && ThreeShows_85, "15=TriStar" , Color.GREEN);

Alert(TriStar().bullish && !TurnAlertOff_BBl, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_85, low - 6 ,  if BubNumbBull

then "15" else if BubVerbBull then "TriStar" else "" , Color.WHITE  , no);



#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() #############################
#def ThreeShows_86 = If (ShowSeventh == ShowSeventh.WilliamsFractal_16 or ShowEighth == ShowEighth.WilliamsFractal_16 or ShowNinth == ShowNinth.WilliamsFractal_16, 1, 0);
#rec WilliamsFractal_Trig_upfractal = If(WilliamsFractal().upfractal , BarNumber(), WilliamsFractal_Trig_upfractal[1]);
#AddLabel(WilliamsFractal_Trig_upfractal > 0  && showLabel_BBl  && ThreeShows_86, "16=WilliamsFractal" , Color.GREEN);
#Alert(WilliamsFractal().upfractal && !TurnAlertOff_BBl, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().upfractal && (BubVerbBull or BubNumbBull) && ThreeShows_86, low - 6 ,  if BubNumbBull
#then "16" else if BubVerbBull then "WilliamsFractal" else "" , Color.WHITE  , no);


#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() #############################
#def ThreeShows_87 = If (ShowSeventh == ShowSeventh.ZigZagStepPattern_17 or ShowEighth == ShowEighth.ZigZagStepPattern_17 or ShowNinth == ShowNinth.ZigZagStepPattern_17, 1, 0);
#rec ZigZagStepPattern_Trig_upstep = If(ZigZagStepPattern().upstep , BarNumber(), ZigZagStepPattern_Trig_upstep[1]);
#AddLabel(ZigZagStepPattern_Trig_upstep > 0  && showLabel_BBl  && ThreeShows_87, "17=ZigZagStepPattern" , Color.GREEN);
#Alert(ZigZagStepPattern().upstep && !TurnAlertOff_BBl, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().upstep && (BubVerbBull or BubNumbBull) && ThreeShows_87, low - 6 ,  if BubNumbBull
#then "17" else if BubVerbBull then "ZigZagStepPattern" else "" , Color.WHITE  , no);



###############################################################################
#start bottom section

# AbandonedBaby_1,    
###### 1 ####################### AbandonedBaby() & showAll #################################
def  candleAll_71 = If(ShowAll_BBl == yes , AbandonedBaby().bullish, Double.NaN);

plot AB_bullish = candleAll_71;

AB_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

AB_bullish.SetDefaultColor(Color.BLUE);

AB_bullish.SetLineWeight(5);

rec AbandonedBaby_bullish_Trig_71 = If (AbandonedBaby().bullish, + BarNumber(), AbandonedBaby_bullish_Trig_71[1] );

AddLabel(AbandonedBaby_bullish_Trig_71 > 0 && showLabel_BBl && ShowAll_BBl, "1=AbandonedBaby" , Color.BLUE);

Alert(AbandonedBaby().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6,  if BubNumbBull

then "1" else if BubVerbBull then "AbandonedBaby" else "" ,  Color.BLUE , no);



#BeltHold_2,
###### 2 ####################### BeltHold() & showAll #################################
def  candleAll_72 = If(ShowAll_BBl == yes , BeltHold().bullish, Double.NaN);

plot BH_bullish = candleAll_72;

BH_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

BH_bullish.SetDefaultColor(Color.BLUE);

BH_bullish.SetLineWeight(5);

rec BeltHold_bullish_Trig_72 = If (BeltHold().BULLISH, + BarNumber(), BeltHold_bullish_Trig_72[1] );

AddLabel(BeltHold_bullish_Trig_72 > 0 && showLabel_BBl && ShowAll_BBl, "2=BeltHold" , Color.BLUE);

Alert(BeltHold().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "2" else if BubVerbBull then "BeltHold" else "" ,  Color.BLUE , no);


# Breakaway_3,  
###### 3 ####################### Breakaway() & showAll #################################
def  candleAll_73 = If(ShowAll_BBl == yes , Breakaway().bullish, Double.NaN);

plot BAWAY_bullish = candleAll_73;

BAWAY_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

BAWAY_bullish.SetDefaultColor(Color.BLUE);

BAWAY_bullish.SetLineWeight(5);

rec Breakaway_bullish_Trig_73 = If (Breakaway().bullish, + BarNumber(), Breakaway_bullish_Trig_73[1] );

AddLabel(Breakaway_bullish_Trig_73 > 0 && showLabel_BBl && ShowAll_BBl, "3=Breakaway" , Color.BLUE);

Alert(Breakaway().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "3" else if BubVerbBull then "Breakaway" else "" ,  Color.BLUE , no);



#Doji_4,
###### 4 ####################### Doji() & showAll #################################
#def  candleAll_74 = If(ShowAll == yes , Doji(), Double.NaN);

#plot DOJI = candleAll_74;
#DOJI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#DOJI.SetDefaultColor(Color.YELLOW);
#DOJI.SetLineWeight(5);
#rec DOJI_Trig_74 = If (Doji(), + BarNumber(), DOJI_Trig_74[1] );
#AddLabel(DOJI_Trig_74 > 0 && showLabel && ShowAll, "4=Doji" , Color.VIOLET);
#Alert(Doji()  && !TurnAlertOff && ShowAll, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBull or BubNumbBull) && (ShowAll) , low - 6 ,  if BubNumbBull
#then "4" else if BubVerbBull then "Doji" else "" ,  Color.VIOLET , no);



#Engulfing_5,
###### 5 ####################### Engulfing() & showAll #################################
def  candleAll_75 = If(ShowAll_BBl == yes , Engulfing().bullish, Double.NaN);

plot Engulfing_bullish = candleAll_75;

Engulfing_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Engulfing_bullish.SetDefaultColor(Color.BLUE);

Engulfing_bullish.SetLineWeight(5);

rec Engulfing_bullish_Trig_75 = If (Engulfing().bullish, + BarNumber(), Engulfing_bullish_Trig_75[1] );

AddLabel(Engulfing_bullish_Trig_75 > 0 && showLabel_BBl && ShowAll_BBl, "5=Engulfing" , Color.BLUE);

Alert(Engulfing().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "5" else if BubVerbBull then "Engulfing" else "" ,  Color.BLUE , no);


#Harami_6,
###### 6 ####################### Harami() & showAll #################################
def  candleAll_76 = If(ShowAll_BBl == yes , Harami().bullish, Double.NaN);

plot Harami_bullish = candleAll_76;

Harami_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Harami_bullish.SetDefaultColor(Color.BLUE);

Harami_bullish.SetLineWeight(5);

rec Harami_bullish_Trig_76 = If (Harami().bullish, + BarNumber(), Harami_bullish_Trig_76[1] );

AddLabel(Harami_bullish_Trig_76 > 0 && showLabel_BBl && ShowAll_BBl, "6=Harami" , Color.BLUE);

Alert(Harami().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "6" else if BubVerbBull then "Harami" else "" ,  Color.BLUE , no);



#HaramiCross_7,
###### 7 ####################### HaramiCross() & showAll #################################
def  candleAll_77 = If(ShowAll_BBl == yes , HaramiCross().bullish, Double.NaN);

plot HaramiCross_bullish = candleAll_77;

HaramiCross_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

HaramiCross_bullish.SetDefaultColor(Color.BLUE);

HaramiCross_bullish.SetLineWeight(5);

rec HaramiCross_bullish_Trig_77 = If (HaramiCross().bullish, + BarNumber(), HaramiCross_bullish_Trig_77[1] );

AddLabel(HaramiCross_bullish_Trig_77 > 0 && showLabel_BBl && ShowAll_BBl, "7=HaramiCross" , Color.BLUE);

Alert(HaramiCross().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "7" else if BubVerbBull then "HaramiCross" else "" ,  Color.BLUE , no);


#Kicking_8,
###### 8 ####################### Kicking() & showAll #################################
def  candleAll_78 = If(ShowAll_BBl == yes , Kicking().bullish, Double.NaN);

plot Kicking_bullish = candleAll_78;

Kicking_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Kicking_bullish.SetDefaultColor(Color.BLUE);

Kicking_bullish.SetLineWeight(5);

rec Kicking_bullish_Trig_78 = If (Kicking().bullish, + BarNumber(), Kicking_bullish_Trig_78[1] );

AddLabel(Kicking_bullish_Trig_78 > 0 && showLabel_BBl && ShowAll_BBl, "8=Kicking" , Color.BLUE);

Alert(Kicking().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "8" else if BubVerbBull then "Kicking" else "" ,  Color.BLUE , no);


#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() & showAll #################################
def  candleAll_79 = If(ShowAll_BBl == yes , LongLeggedDoji().bullish, Double.NaN);

plot LongLeggedDoji_bullish = candleAll_79;

LongLeggedDoji_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

LongLeggedDoji_bullish.SetDefaultColor(Color.BLUE);

LongLeggedDoji_bullish.SetLineWeight(5);

rec LongLeggedDoji_bullish_Trig_79 = If (LongLeggedDoji().bullish, + BarNumber(), LongLeggedDoji_bullish_Trig_79[1] );

AddLabel(LongLeggedDoji_bullish_Trig_79 > 0 && showLabel_BBl && ShowAll_BBl, "9=LongLeggedDoji" , Color.BLUE);

Alert(LongLeggedDoji().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "9" else if BubVerbBull then "LongLeggedDoji" else "" ,  Color.BLUE , no);


#Marubozu_10,
###### 10 ####################### Marubozu() & showAll #################################
def  candleAll_80 = If(ShowAll_BBl == yes , Marubozu().bullish, Double.NaN);

plot Marubozu_bullish = candleAll_80;

Marubozu_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Marubozu_bullish.SetDefaultColor(createColor(0, 202, 236));

Marubozu_bullish.SetLineWeight(5);

rec Marubozu_bullish_Trig_80 = If (Marubozu().bullish, + BarNumber(), Marubozu_bullish_Trig_80[1] );

AddLabel(Marubozu_bullish_Trig_80 > 0 && showLabel_BBl && ShowAll_BBl, "10=Marubozu" , createColor(0, 202, 236));

Alert(Marubozu().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "10" else if BubVerbBull then "Marubozu" else "" ,  createColor(0, 202, 236) , no);


#MeetingLines_11,
###### 11 ####################### MeetingLines() & showAll #################################
def  candleAll_81 = If(ShowAll_BBl == yes , MeetingLines().bullish, Double.NaN);

plot MeetingLines_bullish = candleAll_81;

MeetingLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MeetingLines_bullish.SetDefaultColor(Color.BLUE);

MeetingLines_bullish.SetLineWeight(5);

rec MeetingLines_bullish_Trig_81 = If (MeetingLines().bullish, + BarNumber(), MeetingLines_bullish_Trig_81[1] );

AddLabel(MeetingLines_bullish_Trig_81 > 0 && showLabel_BBl && ShowAll_BBl, "11=MeetingLines" , Color.BLUE);

Alert(MeetingLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "11" else if BubVerbBull then "MeetingLines" else "" ,  Color.BLUE , no);


#SeparatingLines_12,
###### 12 ####################### SeparatingLines() & showAll #################################
def  candleAll_82 = If(ShowAll_BBl == yes , SeparatingLines().bullish, Double.NaN);

plot SeparatingLines_bullish = candleAll_82;

SeparatingLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SeparatingLines_bullish.SetDefaultColor(createColor(0, 202, 236));

SeparatingLines_bullish.SetLineWeight(5);

rec SeparatingLines_bullish_Trig_82 = If (SeparatingLines().bullish, + BarNumber(), SeparatingLines_bullish_Trig_82[1] );

AddLabel(SeparatingLines_bullish_Trig_82 > 0 && showLabel_BBl && ShowAll_BBl, "12=SeparatingLines" , createColor(0, 202, 236));

Alert(SeparatingLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "12" else if BubVerbBull then "SeparatingLines" else "" ,  createColor(0, 202, 236) , no);


#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() & showAll #################################
def  candleAll_83 = If(ShowAll_BBl == yes , SideBySideWhiteLines().bullish, Double.NaN);

plot SideBySideWhiteLines_bullish = candleAll_83;

SideBySideWhiteLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SideBySideWhiteLines_bullish.SetDefaultColor(createColor(0, 202, 236));

SideBySideWhiteLines_bullish.SetLineWeight(5);

rec SideBySideWhiteLines_bullish_Trig_83 = If (SideBySideWhiteLines().bullish, + BarNumber(), SideBySideWhiteLines_bullish_Trig_83[1] );

AddLabel(SideBySideWhiteLines_bullish_Trig_83 > 0 && showLabel_BBl && ShowAll_BBl, "13=SideBySideWhiteLines" , createColor(0, 202, 236));

Alert(SideBySideWhiteLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "13" else if BubVerbBull then "SideBySideWhiteLines" else "" ,  createColor(0, 202, 236) , no);


#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() & showAll #################################
def  candleAll_84 = If(ShowAll_BBl == yes , ThreeLineStrike().bullish, Double.NaN);

plot ThreeLineStrike_bullish = candleAll_84;

ThreeLineStrike_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

ThreeLineStrike_bullish.SetDefaultColor(createColor(0, 202, 236));

ThreeLineStrike_bullish.SetLineWeight(5);

rec ThreeLineStrike_bullish_Trig_84 = If (ThreeLineStrike().bullish, + BarNumber(), ThreeLineStrike_bullish_Trig_84[1] );

AddLabel(ThreeLineStrike_bullish_Trig_84 > 0 && showLabel_BBl && ShowAll_BBl, "14=ThreeLineStrike" , createColor(0, 202, 236));

Alert(ThreeLineStrike().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "14" else if BubVerbBull then "ThreeLineStrike" else "" ,  createColor(0, 202, 236) , no);


#TriStar_15,
###### 15 ####################### TriStar() & showAll #################################
def  candleAll_85 = If(ShowAll_BBl == yes , TriStar(), Double.NaN);

plot TriStar_bullish = candleAll_85;

TriStar_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TriStar_bullish.SetDefaultColor(Color.BLUE);

TriStar_bullish.SetLineWeight(5);

rec TriStar_bullish_Trig_85 = If (TriStar().bullish, + BarNumber(), TriStar_bullish_Trig_85[1] );

AddLabel(TriStar_bullish_Trig_85 > 0 && showLabel_BBl && ShowAll_BBl, "15=TriStar" , Color.BLUE);

Alert(TriStar().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "15" else if BubVerbBull then "TriStar" else "" ,  Color.BLUE , no);


#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() & showAll #################################
#def  candleAll_86 = If(ShowAll_BBl == yes , WilliamsFractal().UpFractal, Double.NaN);
#plot WilliamsFractal = candleAll_86;
#WilliamsFractal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#WilliamsFractal.SetDefaultColor(Color.BLUE);
#WilliamsFractal.SetLineWeight(5);
#rec WilliamsFractal_Trig_86 = If (WilliamsFractal().UpFractal, + WilliamsFractal(), WilliamsFractal_Trig_86[1] );
#AddLabel(WilliamsFractal_Trig_86 > 0 && showLabel && ShowAll_BBl, "16=WilliamsFractal" , Color.VIOLET);
#Alert(WilliamsFractal().UpFractal  && !TurnAlertOff_BBl && ShowAll_BBl, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().UpFractal && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull
#then "16" else if BubVerbBull then "WilliamsFractal" else "" ,  Color.VIOLET , no);


#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() & showAll #################################
#def  candleAll_87 = If(ShowAll == yes , ZigZagStepPattern(), Double.NaN);
#plot ZigZagStepPattern = candleAll_87;
#ZigZagStepPattern.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#ZigZagStepPattern.SetDefaultColor(Color.BLUE);
#ZigZagStepPattern.SetLineWeight(5);
#rec ZigZagStepPattern_Trig_87 = If (ZigZagStepPattern().upstep, + ZigZagStepPattern(), ZigZagStepPattern_Trig_87[1]);
#AddLabel(ZigZagStepPattern_Trig_87 > 0 && showLabel && ShowAll, "17=ZigZagStepPattern" , Color.VIOLET);
#Alert(ZigZagStepPattern()  && !TurnAlertOff && ShowAll, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern() && (BubVerbBull or BubNumbBull) && (ShowAll) , low - 6 ,  if BubNumbBull
#then "17" else if BubVerbBull then "ZigZagStepPattern" else "" ,  Color.VIOLET , no);

# Bullish&&Bearish Bullish only

This is the verbose B&B Bearish only:
lvxpyCN.png


This is the ID# B&B Bearish only:
ocYwtPC.png


This is select a few only of the B&B Bearish only:
ocYwtPC.png


B&B Bear Code:
Code:
#Bullish_AND_Bearish_Bearish_Patterns_only

declare upper;

#Hint: BearishCandlesticks: Plots and identifies all 14 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#formated by mourningwood4521 on usethinkscript using the format outlined by 'StanL' on TOS' ThinkScript Lounge for bull only.

AddLabel(yes, "Bull & Bear Bearish only Reversals", CreateColor(255, 136, 12));
AddLabel(yes, "Bull & Bear Bearish only Continuations: 10, 12, 13, 14", createColor(255, 255, 153));

#shows all bearish only patterns of the bullish and bearish patterns on TOS except for #Diji, #Williams Fractural & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.


input TurnAlertOff_BBr = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_BBr = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubbleBear = {default none_bear, Verbose_Bear, BearishID_Number};#Hint showBubble:Choice of what format the candle bubble ID should have

def BubNoneBear = If (showBubbleBear == showBubbleBear.none_bear, 1, 0);

def BubVerbBear = If (showBubbleBear == showBubbleBear.Verbose_Bear, 1, 0);

def BubNumbBear = If (showBubbleBear == showBubbleBear.BearishID_Number, 1, 0);

input ShowAll_BBr = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.

#####################################################

############ Define the three selection Enums #################

#####################################################

input ShowTenth =   {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input Showeleventh =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show


input ShowThelfth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show
###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle10;

switch (ShowTenth) {
case AbandonedBaby_1:

    candle10 = If(ShowTenth.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle10 = If(ShowTenth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle10 = If(ShowTenth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle10 = If(ShowTenth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle10 = If(ShowTenth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle10 = If(ShowTenth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle10 = If(ShowTenth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle10 = If(ShowTenth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle10 = If(ShowTenth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle10 = If(ShowTenth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle10 = If(ShowTenth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle10 = If(ShowTenth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle10 = If(ShowTenth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle10 = If(ShowTenth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle10 = If(ShowTenth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle10 = If(ShowTenth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle10 = If(ShowTenth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle10 = Double.NaN;
}  # Closing of switch (ShowTenth) {

plot Show10th = candle10;

Show10th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show10th.SetDefaultColor(Color.GREEN);

Show10th.SetLineWeight(5);
###################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle11;

switch (Showeleventh) {
case AbandonedBaby_1:

    candle11 = If(Showeleventh.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle11 = If(Showeleventh.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle11 = If(Showeleventh.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle11 = If(Showeleventh.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle11 = If(Showeleventh.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle11 = If(Showeleventh.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle11 = If(Showeleventh.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle11 = If(Showeleventh.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle11 = If(Showeleventh.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle11 = If(Showeleventh.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle11 = If(Showeleventh.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle11 = If(Showeleventh.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle11 = If(Showeleventh.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle11 = If(Showeleventh.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle11 = If(Showeleventh.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle11 = If(Showeleventh.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle11 = If(Showeleventh.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle11 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show11th = candle11;

Show11th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show11th.SetDefaultColor(Color.GREEN);

Show11th.SetLineWeight(5);

###################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle12;

switch (ShowThelfth) {
case AbandonedBaby_1:

    candle12 = If(ShowThelfth.AbandonedBaby(), AbandonedBaby().bullish, Double.NaN);
# edited in .bullish.need to do this  for.bearish for all
case BeltHold_2:

    candle12 = If(ShowThelfth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle12 = If(ShowThelfth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle12 = If(ShowThelfth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle12 = If(ShowThelfth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle12 = If(ShowThelfth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle12 = If(ShowThelfth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle12 = If(ShowThelfth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle12 = If(ShowThelfth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle12 = If(ShowThelfth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle12 = If(ShowThelfth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle12 = If(ShowThelfth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle12 = If(ShowThelfth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle12 = If(ShowThelfth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle12 = If(ShowThelfth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle12 = If(ShowThelfth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle12 = If(ShowThelfth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle12 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show12th = candle12;

Show12th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show12th.SetDefaultColor(Color.GREEN);

Show12th.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################


# AbandonedBaby_1,
###### 1 ####################### AbandonedBaby() #############################
def ThreeShows_101 = If (ShowTenth == ShowTenth.AbandonedBaby_1 or Showeleventh == Showeleventh.AbandonedBaby_1 or ShowThelfth == ShowThelfth.AbandonedBaby_1, 1, 0);

rec AbandonedBaby_Trig_bear = If(AbandonedBaby().bearish , BarNumber(), AbandonedBaby_Trig_bear[1]);

AddLabel(AbandonedBaby_Trig_bear > 0  && showLabel_BBr  && ThreeShows_101, "1=AbandonedBaby" , CreateColor(255, 136, 12));

Alert(AbandonedBaby().bearish && !TurnAlertOff_BBr, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_101 , high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "AbandonedBaby" else "" , CreateColor(255, 136, 12)  , yes);  #BubVerbBear



#BeltHold_2, #Bear
###### 2 ####################### BeltHold() #############################
def ThreeShows_102 = If (ShowTenth == ShowTenth.BeltHold_2 or Showeleventh == Showeleventh.BeltHold_2 or ShowThelfth == ShowThelfth.BeltHold_2, 1, 0);

rec BeltHold_Trig_bear = If(BeltHold().bearish , BarNumber(), BeltHold_Trig_bear[1]);

AddLabel(BeltHold_Trig_bear > 0  && showLabel_BBr  && ThreeShows_102, "2=BeltHold" , CreateColor(255, 136, 12));

Alert(BeltHold().bearish && !TurnAlertOff_BBr, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_102 , high + 6 ,  if BubNumbBear

then "2" else if BubVerbBear then "BeltHold" else "" , CreateColor(255, 136, 12)  , yes);



#Breakaway_3,
###### 3 ####################### Breakaway() #############################
def ThreeShows_103 = If (ShowTenth == ShowTenth.Breakaway_3 or Showeleventh == Showeleventh.Breakaway_3 or ShowThelfth == ShowThelfth.Breakaway_3, 1, 0);

rec Breakaway_Trig_bear = If(Breakaway().bearish , BarNumber(), Breakaway_Trig_bear[1]);

AddLabel(Breakaway_Trig_bear > 0  && showLabel_BBr  && ThreeShows_103, "3=Breakaway" , CreateColor(255, 136, 12));

Alert(Breakaway().bearish && !TurnAlertOff_BBr, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_103 , high + 6 ,  if BubNumbBear

then "3" else if BubVerbBear then "Breakaway" else "" , CreateColor(255, 136, 12)  , yes);



#Doji_4,
###### 4 ####################### Doji() #############################
#def ThreeShows_104 = If (ShowTenth == ShowTenth.Doji_4 or Showeleventh == Showeleventh.Doji_4 or ShowThelfth == ShowThelfth.Doji_4, 1, 0);
#rec Doji_Trig = If(Doji(), BarNumber(), Doji_Trig[1]);
#AddLabel(Doji_Trig > 0  && showLabel_BBr  && ThreeShows_104, "4=Doji" , color.yellow);
#Alert(Doji() && !TurnAlertOff_BBr, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBear or BubNumbBear) && ThreeShows_104 , high + 6 ,  if BubNumbBear
#then "4" else if BubVerbBear then "Doji" else "" , color.yellow  , yes);



#Engulfing_5,
###### 5 ####################### Engulfing() #############################
def ThreeShows_105 = If (ShowTenth == ShowTenth.Engulfing_5 or Showeleventh == Showeleventh.Engulfing_5 or ShowThelfth == ShowThelfth.Engulfing_5, 1, 0);

rec Engulfing_Trig_bear = If(Engulfing().bearish , BarNumber(), Engulfing_Trig_bear[1]);

AddLabel(Engulfing_Trig_bear > 0  && showLabel_BBr  && ThreeShows_105, "5=Engulfing" , CreateColor(255, 136, 12));

Alert(Engulfing().bearish && !TurnAlertOff_BBr, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_105 , high + 6 ,  if BubNumbBear

then "5" else if BubVerbBear then "Engulfing" else "" , CreateColor(255, 136, 12)  , yes);  #10



#Harami_6,
###### 6 ####################### Harami() #############################
def ThreeShows_106 = If (ShowTenth == ShowTenth.Harami_6 or Showeleventh == Showeleventh.Harami_6 or ShowThelfth == ShowThelfth.Harami_6, 1, 0);

rec Harami_Trig_bear = If(Harami().bearish , BarNumber(), Harami_Trig_bear[1]);

AddLabel(Harami_Trig_bear > 0  && showLabel_BBr  && ThreeShows_106, "6=Harami" , CreateColor(255, 136, 12));

Alert(Harami().bearish && !TurnAlertOff_BBr, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_106 , high + 6 ,  if BubNumbBear

then "6" else if BubVerbBear then "Harami" else "" , CreateColor(255, 136, 12)  , yes);



#HaramiCross_7,
###### 7 ####################### HaramiCross() #############################
def ThreeShows_107 = If (ShowTenth == ShowTenth.HaramiCross_7 or Showeleventh == Showeleventh.HaramiCross_7 or ShowThelfth == ShowThelfth.HaramiCross_7, 1, 0);

rec HaramiCross_Trig_bear = If(HaramiCross().bearish , BarNumber(), HaramiCross_Trig_bear[1]);

AddLabel(HaramiCross_Trig_bear > 0  && showLabel_BBr  && ThreeShows_107, "7=HaramiCross" , CreateColor(255, 136, 12));

Alert(HaramiCross().bearish && !TurnAlertOff_BBr, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_107 , high + 6 ,  if BubNumbBear

then "7" else if BubVerbBear then "HaramiCross" else "" , CreateColor(255, 136, 12)  , yes);



#Kicking_8,
###### 8 ####################### BeltHold() #############################
def ThreeShows_108 = If (ShowTenth == ShowTenth.Kicking_8 or ShowEleventh == ShowEleventh.Kicking_8 or ShowThelfth == ShowThelfth.Kicking_8, 1, 0);

rec Kicking_Trig_bear = If(Kicking().bearish , BarNumber(), Kicking_Trig_bear[1]);

AddLabel(Kicking_Trig_bear > 0  && showLabel_BBr  && ThreeShows_108, "8=Kicking" , CreateColor(255, 136, 12));

Alert(Kicking().bearish && !TurnAlertOff_BBr, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_108 , high + 6 ,  if BubNumbBear

then "8" else if BubVerbBear then "Kicking" else "" , CreateColor(255, 136, 12)  , yes);



#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() #############################
def ThreeShows_109 = If (ShowTenth == ShowTenth.LongLeggedDoji_9 or ShowEleventh == ShowEleventh.LongLeggedDoji_9 or ShowThelfth == ShowThelfth.LongLeggedDoji_9, 1, 0);

rec LongLeggedDoji_Trig_bear = If(LongLeggedDoji().bearish , BarNumber(), LongLeggedDoji_Trig_bear[1]);

AddLabel(LongLeggedDoji_Trig_bear > 0  && showLabel_BBr  && ThreeShows_109, "9=LongLeggedDoji" , CreateColor(255, 136, 12));

Alert(LongLeggedDoji().bearish && !TurnAlertOff_BBr, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_109 , high + 6 ,  if BubNumbBear

then "9" else if BubVerbBear then "LongLeggedDoji" else "" , CreateColor(255, 136, 12)  , yes);



#Marubozu_10,
###### 10 ####################### Marubozu() #############################
def ThreeShows_10 = If (ShowTenth == ShowTenth.Marubozu_10 or ShowEleventh == ShowEleventh.Marubozu_10 or ShowThelfth == ShowThelfth.Marubozu_10, 1, 0);

rec Marubozu_Trig_bear = If(Marubozu().bearish , BarNumber(), Marubozu_Trig_bear[1]);

AddLabel(Marubozu_Trig_bear > 0  && showLabel_BBr  && ThreeShows_10, "10=Marubozu" , createColor(255, 255, 153));

Alert(Marubozu().bearish && !TurnAlertOff_BBr, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_10, high + 6 ,  if BubNumbBear

then "10" else if BubVerbBear then "Marubozu" else "" , createColor(255, 255, 153)  , yes);



#MeetingLines_11,
###### 11 ####################### MeetingLines() #############################
def ThreeShows_111 = If (ShowTenth == ShowTenth.MeetingLines_11 or ShowEleventh == ShowEleventh.MeetingLines_11 or ShowThelfth == ShowThelfth.MeetingLines_11, 1, 0);

rec MeetingLines_Trig_bear = If(MeetingLines().bearish , BarNumber(), MeetingLines_Trig_bear[1]);

AddLabel(MeetingLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_111, "11=MeetingLines" , CreateColor(255, 136, 12));

Alert(MeetingLines().bearish && !TurnAlertOff_BBr, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_111, high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "MeetingLines" else "" , CreateColor(255, 136, 12)  , yes);



#SeparatingLines_12,
###### 12 ####################### SeparatingLines() #############################
def ThreeShows_112 = If (ShowTenth == ShowTenth.SeparatingLines_12 or ShowEleventh == ShowEleventh.SeparatingLines_12 or ShowThelfth == ShowThelfth.SeparatingLines_12, 1, 0);

rec SeparatingLines_Trig_bear = If(SeparatingLines().bearish , BarNumber(), SeparatingLines_Trig_bear[1]);

AddLabel(SeparatingLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_112, "12=SeparatingLines" , createColor(255, 255, 153));

Alert(SeparatingLines().bearish && !TurnAlertOff_BBr, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_112,  high + 6 ,  if BubNumbBear

then "12" else if BubVerbBear then "SeparatingLines" else "" , createColor(255, 255, 153)  , yes);



#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() #############################
def ThreeShows_113 = If (ShowTenth == ShowTenth.SideBySideWhiteLines_13 or ShowEleventh == ShowEleventh.SideBySideWhiteLines_13 or ShowThelfth == ShowThelfth.SideBySideWhiteLines_13, 1, 0);

rec SideBySideWhiteLines_Trig_bear = If(SideBySideWhiteLines().bearish , BarNumber(), SideBySideWhiteLines_Trig_bear[1]);

AddLabel(SideBySideWhiteLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_113, "13=SideBySideWhiteLines" , createColor(255, 255, 153));

Alert(SideBySideWhiteLines().bearish && !TurnAlertOff_BBr, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_113, high + 6 ,  if BubNumbBear

then "13" else if BubVerbBear then "SideBySideWhiteLines" else "" , createColor(255, 255, 153)  , yes);



#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() #############################
def ThreeShows_114 = If (ShowTenth == ShowTenth.ThreeLineStrike_14 or ShowEleventh == ShowEleventh.ThreeLineStrike_14 or ShowThelfth == ShowThelfth.ThreeLineStrike_14, 1, 0);

rec ThreeOutsideUp_Trig_bear = If(ThreeLineStrike().bearish , BarNumber(), ThreeOutsideUp_Trig_bear[1]);

AddLabel(ThreeOutsideUp_Trig_bear > 0  && showLabel_BBr  && ThreeShows_114, "14=ThreeLineStrike" , createColor(255, 255, 153));

Alert(ThreeLineStrike().bearish && !TurnAlertOff_BBr, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_114, high + 6 ,  if BubNumbBear

then "14" else if BubVerbBear then "ThreeLineStrike" else "" , createColor(255, 255, 153)  , yes);



#TriStar_15,
###### 15 ####################### TriStar() #############################
def ThreeShows_115 = If (ShowTenth == ShowTenth.TriStar_15 or ShowEleventh == ShowEleventh.TriStar_15 or ShowThelfth == ShowThelfth.TriStar_15, 1, 0);

rec TriStar_Trig_bear = If(TriStar().bearish , BarNumber(), TriStar_Trig_bear[1]);

AddLabel(TriStar_Trig_bear > 0  && showLabel_BBr  && ThreeShows_115 , "15=TriStar" , CreateColor(255, 136, 12));

Alert(TriStar().bearish && !TurnAlertOff_BBr, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_115, high + 6 ,  if BubNumbBear

then "15" else if BubVerbBear then "TriStar" else "" , CreateColor(255, 136, 12)  , yes);



#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() #############################
#def ThreeShows_116 = If (ShowTenth == ShowTenth.WilliamsFractal_16 or ShowEleventh == ShowEleventh.WilliamsFractal_16 or ShowThelfth == ShowThelfth.WilliamsFractal_16, 1, 0);
#rec WilliamsFractal_Trig_downfractal = If(WilliamsFractal().downfractal , BarNumber(), WilliamsFractal_Trig_downfractal[1]);
#AddLabel(WilliamsFractal_Trig_downfractal > 0  && showLabel_BBr  && ThreeShows_116, "16=WilliamsFractal" , color.yellow);
#Alert(WilliamsFractal().downfractal && !TurnAlertOff_BBr, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().downfractal && (BubVerbBear or BubNumbBear) && ThreeShows_116, high + 6 ,  if BubNumbBear
#then "16" else if BubVerbBear then "WilliamsFractal" else "" , color.yellow  , no);



#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() #############################
#def ThreeShows_117 = If (ShowTenth == ShowTenth.ZigZagStepPattern_17 or ShowEleventh == ShowEleventh.ZigZagStepPattern_17 or ShowThelfth == ShowThelfth.ZigZagStepPattern_17, 1, 0);
#rec ZigZagStepPattern_Trig_downstep = If(ZigZagStepPattern().downstep , BarNumber(), ZigZagStepPattern_Trig_downstep[1]);
#AddLabel(ZigZagStepPattern_Trig_downstep > 0  && showLabel_BBr  && ThreeShows_117, "17=ZigZagStepPattern" , color.yellow);
#Alert(ZigZagStepPattern().downstep && !TurnAlertOff_BBr, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().downstep && (BubVerbBear or BubNumbBear) && ThreeShows_117 , high + 6 ,  if BubNumbBear
#then "17" else if BubVerbBear then "ZigZagStepPattern" else "" , color.yellow  , no);



#####################################################################################################
#Start Main Bottom Section

# AbandonedBaby_1,    
###### 1 ####################### AbandonedBaby() & showAll ################################# 10
def  candleAll_101 = If(ShowAll_BBr == yes , AbandonedBaby().bearish, Double.NaN);

plot AB_bearish = candleAll_101;

AB_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

AB_bearish.SetDefaultColor(CreateColor(255, 136, 12));

AB_bearish.SetLineWeight(5);

rec AbandonedBaby_Trig_101 = If (AbandonedBaby().bearish, + BarNumber(), AbandonedBaby_Trig_101[1] );

AddLabel(AbandonedBaby_Trig_101 > 0 && showLabel_BBr && ShowAll_BBr, "1=AbandonedBaby" , CreateColor(255, 136, 12));

Alert(AbandonedBaby().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "AbandonedBaby" else "" ,  CreateColor(255, 136, 12) , yes);



#BeltHold_2,
###### 2 ####################### BeltHold() & showAll #################################
def  candleAll_102 = If(ShowAll_BBr == yes , BeltHold().bearish, Double.NaN);

plot BH_bearish = candleAll_102;

BH_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

BH_bearish.SetDefaultColor(CreateColor(255, 136, 12));

BH_bearish.SetLineWeight(5);

rec BeltHold_Trig_102 = If (BeltHold().bearish, + BarNumber(), BeltHold_Trig_102[1] );

AddLabel(BeltHold_Trig_102 > 0 && showLabel_BBr && ShowAll_BBr, "2=BeltHold" , CreateColor(255, 136, 12));

Alert(BeltHold().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "2" else if BubVerbBear then "BeltHold" else "" ,  CreateColor(255, 136, 12) , yes);



# Breakaway_3,  
###### 3 ####################### Breakaway() & showAll #################################
def  candleAll_103 = If(ShowAll_BBr == yes , Breakaway().bearish, Double.NaN);

plot BAWAY_bearish = candleAll_103;

BAWAY_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

BAWAY_bearish.SetDefaultColor(CreateColor(255, 136, 12));

BAWAY_bearish.SetLineWeight(5);

rec Breakaway_Trig_103 = If (Breakaway().bearish, + BarNumber(), Breakaway_Trig_103[1] );

AddLabel(Breakaway_Trig_103 > 0 && showLabel_BBr && ShowAll_BBr, "3=Breakaway" , CreateColor(255, 136, 12));

Alert(Breakaway().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "3" else if BubVerbBear then "Breakaway" else "" ,  CreateColor(255, 136, 12) , yes);


#######if you want to take out or add the dojis, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.

#Doji_4,
###### 4 ####################### Doji() & showAll #################################
#def  candleAll_104 = If(ShowAll_BBr == yes , Doji(), Double.NaN);
#plot DOJI = candleAll_104;
#DOJI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#DOJI.SetDefaultColor(Color.YELLOW);
#DOJI.SetLineWeight(5);
#rec DOJI_Trig_104 = If (Doji(), + BarNumber(), DOJI_Trig_104[1] );
#AddLabel(DOJI_Trig_104 > 0 && showLabel_BBr && ShowAll_BBr, "4=Doji" , Color.YELLOW);
#Alert(Doji()  && !TurnAlertOff_BBr && ShowAll_BBr, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "4" else if BubVerbBear then "Doji" else "" ,  Color.YELLOW , yes);



#Engulfing_5,
###### 5 ####################### Engulfing() & showAll #################################
def  candleAll_105 = If(ShowAll_BBr == yes , Engulfing().bearish, Double.NaN);

plot Engulfing_bearish = candleAll_105;

Engulfing_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Engulfing_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Engulfing_bearish.SetLineWeight(5);

rec Engulfing_Trig_105 = If (Engulfing().bearish, + BarNumber(), Engulfing_Trig_105 [1] );

AddLabel(Engulfing_Trig_105 > 0 && showLabel_BBr && ShowAll_BBr, "5=Engulfing" , CreateColor(255, 136, 12));

Alert(Engulfing().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "5" else if BubVerbBear then "Engulfing" else "" ,  CreateColor(255, 136, 12) , yes);


#Harami_6,
###### 6 ####################### Harami() & showAll #################################
def  candleAll_106 = If(ShowAll_BBr == yes , Harami().bearish, Double.NaN);

plot Harami_bearish = candleAll_106;

Harami_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Harami_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Harami_bearish.SetLineWeight(5);

rec Harami_Trig_106 = If (Harami().bearish, + BarNumber(), Harami_Trig_106[1] );

AddLabel(Harami_Trig_106 > 0 && showLabel_BBr && ShowAll_BBr, "6=Harami" , CreateColor(255, 136, 12));

Alert(Harami().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "6" else if BubVerbBear then "Harami" else "" ,  CreateColor(255, 136, 12) , yes);



#HaramiCross_7,
###### 7 ####################### HaramiCross() & showAll #################################
def  candleAll_107 = If(ShowAll_BBr == yes , HaramiCross().bearish, Double.NaN);

plot HaramiCross_bearish = candleAll_107;

HaramiCross_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); # bearish

HaramiCross_bearish.SetDefaultColor(CreateColor(255, 136, 12));

HaramiCross_bearish.SetLineWeight(5);

rec HaramiCross_Trig_107 = If (HaramiCross().bearish, + BarNumber(), HaramiCross_Trig_107[1] );

AddLabel(HaramiCross_Trig_107 > 0 && showLabel_BBr && ShowAll_BBr, "7=HaramiCross" , CreateColor(255, 136, 12));

Alert(HaramiCross().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "7" else if BubVerbBear then "HaramiCross" else "" ,  CreateColor(255, 136, 12) , yes);


#Kicking_8,
###### 8 ####################### Kicking() & showAll #################################
def  candleAll_108 = If(ShowAll_BBr == yes , Kicking().bearish, Double.NaN);

plot Kicking_bearish = candleAll_108;

Kicking_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Kicking_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Kicking_bearish.SetLineWeight(5);

rec Kicking_Trig_108 = If (Kicking().bearish, + BarNumber(), Kicking_Trig_108[1] );

AddLabel(Kicking_Trig_108 > 0 && showLabel_BBr && ShowAll_BBr, "8=Kicking" , CreateColor(255, 136, 12));

Alert(Kicking().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "8" else if BubVerbBear then "Kicking" else "" ,  CreateColor(255, 136, 12) , yes);


#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() & showAll #################################
def  candleAll_109 = If(ShowAll_BBr == yes , LongLeggedDoji().bearish, Double.NaN);

plot LongLeggedDoji_bearish = candleAll_109;

LongLeggedDoji_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

LongLeggedDoji_bearish.SetDefaultColor(CreateColor(255, 136, 12));

LongLeggedDoji_bearish.SetLineWeight(5);

rec LongLeggedDoji_Trig_109 = If (LongLeggedDoji().bearish, + BarNumber(), LongLeggedDoji_Trig_109[1] );

AddLabel(LongLeggedDoji_Trig_109 > 0 && showLabel_BBr && ShowAll_BBr, "9=LongLeggedDoji" , CreateColor(255, 136, 12));

Alert(LongLeggedDoji().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "9" else if BubVerbBear then "LongLeggedDoji" else "" ,  CreateColor(255, 136, 12) , yes);


#Marubozu_10,
###### 10 ####################### Marubozu() & showAll #################################
def  candleAll_110 = If(ShowAll_BBr == yes , Marubozu().bearish, Double.NaN);

plot Marubozu_bearish = candleAll_110;

Marubozu_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Marubozu_bearish.SetDefaultColor(createColor(255, 255, 153));

Marubozu_bearish.SetLineWeight(5);

rec Marubozu_Trig_110 = If (Marubozu().bearish, + BarNumber(), Marubozu_Trig_110[1] );

AddLabel(Marubozu_Trig_110 > 0 && showLabel_BBr && ShowAll_BBr, "10=Marubozu" , createColor(255, 255, 153));

Alert(Marubozu().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "10" else if BubVerbBear then "Marubozu" else "" ,  createColor(255, 255, 153) , yes);


#MeetingLines_11,
###### 11 ####################### MeetingLines() & showAll #################################
def  candleAll_111 = If(ShowAll_BBr == yes , MeetingLines().bearish, Double.NaN);

plot MeetingLines_bearish = candleAll_111;

MeetingLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MeetingLines_bearish.SetDefaultColor(CreateColor(255, 136, 12));

MeetingLines_bearish.SetLineWeight(5);

rec MeetingLines_Trig_111 = If (MeetingLines().bearish, + BarNumber(), MeetingLines_Trig_111[1] );

AddLabel(MeetingLines_Trig_111 > 0 && showLabel_BBr && ShowAll_BBr, "11=MeetingLines" , CreateColor(255, 136, 12));

Alert(MeetingLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "11" else if BubVerbBear then "MeetingLines" else "" ,  CreateColor(255, 136, 12) , yes);


#SeparatingLines_12,
###### 12 ####################### SeparatingLines() & showAll #################################
def  candleAll_112 = If(ShowAll_BBr == yes , SeparatingLines().bearish, Double.NaN);

plot SeparatingLines_bearish = candleAll_112;

SeparatingLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SeparatingLines_bearish.SetDefaultColor(createColor(255, 255, 153));

SeparatingLines_bearish.SetLineWeight(5);

rec SeparatingLines_Trig_112 = If (SeparatingLines().bearish, + BarNumber(), SeparatingLines_Trig_112[1] );

AddLabel(SeparatingLines_Trig_112 > 0 && showLabel_BBr && ShowAll_BBr, "12=SeparatingLines" , createColor(255, 255, 153));

Alert(SeparatingLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "12" else if BubVerbBear then "SeparatingLines" else "" ,  createColor(255, 255, 153) , yes);


#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() & showAll #################################
def  candleAll_113 = If(ShowAll_BBr == yes , SideBySideWhiteLines().bearish, Double.NaN);

plot SideBySideWhiteLines_bearish = candleAll_113;

SideBySideWhiteLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SideBySideWhiteLines_bearish.SetDefaultColor(createColor(255, 255, 153));

SideBySideWhiteLines_bearish.SetLineWeight(5);

rec SideBySideWhiteLines_Trig_113 = If (SideBySideWhiteLines().bearish, + BarNumber(), SideBySideWhiteLines_Trig_113[1] );

AddLabel(SideBySideWhiteLines_Trig_113 > 0 && showLabel_BBr && ShowAll_BBr, "13=SideBySideWhiteLines" , createColor(255, 255, 153));

Alert(SideBySideWhiteLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "13" else if BubVerbBear then "SideBySideWhiteLines" else "" ,  createColor(255, 255, 153) , yes);


#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() & showAll #################################
def  candleAll_114 = If(ShowAll_BBr == yes , ThreeLineStrike().bearish, Double.NaN);

plot ThreeLineStrike_bearish = candleAll_114;

ThreeLineStrike_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ThreeLineStrike_bearish.SetDefaultColor(createColor(255, 255, 153));

ThreeLineStrike_bearish.SetLineWeight(5);

rec ThreeLineStrike_Trig_114 = If (ThreeLineStrike().bearish, + BarNumber(), ThreeLineStrike_Trig_114[1] );

AddLabel(ThreeLineStrike_Trig_114 > 0 && showLabel_BBr && ShowAll_BBr, "14=ThreeLineStrike" , createColor(255, 255, 153));

Alert(ThreeLineStrike().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "14" else if BubVerbBear then "ThreeLineStrike" else "" ,  createColor(255, 255, 153) , yes);


#TriStar_15,
###### 15 ####################### TriStar() & showAll #################################
def  candleAll_115 = If(ShowAll_BBr == yes , TriStar().bearish, Double.NaN);

plot TriStar_bearish = candleAll_115;

TriStar_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TriStar_bearish.SetDefaultColor(CreateColor(255, 136, 12));

TriStar_bearish.SetLineWeight(5);

rec TriStar_Trig_115 = If (TriStar().bearish, + BarNumber(), TriStar_Trig_115[1] );

AddLabel(TriStar_Trig_115 > 0 && showLabel_BBr && ShowAll_BBr, "15=TriStar" , CreateColor(255, 136, 12));

Alert(TriStar().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "15" else if BubVerbBear then "TriStar" else "" ,  CreateColor(255, 136, 12) , yes);

#######if you want to take out or add the WilliamsFractal, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.
#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() & showAll #################################
#def  candleAll_116 = If(ShowAll_BBr == yes , WilliamsFractal().downfractal, Double.NaN);
#plot WilliamsFractal = candleAll_116;
#WilliamsFractal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#WilliamsFractal.SetDefaultColor(CreateColor(255, 136, 12));
#WilliamsFractal.SetLineWeight(5);
#rec WilliamsFractal_Trig_116 = If (WilliamsFractal().DownFractal, + BarNumber(), WilliamsFractal_Trig_116[1] );
#AddLabel(WilliamsFractal_Trig_116 is true && showLabel_BBr && ShowAll_BBr, "16=WilliamsFractal" , Color.YELLOW); # changed > 0 to is true
#Alert(WilliamsFractal().DownFractal  && !TurnAlertOff_BBr && ShowAll_BBr, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().DownFractal && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "16" else if BubVerbBear then "WilliamsFractal" else "" ,  Color.YELLOW , yes);

#######if you want to take out or add the ZigZagStepPattern, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.

#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() & showAll #################################
#def  candleAll_117 = If(ShowAll_BBr == yes , ZigZagStepPattern().downstep, Double.NaN);
#plot ZigZagStepPattern = candleAll_117;
#ZigZagStepPattern.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#ZigZagStepPattern.SetDefaultColor(CreateColor(255, 136, 12));
#ZigZagStepPattern.SetLineWeight(5);
#rec ZigZagStepPattern_Trig_117 = If (ZigZagStepPattern().upstep, + BarNumber(), ZigZagStepPattern_Trig_117[1]);
#AddLabel(ZigZagStepPattern_Trig_117 is true && showLabel_BBr && ShowAll_BBr, "17=ZigZagStepPattern" , Color.YELLOW); # changed > 0 to is true
#Alert(ZigZagStepPattern().downstep  && !TurnAlertOff_BBr && ShowAll_BBr, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().downstep && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "17" else if BubVerbBear then "ZigZagStepPattern" else "" ,  Color.YELLOW , yes);

Here is all 4 study patterns verbose:
XsBYuro.png


Here is all 4 study patterns ID #:
PBgLBOO.png
 

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Nice work mourningwood4521. Its quite informational to look at a chart and see these arrows/texts to help understand the candle type. I am a newbie and I find this very helpful.
 
Hello everyone, this is my first big study I've worked on, been busy the last weekend so I didn't post it once I finished it. @BenTen had posted this study on this thread and I thought it was awesome, The format was started based on the 2013 patterns available and someone added on to it. I reorganized it so it's in order of the current order of available patterns on this definition list.I also changed the color so the darker shade is the reversal, and a lighter shade of the same color is signaling a continuation. All of this info is added to an addlabel for each study. As you can see, you can change the inputs to show various metrics of the patterns, just an arrow, number ID, and verbose(the pattern name). You can also select up 3 patterns which will show instead of all of them. I won't go into detail on the bull because a working version is already up at the first link on this document. Use all 4 studies together on your upper, or pick and choose which ones you want to use. Super helpful for learning which kinds of candles occur the most often, which ones will get ignored the most, etc. some I have found will be a strong reversal signal

I will post another version in the comments once I finish that it is a work in progress still. It will show just the patterns and you can't select a certain few to display, it will only show all patterns regardless of the 4 types of patterns, meaning bull, bear, B&B Bull, B&B bear.

It helps if you put the studies in the order I listed below, because I have:
Show 1st, 2nd, 3rd for bull only.
Show 3rd, 4th, 5th for bear only.
Show 7th, 8th, 9th for B&B Bull only.
Show 10th, 11th, 12th for B&B Bear only

This is verbose only bull:
0cm3aB8.png


Code Bull only:
Code:
#Bullish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 20 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#reformated by mourningwood4521 on usethinkscript to go in order of libray terms as of March 2021
#Report any problems to 'StanL' on TOS' ThinkScript Lounge
#Revision date 3:36 PM 9/29/2013

AddLabel(yes, "Bullish only Reversals", CreateColor(0, 255, 0));
AddLabel(yes, "Bullish only Continuations: 3, 7, 12, 19, 20", CreateColor(153, 255, 153));

input TurnAlertOff_bull = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_bull = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubble_bull = {default none_bull, Verbose_bull, ID_Number_bull};#Hint showBubble:Choice of what format the candle bubble ID should have

input ShowAll_bull = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.


def BubNone_bull = If (showBubble_bull == showBubble_bull.none_bull, 1, 0);

def BubVerb_bull = If (showBubble_bull == showBubble_bull.Verbose_bull, 1, 0);

def BubNumb_bull =  If (showBubble_bull == showBubble_bull.ID_Number_bull, 1, 0);

#####################################################
############ Define the three selection Enums #################
#####################################################

input ShowFirst =  {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

input ShowSecond = {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

input ShowThird =  {default none, ConcealingBabySwallow_1, Hammer_2, HighPriceGappingPlay_3, HomingPigeon_4, InvertedHammer_5, MatchingLow_6, MatHold_7, MorningDojiStar_8, MorningStar_9, OneWhiteSoldier_10, PiercingLine_11, RisingThreeMethods_12, Sticksandwich_13, ThreeInsideUp_14, ThreeOutsideUp_15, ThreeStarsInTheSouth_16, ThreeWhiteSoldiers_17, UniqueThreeRiverBottom_18, UpsideGapThreeMethods_19, UpsideTasukiGap_20}; #hint ShowSecond:Select the candle to show

###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle;

switch (ShowFirst) {
case ConcealingBabySwallow_1:

    candle = If(ShowFirst.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle =  If(ShowFirst.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle = If(ShowFirst.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle = If(ShowFirst.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle = If(ShowFirst.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle = If(ShowFirst.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle = If(ShowFirst.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle = If(ShowFirst.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle = If(ShowFirst.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle = If(ShowFirst.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle = If(ShowFirst.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle = If(ShowFirst.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle = If(ShowFirst.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle = If(ShowFirst.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle = If(ShowFirst.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle = If(ShowFirst.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle = If(ShowFirst.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle = If(ShowFirst.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle = If(ShowFirst.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle = If(ShowFirst.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show1st = candle;

Show1st.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show1st.SetDefaultColor(Color.GREEN);

Show1st.SetLineWeight(5);
#####################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle2;

switch (ShowSecond) {
case ConcealingBabySwallow_1:

    candle2 = If(ShowSecond.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle2 =  If(ShowSecond.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle2 = If(ShowSecond.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle2 = If(ShowSecond.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle2 = If(ShowSecond.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle2 = If(ShowSecond.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle2 = If(ShowSecond.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle2 = If(ShowSecond.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle2 = If(ShowSecond.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle2 = If(ShowSecond.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle2 = If(ShowSecond.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle2 = If(ShowSecond.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle2 = If(ShowSecond.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle2 = If(ShowSecond.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle2 = If(ShowSecond.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle2 = If(ShowSecond.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle2 = If(ShowSecond.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle2 = If(ShowSecond.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle2 = If(ShowSecond.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle2 = If(ShowSecond.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle2 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show2nd = candle2;

Show2nd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show2nd.SetDefaultColor(Color.GREEN);

Show2nd.SetLineWeight(5);
#####################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle3;

switch (ShowThird) {
case ConcealingBabySwallow_1:

    candle3 = If(ShowThird.ConcealingBabySwallow(), ConcealingBabySwallow(), Double.NaN);
case Hammer_2:

    candle3 =  If(ShowThird.Hammer(), Hammer(), Double.NaN);
case HighPriceGappingPlay_3:

    candle3 = If(ShowThird.HighPriceGappingPlay(), HighPriceGappingPlay(), Double.NaN);
case HomingPigeon_4:

    candle3 = If(ShowThird.HomingPigeon(), HomingPigeon(), Double.NaN);
case InvertedHammer_5:

    candle3 = If(ShowThird.InvertedHammer(), InvertedHammer(), Double.NaN);
case MatchingLow_6:

    candle3 = If(ShowThird.MatchingLow(), MatchingLow(), Double.NaN);
case MatHold_7:

    candle3 = If(ShowThird.MatHold(), MatHold(), Double.NaN);
case MorningDojiStar_8:

    candle3 = If(ShowThird.MorningDojiStar(), MorningDojiStar(), Double.NaN);
case MorningStar_9:

    candle3 = If(ShowThird.MorningStar(), MorningStar(), Double.NaN);
case OneWhiteSoldier_10:

    candle3 = If(ShowThird.OneWhiteSoldier(), OneWhiteSoldier(), Double.NaN);
case PiercingLine_11:

    candle3 = If(ShowThird.PiercingLine(), PiercingLine(), Double.NaN);
case RisingThreeMethods_12:

    candle3 = If(ShowThird.RisingThreeMethods(), RisingThreeMethods(), Double.NaN);
case Sticksandwich_13:

    candle3 = If(ShowThird.StickSandwich(), StickSandwich(), Double.NaN);
case ThreeInsideUp_14:

    candle3 = If(ShowThird.ThreeInsideUp(), ThreeInsideUp(), Double.NaN);
case ThreeOutsideUp_15:

    candle3 = If(ShowThird.ThreeOutsideUp(), ThreeOutsideUp(), Double.NaN);
case ThreeStarsInTheSouth_16:

    candle3 = If(ShowThird.ThreeStarsInTheSouth(), ThreeStarsInTheSouth(), Double.NaN);
case ThreeWhiteSoldiers_17:

    candle3 = If(ShowThird.ThreeWhiteSoldiers(), ThreeWhiteSoldiers(), Double.NaN);
case UniqueThreeRiverBottom_18:

    candle3 = If(ShowThird.UniqueThreeRiverBottom(), UniqueThreeRiverBottom(), Double.NaN);
case UpsideGapThreeMethods_19:

    candle3 = If(ShowThird.UpsideGapThreeMethods(), UpsideGapThreeMethods(), Double.NaN);
case  UpsideTasukiGap_20:

    candle3 = If(ShowThird.UpsideTasukiGap(), UpsideTasukiGap(), Double.NaN);
case none:
    candle3 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show3rd = candle3;

Show3rd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show3rd.SetDefaultColor(Color.GREEN);

Show3rd.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

#ConcealingBabySwallow_1,
###### 1 ####################### ConcealingBabySwallow() #############################
def ThreeShows_1 = If (ShowFirst == ShowFirst.ConcealingBabySwallow_1 or ShowSecond == ShowSecond.ConcealingBabySwallow_1 or ShowThird == ShowThird.ConcealingBabySwallow_1, 1, 0);

rec ConcealingBabySwallow_Trig = If(ConcealingBabySwallow().bullish , ConcealingBabySwallow(), ConcealingBabySwallow_Trig[1]);

AddLabel(ConcealingBabySwallow_Trig > 0  && showLabel_bull  && ThreeShows_1, "1=ConcealingBabySwallow" , CreateColor(0, 255, 0));

Alert(ConcealingBabySwallow() && !TurnAlertOff_bull, "ConcealingBabySwallow", Alert.BAR, Sound.Chimes);

AddChartBubble(ConcealingBabySwallow() && (BubVerb_bull or BubNumb_bull) && ThreeShows_1 , low -15 ,  if BubNumb_bull

then "1" else if BubVerb_bull then "ConcealingBabySwallow" else "" , CreateColor(0, 255, 0)  , no);



#Hammer_2, 
###### 2 ####################### Hammer() #############################
def ThreeShows_2 = If (ShowFirst == ShowFirst.Hammer_2 or ShowSecond == ShowSecond.Hammer_2 or ShowThird == ShowThird.Hammer_2, 1, 0);

rec Hammer_Trig = If(Hammer().bullish , Hammer(), Hammer_Trig[1]);

AddLabel(Hammer_Trig > 0  && showLabel_bull  && ThreeShows_2, "2=Hammer" , CreateColor(0, 255, 0));

Alert(Hammer() && !TurnAlertOff_bull, "Hammer", Alert.BAR, Sound.Chimes);

AddChartBubble(Hammer() && (BubVerb_bull or BubNumb_bull) && ThreeShows_2, low -15 ,  if BubNumb_bull

then "2" else if BubVerb_bull then "Hammer" else "" , CreateColor(0, 255, 0)  , no);



#HighPriceGappingPlay_3, #C
###### 2 ####################### HighPriceGappingPlay() #############################
def ThreeShows_3 = If (ShowFirst == ShowFirst.HighPriceGappingPlay_3 or ShowSecond == ShowSecond.HighPriceGappingPlay_3 or ShowThird == ShowThird.HighPriceGappingPlay_3, 1, 0);

rec HighPriceGappingPlay_Trig = If(HighPriceGappingPlay().bullish , HighPriceGappingPlay(), HighPriceGappingPlay_Trig[1]);

AddLabel(HighPriceGappingPlay_Trig > 0  && showLabel_bull  && ThreeShows_3, "3=HighPriceGappingPlay" , CreateColor(153, 255, 153));

Alert(HighPriceGappingPlay() && !TurnAlertOff_bull, "HighPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(HighPriceGappingPlay() && (BubVerb_bull or BubNumb_bull) && ThreeShows_3, low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "HighPriceGappingPlay" else "" , CreateColor(153, 255, 153)  , no);


#HomingPigeon_4,
###### 4 ####################### HomingPigeon() #############################
def ThreeShows_4 = If (ShowFirst == ShowFirst.HomingPigeon_4 or ShowSecond == ShowSecond.HomingPigeon_4 or ShowThird == ShowThird.HomingPigeon_4, 1, 0);

rec HomingPigeon_Trig = If(HomingPigeon().bullish , HomingPigeon(), HomingPigeon_Trig[1]);

AddLabel(HomingPigeon_Trig > 0  && showLabel_bull  && ThreeShows_4, "4=HomingPigeon" , CreateColor(0, 255, 0));

Alert(HomingPigeon() && !TurnAlertOff_bull, "HomingPigeon", Alert.BAR, Sound.Chimes);

AddChartBubble(HomingPigeon() && (BubVerb_bull or BubNumb_bull) && ThreeShows_4, low -15 ,  if BubNumb_bull

then "4" else if BubVerb_bull then "HomingPigeon" else "" , CreateColor(0, 255, 0)  , no);


#InvertedHammer_5,
###### 5 ####################### InvertedHammer() #############################
def ThreeShows_5 = If (ShowFirst == ShowFirst.InvertedHammer_5 or ShowSecond == ShowSecond.InvertedHammer_5 or ShowThird == ShowThird.InvertedHammer_5, 1, 0);

rec InvertedHammer_Trig = If(InvertedHammer().bullish , InvertedHammer(), InvertedHammer_Trig[1]);

AddLabel(InvertedHammer_Trig > 0  && showLabel_bull  && ThreeShows_5, "5=InvertedHammer" , CreateColor(0, 255, 0));

Alert(InvertedHammer() && !TurnAlertOff_bull, "InvertedHammer", Alert.BAR, Sound.Chimes);

AddChartBubble(InvertedHammer() && (BubVerb_bull or BubNumb_bull) && ThreeShows_5, low -15 ,  if BubNumb_bull

then "5" else if BubVerb_bull then "InvertedHammer" else "" , CreateColor(0, 255, 0)  , no);

#MatchingLow_6,
###### 6 ####################### MatchingLow() #############################
def ThreeShows_6 = If (ShowFirst == ShowFirst.MatchingLow_6 or ShowSecond == ShowSecond.MatchingLow_6 or ShowThird == ShowThird.MatchingLow_6, 1, 0);

rec MatchingLow_Trig = If(MatchingLow().bullish , MatchingLow(), MatchingLow_Trig[1]);

AddLabel(MatchingLow_Trig > 0  && showLabel_bull  && ThreeShows_6, "6=MatchingLow" , CreateColor(0, 255, 0));

Alert(MatchingLow() && !TurnAlertOff_bull, "MatchingLow", Alert.BAR, Sound.Chimes);

AddChartBubble(MatchingLow() && (BubVerb_bull or BubNumb_bull) && ThreeShows_6, low -15 ,  if BubNumb_bull

then "6" else if BubVerb_bull then "MatchingLow" else "" , CreateColor(0, 255, 0)  , no);

#MatHold_7,  #C
###### 7 ####################### MatHold() #############################
def ThreeShows_7 = If (ShowFirst == ShowFirst.MatHold_7 or ShowSecond == ShowSecond.MatHold_7 or ShowThird == ShowThird.MatHold_7, 1, 0);

rec MatHold_Trig = If(MatHold().bullish , MatHold(), MatHold_Trig[1]);

AddLabel(MatHold_Trig > 0  && showLabel_bull  && ThreeShows_7, "7=MatHold" , CreateColor(153, 255, 153));

Alert(MatHold() && !TurnAlertOff_bull, "MatHold", Alert.BAR, Sound.Chimes);

AddChartBubble(MatHold() && (BubVerb_bull or BubNumb_bull) && ThreeShows_7, low -15 ,  if BubNumb_bull

then "7" else if BubVerb_bull then "MatHold" else "" , CreateColor(153, 255, 153)  , no);



#MorningDojiStar_8,
###### 2 ####################### MorningDojiStar() #############################
def ThreeShows_8 = If (ShowFirst == ShowFirst.MorningDojiStar_8 or ShowSecond == ShowSecond.MorningDojiStar_8 or ShowThird == ShowThird.MorningDojiStar_8, 1, 0);

rec MorningDojiStar_Trig = If(MorningDojiStar().bullish , MorningDojiStar(), MorningDojiStar_Trig[1]);

AddLabel(MorningDojiStar_Trig > 0  && showLabel_bull  && ThreeShows_8, "8=MorningDojiStar" , CreateColor(0, 255, 0));

Alert(MorningDojiStar() && !TurnAlertOff_bull, "MorningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningDojiStar() && (BubVerb_bull or BubNumb_bull) && ThreeShows_8, low -15 ,  if BubNumb_bull

then "8" else if BubVerb_bull then "MorningDojiStar" else "" , CreateColor(0, 255, 0)  , no);



#MorningStar_9,
###### 9 ####################### MorningStar() #############################
def ThreeShows_9 = If (ShowFirst == ShowFirst.MorningStar_9 or ShowSecond == ShowSecond.MorningStar_9 or ShowThird == ShowThird.MorningStar_9, 1, 0);

rec MorningStar_Trig = If(MorningStar().bullish , MorningStar(), MorningStar_Trig[1]);

AddLabel(MorningStar_Trig > 0  && showLabel_bull  && ThreeShows_9, "9=MorningStar" , CreateColor(0, 255, 0));

Alert(MorningStar() && !TurnAlertOff_bull, "MorningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningStar() && (BubVerb_bull or BubNumb_bull) && ThreeShows_9, low -15 ,  if BubNumb_bull

then "9" else if BubVerb_bull then "MorningStar" else "" , CreateColor(0, 255, 0)  , no);



#OneWhiteSoldier_10,
###### 10 ####################### OneWhiteSoldier() #############################
def ThreeShows_10 = If (ShowFirst == ShowFirst.OneWhiteSoldier_10 or ShowSecond == ShowSecond.OneWhiteSoldier_10 or ShowThird == ShowThird.OneWhiteSoldier_10, 1, 0);

rec OneWhiteSoldier_Trig = If(OneWhiteSoldier().bullish , OneWhiteSoldier(), OneWhiteSoldier_Trig[1]);

AddLabel(OneWhiteSoldier_Trig > 0  && showLabel_bull  && ThreeShows_10, "10=OneWhiteSoldier" , CreateColor(0, 255, 0));

Alert(OneWhiteSoldier() && !TurnAlertOff_bull, "OneWhiteSoldier", Alert.BAR, Sound.Chimes);

AddChartBubble(OneWhiteSoldier() && (BubVerb_bull or BubNumb_bull) && ThreeShows_10, low -15 ,  if BubNumb_bull

then "10" else if BubVerb_bull then "OneWhiteSoldier" else "" , CreateColor(0, 255, 0)  , no);




#PiercingLine_11,
###### 11 ####################### PiercingLine() #############################
def ThreeShows_11 = If (ShowFirst == ShowFirst.PiercingLine_11 or ShowSecond == ShowSecond.PiercingLine_11 or ShowThird == ShowThird.PiercingLine_11, 1, 0);

rec PiercingLine_Trig = If(PiercingLine().bullish , PiercingLine(), Hammer_Trig[1]);

AddLabel(Hammer_Trig > 0  && showLabel_bull  && ThreeShows_11, "11=PiercingLine" , CreateColor(0, 255, 0));

Alert(PiercingLine() && !TurnAlertOff_bull, "PiercingLine", Alert.BAR, Sound.Chimes);

AddChartBubble(PiercingLine() && (BubVerb_bull or BubNumb_bull) && ThreeShows_11, low -15 ,  if BubNumb_bull

then "11" else if BubVerb_bull then "PiercingLine" else "" , CreateColor(0, 255, 0)  , no);



#RisingThreeMethods_12, #C
###### 12 ####################### RisingThreeMethods() #############################
def ThreeShows_12 = If (ShowFirst == ShowFirst.RisingThreeMethods_12 or ShowSecond == ShowSecond.RisingThreeMethods_12 or ShowThird == ShowThird.RisingThreeMethods_12, 1, 0);

rec RisingThreeMethods_Trig = If(RisingThreeMethods().bullish , RisingThreeMethods(), RisingThreeMethods_Trig[1]);

AddLabel(RisingThreeMethods_Trig > 0  && showLabel_bull  && ThreeShows_12, "3=RisingThreeMethods" , CreateColor(153, 255, 153));

Alert(RisingThreeMethods() && !TurnAlertOff_bull, "RisingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(RisingThreeMethods() && (BubVerb_bull or BubNumb_bull) && ThreeShows_12, low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "RisingThreeMethods" else "" , CreateColor(153, 255, 153)  , no);





#Sticksandwich_13,
###### 13 ####################### Sticksandwich() #############################
def ThreeShows_13 = If (ShowFirst == ShowFirst.Sticksandwich_13 or ShowSecond == ShowSecond.Sticksandwich_13 or ShowThird == ShowThird.Sticksandwich_13, 1, 0);

rec Sticksandwich_Trig = If(Sticksandwich().bullish , Sticksandwich(), Sticksandwich_Trig[1]);

AddLabel(Sticksandwich_Trig > 0  && showLabel_bull  && ThreeShows_13, "13=Sticksandwich" , CreateColor(0, 255, 0));

Alert(Sticksandwich() && !TurnAlertOff_bull, "Sticksandwich", Alert.BAR, Sound.Chimes);

AddChartBubble(Sticksandwich() && (BubVerb_bull or BubNumb_bull) && ThreeShows_13, low -15 ,  if BubNumb_bull

then "13" else if BubVerb_bull then "Sticksandwich" else "" , CreateColor(0, 255, 0)  , no);



#ThreeInsideUp_14,
###### 14 ####################### ThreeInsideUp() #############################
def ThreeShows_14 = If (ShowFirst == ShowFirst.ThreeInsideUp_14 or ShowSecond == ShowSecond.ThreeInsideUp_14 or ShowThird == ShowThird.ThreeInsideUp_14, 1, 0);

rec ThreeInsideUp_Trig = If(ThreeInsideUp().bullish , ThreeInsideUp(), ThreeInsideUp_Trig[1]);

AddLabel(ThreeInsideUp_Trig > 0  && showLabel_bull  && ThreeShows_14, "14=ThreeInsideUp" , CreateColor(0, 255, 0));

Alert(ThreeInsideUp() && !TurnAlertOff_bull, "ThreeInsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideUp() && (BubVerb_bull or BubNumb_bull) && ThreeShows_14, low -15 ,  if BubNumb_bull

then "14" else if BubVerb_bull then "ThreeInsideUp" else "" , CreateColor(0, 255, 0)  , no);




#ThreeOutsideUp_15,
###### 15 ####################### ThreeOutsideUp() #############################
def ThreeShows_15 = If (ShowFirst == ShowFirst.ThreeOutsideUp_15 or ShowSecond == ShowSecond.ThreeOutsideUp_15 or ShowThird == ShowThird.ThreeOutsideUp_15, 1, 0);

rec ThreeOutsideUp_Trig = If(ThreeOutsideUp().bullish , ThreeOutsideUp(), ThreeOutsideUp_Trig[1]);

AddLabel(ThreeOutsideUp_Trig > 0  && showLabel_bull  && ThreeShows_15, "15=ThreeOutsideUp" , CreateColor(0, 255, 0));

Alert(ThreeOutsideUp() && !TurnAlertOff_bull, "ThreeOutsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideUp() && (BubVerb_bull or BubNumb_bull) && ThreeShows_15, low -15 ,  if BubNumb_bull

then "15" else if BubVerb_bull then "ThreeOutsideUp" else "" , CreateColor(0, 255, 0)  , no);




#ThreeStarsInTheSouth_16,
###### 2 ####################### ThreeStarsInTheSouth() #############################
def ThreeShows_16 = If (ShowFirst == ShowFirst.ThreeStarsInTheSouth_16 or ShowSecond == ShowSecond.ThreeStarsInTheSouth_16 or ShowThird == ShowThird.ThreeStarsInTheSouth_16, 1, 0);

rec ThreeStarsInTheSouth_Trig = If(ThreeStarsInTheSouth().bullish , ThreeStarsInTheSouth(), ThreeStarsInTheSouth_Trig[1]);

AddLabel(ThreeStarsInTheSouth_Trig > 0  && showLabel_bull  && ThreeShows_16, "16=ThreeStarsInTheSouth" , CreateColor(0, 255, 0));

Alert(ThreeStarsInTheSouth() && !TurnAlertOff_bull, "ThreeStarsInTheSouth", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeStarsInTheSouth() && (BubVerb_bull or BubNumb_bull) && ThreeShows_16, low -15 ,  if BubNumb_bull

then "16" else if BubVerb_bull then "ThreeStarsInTheSouth" else "" , CreateColor(0, 255, 0)  , no);




#ThreeWhiteSoldiers_17,
###### 1 ####################### ThreeWhiteSoldiers() #############################
def ThreeShows_17 = If (ShowFirst == ShowFirst.ThreeWhiteSoldiers_17 or ShowSecond == ShowSecond.ThreeWhiteSoldiers_17 or ShowThird == ShowThird.ThreeWhiteSoldiers_17, 1, 0);

rec ThreeWhiteSoldiers_Trig = If(ThreeWhiteSoldiers().bullish , ThreeWhiteSoldiers(), ThreeWhiteSoldiers_Trig[1]);

AddLabel(ThreeWhiteSoldiers_Trig > 0  && showLabel_bull  && ThreeShows_17, "17=ThreeWhiteSoldiers" , CreateColor(0, 255, 0));

Alert(ThreeWhiteSoldiers() && !TurnAlertOff_bull, "ThreeWhiteSoldiers", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeWhiteSoldiers() && (BubVerb_bull or BubNumb_bull) && ThreeShows_17 , low -15 ,  if BubNumb_bull

then "17" else if BubVerb_bull then "ThreeWhiteSoldiers" else "" , CreateColor(0, 255, 0)  , no);




#UniqueThreeRiverBottom_18,
###### 18 ####################### UniqueThreeRiverBottom() #############################
def ThreeShows_18 = If (ShowFirst == ShowFirst.UniqueThreeRiverBottom_18 or ShowSecond == ShowSecond.UniqueThreeRiverBottom_18 or ShowThird == ShowThird.UniqueThreeRiverBottom_18, 1, 0);

rec UniqueThreeRiverBottom_Trig = If(UniqueThreeRiverBottom().bullish , UniqueThreeRiverBottom(), UniqueThreeRiverBottom_Trig[1]);

AddLabel(UniqueThreeRiverBottom_Trig > 0  && showLabel_bull  && ThreeShows_18, "18=UniqueThreeRiverBottom" , CreateColor(0, 255, 0));

Alert(UniqueThreeRiverBottom() && !TurnAlertOff_bull, "UniqueThreeRiverBottom", Alert.BAR, Sound.Chimes);

AddChartBubble(UniqueThreeRiverBottom() && (BubVerb_bull or BubNumb_bull) && ThreeShows_1 , low -15 ,  if BubNumb_bull

then "18" else if BubVerb_bull then "UniqueThreeRiverBottom" else "" , CreateColor(0, 255, 0)  , no);



#UpsideGapThreeMethods_19, #C
###### 19 ####################### UpsideGapThreeMethods() #############################
def ThreeShows_19 = If (ShowFirst == ShowFirst.UpsideGapThreeMethods_19 or ShowSecond == ShowSecond.UpsideGapThreeMethods_19 or ShowThird == ShowThird.UpsideGapThreeMethods_19, 1, 0);

rec UpsideGapThreeMethods_Trig = If(UpsideGapThreeMethods().bullish , UpsideGapThreeMethods(), UpsideGapThreeMethods_Trig[1]);

AddLabel(UpsideGapThreeMethods_Trig > 0  && showLabel_bull  && ThreeShows_19, "19=UpsideGapThreeMethods" , CreateColor(153, 255, 153));

Alert(UpsideGapThreeMethods() && !TurnAlertOff_bull, "UpsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapThreeMethods() && (BubVerb_bull or BubNumb_bull) && ThreeShows_19 , low -15 ,  if BubNumb_bull

then "19" else if BubVerb_bull then "UpsideGapThreeMethods" else "" , CreateColor(153, 255, 153)  , no);



#UpsideTasukiGap_20,    #C
###### 20 ####################### UpsideTasukiGap() #############################
def ThreeShows_20 = If (ShowFirst == ShowFirst.UpsideTasukiGap_20 or ShowSecond == ShowSecond.UpsideTasukiGap_20 or ShowThird == ShowThird.UpsideTasukiGap_20, 1, 0);

rec UpsideTasukiGap_Trig = If(UpsideTasukiGap().bullish , UpsideTasukiGap(), UpsideTasukiGap_Trig[1]);

AddLabel(UpsideTasukiGap_Trig > 0  && showLabel_bull  && ThreeShows_20, "20=UpsideTasukiGap" , CreateColor(153, 255, 153));

Alert(UpsideTasukiGap() && !TurnAlertOff_bull, "UpsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideTasukiGap() && (BubVerb_bull or BubNumb_bull) && ThreeShows_20 , low -15 ,  if BubNumb_bull

then "20" else if BubVerb_bull then "UpsideTasukiGap" else "" , CreateColor(153, 255, 153)  , no);


##################################################################################################################################


#ConcealingBabySwallow_1, # R
###### 1 ####################### ConcealingBabySwallow() #############################
def candleAll_1 =  If(ShowAll_bull == yes , ConcealingBabySwallow(), Double.NaN);

plot CBS = candleAll_1;

CBS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

CBS.SetDefaultColor(CreateColor(0, 255, 0));

CBS.SetLineWeight(5);

rec ConcealingBabySwallow_Trig_1 = If (ConcealingBabySwallow().bullish , + BarNumber(), ConcealingBabySwallow_Trig_1[1] );

AddLabel(ConcealingBabySwallow_Trig_1 > 0 && showLabel_bull && ShowAll_bull,  "1=ConcealingBabySwallow" , CreateColor(0, 255, 0));

Alert(ConcealingBabySwallow()  && !TurnAlertOff_bull && ShowAll_bull, "ConcealingBabySwallow", Alert.BAR, Sound.Chimes);

AddChartBubble(ConcealingBabySwallow() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "1" else if BubVerb_bull then "ConcealingBabySwallow" else "" ,  CreateColor(0, 255, 0) , no);



#Hammer_2,    # R
###### 2 ####################### Hammer() #############################
def candleAll_2 =  If(ShowAll_bull == yes , Hammer(), Double.NaN);

plot Hammer = candleAll_2;

Hammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Hammer.SetDefaultColor(CreateColor(0, 255, 0));

Hammer.SetLineWeight(5);

rec Hammer_Trig_2 = If (Hammer().bullish , + BarNumber(), Hammer_Trig_2[1] );

AddLabel(Hammer_Trig_2 > 0 && showLabel_bull && ShowAll_bull,  "2=Hammer" , CreateColor(0, 255, 0));

Alert(Hammer()  && !TurnAlertOff_bull && ShowAll_bull, "Hammer", Alert.BAR, Sound.Chimes);

AddChartBubble(Hammer() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "2" else if BubVerb_bull then "Hammer" else "" ,  CreateColor(0, 255, 0) , no);




#HighPriceGappingPlay_3, #C
###### 3 ####################### HighPriceGappingPlay() & showAll #################################
def  candleAll_3 = If(ShowAll_bull == yes , HighPriceGappingPlay(), Double.NaN);

plot AB = candleAll_3;

AB.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

AB.SetDefaultColor(CreateColor(153, 255, 153));

AB.SetLineWeight(5);

rec HighPriceGappingPlay_Trig_3 = If (HighPriceGappingPlay().bullish, + BarNumber(), HighPriceGappingPlay_Trig_3[1] );

AddLabel(HighPriceGappingPlay_Trig_3 > 0 && showLabel_bull && ShowAll_bull, "3=HighPriceGappingPlay" , CreateColor(153, 255, 153));

Alert(HighPriceGappingPlay()  && !TurnAlertOff_bull && ShowAll_bull, "HighPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(HighPriceGappingPlay() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "3" else if BubVerb_bull then "HighPriceGappingPlay" else "" ,  CreateColor(153, 255, 153) , no);





#HomingPigeon_4, #R
###### 4 ####################### HomingPigeon() & showAll #################################
def candleAll_4 =  If(ShowAll_bull == yes , HomingPigeon(), Double.NaN);

plot HP = candleAll_4;

HP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

HP.SetDefaultColor(CreateColor(0, 255, 0));

HP.SetLineWeight(5);

rec HomingPigeon_Trig_4 = If (HomingPigeon().bullish , + BarNumber(), HomingPigeon_Trig_4[1] );

AddLabel(HomingPigeon_Trig_4 > 0 && showLabel_bull && ShowAll_bull,  "4=HomingPigeon" , CreateColor(0, 255, 0));

Alert(HomingPigeon()  && !TurnAlertOff_bull && ShowAll_bull, "HomingPigeon", Alert.BAR, Sound.Chimes);

AddChartBubble(HomingPigeon() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "4" else if BubVerb_bull then "HomingPigeon" else "" ,  CreateColor(0, 255, 0) , no);



#InvertedHammer_5,
###### 5 ####################### InvertedHammer() #############################
def candleAll_5 =  If(ShowAll_bull == yes , InvertedHammer(), Double.NaN);

plot INVHammer = candleAll_5;

INVHammer.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

INVHammer.SetDefaultColor(CreateColor(0, 255, 0));

INVHammer.SetLineWeight(5);

rec InvertedHammer_Trig_5 = If (InvertedHammer().bullish , + BarNumber(), InvertedHammer_Trig_5[1] );

AddLabel(InvertedHammer_Trig_5 > 0 && showLabel_bull && ShowAll_bull,  "5=InvertedHammer" , CreateColor(0, 255, 0));

Alert(InvertedHammer()  && !TurnAlertOff_bull && ShowAll_bull, "InvertedHammer", Alert.BAR, Sound.Chimes);

AddChartBubble(InvertedHammer() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "5" else if BubVerb_bull then "InvertedHammer" else "" ,  CreateColor(0, 255, 0) , no);



#MatchingLow_6,
###### 6 ####################### MatchingLow() #############################
def candleAll_6 =  If(ShowAll_bull == yes , MatchingLow(), Double.NaN);

plot ML = candleAll_6;

ML.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

ML.SetDefaultColor(CreateColor(0, 255, 0));

ML.SetLineWeight(5);

rec MatchingLow_Trig_6 = If (MatchingLow().bullish , + BarNumber(), MatchingLow_Trig_6[1] );

AddLabel(MatchingLow_Trig_6 > 0 && showLabel_bull && ShowAll_bull,  "6=MatchingLow" , CreateColor(0, 255, 0));

Alert(MatchingLow()  && !TurnAlertOff_bull && ShowAll_bull, "MatchingLow", Alert.BAR, Sound.Chimes);

AddChartBubble(MatchingLow() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "6" else if BubVerb_bull then "MatchingLow" else "" ,  CreateColor(0, 255, 0) , no);





#MatHold_7, #C
###### 7 ####################### MatHold() #############################
def  candleAll_7 = If(ShowAll_bull == yes , MatHold(), Double.NaN);

plot MH = candleAll_7;

MH.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MH.SetDefaultColor(CreateColor(153, 255, 153));

MH.SetLineWeight(5);

rec MatHold_Trig_7 = If (MatHold().bullish, + BarNumber(), MatHold_Trig_7[1] );

AddLabel(MatHold_Trig_7 > 0 && showLabel_bull && ShowAll_bull, "7=MatHold" , CreateColor(153, 255, 153));

Alert(MatHold()  && !TurnAlertOff_bull && ShowAll_bull, "MatHold", Alert.BAR, Sound.Chimes);

AddChartBubble(MatHold() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "7" else if BubVerb_bull then "MatHold" else "" ,  CreateColor(153, 255, 153) , no);

#MorningDojiStar_8,
###### 2 ####################### MorningDojiStar() #############################
def candleAll_8 =  If(ShowAll_bull == yes , MorningDojiStar(), Double.NaN);

plot MDS = candleAll_8;

MDS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MDS.SetDefaultColor(CreateColor(0, 255, 0));

MDS.SetLineWeight(5);

rec MorningDojiStar_Trig_8 = If (MorningDojiStar().bullish , + BarNumber(), MorningDojiStar_Trig_8[1] );

AddLabel(MorningDojiStar_Trig_8 > 0 && showLabel_bull && ShowAll_bull,  "8=MorningDojiStar" , CreateColor(0, 255, 0));

Alert(MorningDojiStar()  && !TurnAlertOff_bull && ShowAll_bull, "MorningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningDojiStar() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "8" else if BubVerb_bull then "MorningDojiStar" else "" ,  CreateColor(0, 255, 0) , no);




#MorningStar_9,
###### 9 ####################### MorningStar() #############################
def candleAll_9 =  If(ShowAll_bull == yes , MorningStar(), Double.NaN);

plot MS = candleAll_9;

MS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MS.SetDefaultColor(CreateColor(0, 255, 0));

MS.SetLineWeight(5);

rec MorningStar_Trig_9 = If (MorningStar().bullish , + BarNumber(), MorningStar_Trig_9[1] );

AddLabel(MorningStar_Trig_9 > 0 && showLabel_bull && ShowAll_bull,  "9=MorningStar" , CreateColor(0, 255, 0));

Alert(MorningStar()  && !TurnAlertOff_bull && ShowAll_bull, "MorningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(MorningStar() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "9" else if BubVerb_bull then "MorningStar" else "" ,  CreateColor(0, 255, 0) , no);


#OneWhiteSoldier_10,
###### 10 ####################### OneWhiteSoldier() #############################
def candleAll_10 =  If(ShowAll_bull == yes , OneWhiteSoldier(), Double.NaN);

plot OWS = candleAll_10;

OWS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

OWS.SetDefaultColor(CreateColor(0, 255, 0));

OWS.SetLineWeight(5);

rec OneWhiteSoldier_Trig_10 = If (OneWhiteSoldier().bullish , + BarNumber(), OneWhiteSoldier_Trig_10[1] );

AddLabel(OneWhiteSoldier_Trig_10 > 0 && showLabel_bull && ShowAll_bull,  "10=OneWhiteSoldier" , CreateColor(0, 255, 0));

Alert(OneWhiteSoldier()  && !TurnAlertOff_bull && ShowAll_bull, "OneWhiteSoldier", Alert.BAR, Sound.Chimes);

AddChartBubble(OneWhiteSoldier() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "10" else if BubVerb_bull then "OneWhiteSoldier" else "" ,  CreateColor(0, 255, 0) , no);



#PiercingLine_11,
###### 11 ####################### PiercingLine() #############################
def candleAll_11 =  If(ShowAll_bull == yes , PiercingLine(), Double.NaN);

plot PL = candleAll_11;

PL.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

PL.SetDefaultColor(CreateColor(0, 255, 0));

PL.SetLineWeight(5);

rec PiercingLine_Trig_11 = If (PiercingLine().bullish , + BarNumber(), PiercingLine_Trig_11[1] );

AddLabel(PiercingLine_Trig_11 > 0 && showLabel_bull && ShowAll_bull,  "11=PiercingLine" , CreateColor(0, 255, 0));

Alert(PiercingLine()  && !TurnAlertOff_bull && ShowAll_bull, "PiercingLine", Alert.BAR, Sound.Chimes);

AddChartBubble(PiercingLine() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "11" else if BubVerb_bull then "PiercingLine" else "" ,  CreateColor(0, 255, 0) , no);



#RisingThreeMethods_12, #C
###### 12 ####################### RisingThreeMethods() #############################
def  candleAll_12 = If(ShowAll_bull == yes , RisingThreeMethods(), Double.NaN);

plot RTM = candleAll_12;

RTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

RTM.SetDefaultColor(CreateColor(153, 255, 153));

RTM.SetLineWeight(5);

rec RisingThreeMethods_Trig_12 = If (RisingThreeMethods().bullish, + BarNumber(), RisingThreeMethods_Trig_12[1] );

AddLabel(RisingThreeMethods_Trig_12 > 0 && showLabel_bull && ShowAll_bull, "12=RisingThreeMethods" , CreateColor(153, 255, 153));

Alert(RisingThreeMethods()  && !TurnAlertOff_bull && ShowAll_bull, "RisingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(RisingThreeMethods() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "12" else if BubVerb_bull then "RisingThreeMethods" else "" ,  CreateColor(153, 255, 153) , no);



#Sticksandwich_13,
###### 13 ####################### Sticksandwich() #############################
def candleAll_13 =  If(ShowAll_bull == yes , Sticksandwich(), Double.NaN);

plot SS = candleAll_13;

SS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SS.SetDefaultColor(CreateColor(0, 255, 0));

SS.SetLineWeight(5);

rec Sticksandwich_Trig_13 = If (Sticksandwich().bullish , + BarNumber(), Sticksandwich_Trig_13[1] );

AddLabel(Sticksandwich_Trig_13 > 0 && showLabel_bull && ShowAll_bull,  "13=Sticksandwich" , CreateColor(0, 255, 0));

Alert(Sticksandwich()  && !TurnAlertOff_bull && ShowAll_bull, "Sticksandwich", Alert.BAR, Sound.Chimes);

AddChartBubble(Sticksandwich() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "13" else if BubVerb_bull then "Sticksandwich" else "" ,  CreateColor(0, 255, 0) , no);



#ThreeInsideUp_14,
###### 14 ####################### ThreeInsideUp() #############################
def candleAll_14 =  If(ShowAll_bull == yes , ThreeInsideUp(), Double.NaN);

plot TIU = candleAll_14;

TIU.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TIU.SetDefaultColor(CreateColor(0, 255, 0));

TIU.SetLineWeight(5);

rec ThreeInsideUp_Trig_14 = If (ThreeInsideUp().bullish , + BarNumber(), ThreeInsideUp_Trig_14[1] );

AddLabel(ThreeInsideUp_Trig_14 > 0 && showLabel_bull && ShowAll_bull,  "14=ThreeInsideUp" , CreateColor(0, 255, 0));

Alert(ThreeInsideUp()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeInsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideUp() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "14" else if BubVerb_bull then "ThreeInsideUp" else "" ,  CreateColor(0, 255, 0) , no);



#ThreeOutsideUp_15,
###### 15 ####################### ThreeOutsideUp() #############################
def candleAll_15 =  If(ShowAll_bull == yes , ThreeOutsideUp(), Double.NaN);

plot TOU = candleAll_15;

TOU.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TOU.SetDefaultColor(CreateColor(0, 255, 0));

TOU.SetLineWeight(5);

rec ThreeOutsideUp_Trig_15 = If (ThreeOutsideUp().bullish , + BarNumber(), ThreeOutsideUp_Trig_15[1] );

AddLabel(ThreeOutsideUp_Trig_15 > 0 && showLabel_bull && ShowAll_bull,  "15=ThreeOutsideUp" , CreateColor(0, 255, 0));

Alert(ThreeOutsideUp()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeOutsideUp", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideUp() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "15" else if BubVerb_bull then "ThreeOutsideUp" else "" ,  CreateColor(0, 255, 0) , no);




#ThreeStarsInTheSouth_16,
###### 16 ####################### ThreeStarsInTheSouth() #############################
def candleAll_16 =  If(ShowAll_bull == yes , ThreeStarsInTheSouth(), Double.NaN);

plot TSITS = candleAll_16;

TSITS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TSITS.SetDefaultColor(CreateColor(0, 255, 0));

TSITS.SetLineWeight(5);

rec ThreeStarsInTheSouth_Trig_16 = If (ThreeStarsInTheSouth().bullish , + BarNumber(), ThreeStarsInTheSouth_Trig_16[1] );

AddLabel(ThreeStarsInTheSouth_Trig_16 > 0 && showLabel_bull && ShowAll_bull,  "16=ThreeStarsInTheSouth" , CreateColor(0, 255, 0));

Alert(ThreeStarsInTheSouth()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeStarsInTheSouth", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeStarsInTheSouth() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "16" else if BubVerb_bull then "ThreeStarsInTheSouth" else "" ,  CreateColor(0, 255, 0) , no);


#ThreeWhiteSoldiers_17,
###### 17 ####################### ThreeWhiteSoldiers() #############################
def candleAll_17 =  If(ShowAll_bull == yes , ThreeWhiteSoldiers(), Double.NaN);

plot TWS = candleAll_17;

TWS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TWS.SetDefaultColor(CreateColor(0, 255, 0));

TWS.SetLineWeight(5);

rec ThreeWhiteSoldiers_Trig_17 = If (ThreeWhiteSoldiers().bullish , + BarNumber(), ThreeWhiteSoldiers_Trig_17[1] );

AddLabel(ThreeWhiteSoldiers_Trig_17 > 0 && showLabel_bull && ShowAll_bull,  "17=ThreeWhiteSoldiers" , CreateColor(0, 255, 0));

Alert(ThreeWhiteSoldiers()  && !TurnAlertOff_bull && ShowAll_bull, "ThreeWhiteSoldiers", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeWhiteSoldiers() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "17" else if BubVerb_bull then "ThreeWhiteSoldiers" else "" ,  CreateColor(0, 255, 0) , no);



#UniqueThreeRiverBottom_18,
###### 18 ####################### UniqueThreeRiverBottom() #############################
def candleAll_18 =  If(ShowAll_bull == yes , UniqueThreeRiverBottom(), Double.NaN);

plot UTRB = candleAll_18;

UTRB.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UTRB.SetDefaultColor(CreateColor(0, 255, 0));

UTRB.SetLineWeight(5);

rec UniqueThreeRiverBottom_Trig_18 = If (UniqueThreeRiverBottom().bullish, + BarNumber(), UniqueThreeRiverBottom_Trig_18[1] );

AddLabel(UniqueThreeRiverBottom_Trig_18 > 0 && showLabel_bull && ShowAll_bull,  "18=UniqueThreeRiverBottom" , CreateColor(0, 255, 0));

Alert(UniqueThreeRiverBottom()  && !TurnAlertOff_bull && ShowAll_bull, "UniqueThreeRiverBottom", Alert.BAR, Sound.Chimes);

AddChartBubble(UniqueThreeRiverBottom() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "18" else if BubVerb_bull then "UniqueThreeRiverBottom" else "" ,  CreateColor(0, 255, 0) , no);



#UpsideGapThreeMethods_19, #C
###### 19 ####################### UpsideGapThreeMethods() #############################
def  candleAll_19 = If(ShowAll_bull == yes , UpsideGapThreeMethods(), Double.NaN);

plot UGTM = candleAll_19;

UGTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UGTM.SetDefaultColor(CreateColor(153, 255, 153));

UGTM.SetLineWeight(5);

rec UpsideGapThreeMethods_Trig_19 = If (UpsideGapThreeMethods().bullish, + BarNumber(), UpsideGapThreeMethods_Trig_19[1] );

AddLabel(UpsideGapThreeMethods_Trig_19 > 0 && showLabel_bull && ShowAll_bull, "19=UpsideGapThreeMethods" , CreateColor(153, 255, 153));

Alert(UpsideGapThreeMethods()  && !TurnAlertOff_bull && ShowAll_bull, "UpsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapThreeMethods() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "19" else if BubVerb_bull then "UpsideGapThreeMethods" else "" ,  CreateColor(153, 255, 153) , no);




#UpsideTasukiGap_20  #C
###### 20 ####################### UpsideTasukiGap() #############################
def  candleAll_20 = If(ShowAll_bull == yes , UpsideTasukiGap().bullish, Double.NaN);

plot UTG = candleAll_20;

UTG.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

UTG.SetDefaultColor(CreateColor(153, 255, 153));

UTG.SetLineWeight(5);

rec UpsideTasukiGap_Trig_20 = If (UpsideTasukiGap().bullish, + BarNumber(), UpsideTasukiGap_Trig_20[1] );

AddLabel(UpsideTasukiGap_Trig_20 > 0 && showLabel_bull && ShowAll_bull, "20=UpsideTasukiGap" , CreateColor(153, 255, 153));

Alert(UpsideTasukiGap()  && !TurnAlertOff_bull && ShowAll_bull, "UpsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideTasukiGap() && (BubVerb_bull or BubNumb_bull) && (ShowAll_bull) , low -15 ,  if BubNumb_bull

then "20" else if BubVerb_bull then "UpsideTasukiGap" else "" ,  CreateColor(153, 255, 153) , no);

The bear pattern is here but it needed a lot of work. So I stripped it down and started from scratch using the basic format, and here is the final product.

This is verbose bear only:
fOvmmzo.png


This is ID # bear only:
GjJ6mz8.png


This is select 3 to show example 1-verbose:
aodyGJ2.png


This is select 3 to show example 2-ID #: as you can see the choose display format works for both show all or pick n choose.
oNnav0N.png


Code Bear only:
Code:
#Bearish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 20 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#reformated by mourningwood4521 on usethinkscript to go in order of libray terms as of March 2021
#Report any problems to 'StanL' on TOS' ThinkScript Lounge
#Revision date 3:36 PM 9/29/2013


addlabel(yes, "Bearish Only Reversals",  createcolor(255, 0, 0));
addlabel(yes, "Bearish only Continuations: 4, 5, 8, 11, 12, 14, 19", createcolor(255, 153, 153));


input TurnAlertOff = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubble = {default none, Verbose, ID_Number};#Hint showBubble:Choice of what format the candle bubble ID should have

input ShowAll = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.


def BubNone = If (showBubble == showBubble.none, 1, 0);

def BubVerb = If (showBubble == showBubble.Verbose, 1, 0);

def BubNumb =  If (showBubble == showBubble.ID_Number, 1, 0);

#####################################################

############ Define the three selection Enums #################

#####################################################

input ShowFirst =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show


input ShowSecond =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show


input ShowThird =  {default none, AdvanceBlock_1, DarkCloudCover_2, Deliberation_3, DownsideGapThreeMethods_4,  DownsideTasukiGap_5, EveningDojiStar_6, EveningStar_7, FallingThreeMethods_8, HangingMan_9, IdenticalThreeCrows_10, InNeck_11, LowPriceGappingPlay_12, OneBlackCrow_13, OnNeck_14, ShootingStar_15, ThreeBlackCrows_16, ThreeInsideDown_17, ThreeOutsideDown_18, Thrusting_19, TwoCrows_20, UpsideGapTwoCrows_21}; #hint ShowSecond:Select the candle to show

###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle;

switch (ShowFirst) {
case AdvanceBlock_1:

    candle = If(ShowFirst.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle =  If(ShowFirst.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle = If(ShowFirst.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle = If(ShowFirst.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle = If(ShowFirst.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle = If(ShowFirst.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle = If(ShowFirst.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle = If(ShowFirst.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle = If(ShowFirst.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle = If(ShowFirst.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle = If(ShowFirst.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle = If(ShowFirst.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle = If(ShowFirst.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle = If(ShowFirst.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle = If(ShowFirst.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle = If(ShowFirst.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle = If(ShowFirst.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle = If(ShowFirst.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle = If(ShowFirst.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle = If(ShowFirst.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle = If(ShowFirst.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show1st = candle;

Show1st.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show1st.SetDefaultColor(Color.GREEN);

Show1st.SetLineWeight(5);
#####################################################

############ Process Input 'ShowSecond' Enum #################

#####################################################
def candle2;

switch (ShowSecond) {
case AdvanceBlock_1:

    candle2 = If(ShowSecond.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle2 =  If(ShowSecond.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle2 = If(ShowSecond.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle2 = If(ShowSecond.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle2 = If(ShowSecond.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle2 = If(ShowSecond.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle2 = If(ShowSecond.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle2 = If(ShowSecond.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle2 = If(ShowSecond.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle2 = If(ShowSecond.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle2 = If(ShowSecond.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle2 = If(ShowSecond.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle2 = If(ShowSecond.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle2 = If(ShowSecond.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle2 = If(ShowSecond.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle2 = If(ShowSecond.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle2 = If(ShowSecond.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle2 = If(ShowSecond.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle2 = If(ShowSecond.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle2 = If(ShowSecond.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle2 = If(ShowSecond.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle2 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show2nd = candle2;

Show2nd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show2nd.SetDefaultColor(Color.GREEN);

Show2nd.SetLineWeight(5);
###########################################################

############ Process Input 'Showthird' Enum ###############

###########################################################
def candle3;

switch (ShowThird) {
case AdvanceBlock_1:

    candle3 = If(ShowThird.AdvanceBlock(), AdvanceBlock(), Double.NaN);
case DarkCloudCover_2:

    candle3 =  If(ShowThird.DarkCloudCover(), DarkCloudCover(), Double.NaN);
case Deliberation_3:

    candle3 = If(ShowThird.Deliberation(), Deliberation(), Double.NaN);
case DownsideGapThreeMethods_4:

    candle3 = If(ShowThird.DownsideGapThreeMethods(), DownsideGapThreeMethods(), Double.NaN);
case DownsideTasukiGap_5:

    candle3 = If(ShowThird.DownsideTasukiGap(), DownsideTasukiGap(), Double.NaN);
case EveningDojiStar_6:

    candle3 = If(ShowThird.EveningDojiStar(), EveningDojiStar(), Double.NaN);
case EveningStar_7:

    candle3 = If(ShowThird.EveningStar() , EveningStar(), Double.NaN);
case FallingThreeMethods_8:

    candle3 = If(ShowThird.FallingThreeMethods() , FallingThreeMethods(), Double.NaN);
case HangingMan_9:

    candle3 = If(ShowThird.HangingMan()   , HangingMan(), Double.NaN);
case IdenticalThreeCrows_10:

    candle3 = If(ShowThird.IdenticalThreeCrows()   , IdenticalThreeCrows(), Double.NaN);
case InNeck_11:

    candle3 = If(ShowThird.InNeck()   , InNeck(), Double.NaN);
case LowPriceGappingPlay_12:

    candle3 = If(ShowThird.LowPriceGappingPlay()   , LowPriceGappingPlay(), Double.NaN);
case OneBlackCrow_13:

    candle3 = If(ShowThird.OneBlackCrow()  , OneBlackCrow(), Double.NaN);
case OnNeck_14:

    candle3 = If(ShowThird.OnNeck()   , OnNeck(), Double.NaN);
case ShootingStar_15:

    candle3 = If(ShowThird.ShootingStar() , ShootingStar(), Double.NaN);
case ThreeBlackCrows_16:

    candle3 = If(ShowThird.ThreeBlackCrows()  , ThreeBlackCrows(), Double.NaN);
case ThreeInsideDown_17:

    candle3 = If(ShowThird.ThreeInsideDown()  , ThreeInsideDown(), Double.NaN);
case ThreeOutsideDown_18:

    candle3 = If(ShowThird.ThreeOutsideDown()  , ThreeOutsideDown(), Double.NaN);
case Thrusting_19:

    candle3 = If(ShowThird.Thrusting(), Thrusting(), Double.NaN);
case  TwoCrows_20:

    candle3 = If(ShowThird.TwoCrows()  , TwoCrows(), Double.NaN);
case  UpsideGapTwoCrows_21:

    candle3 = If(ShowThird.UpsideGapTwoCrows()  , UpsideGapTwoCrows(), Double.NaN);
case none:

    candle3 = Double.NaN;

}  # Closing of switch (ShowFirst) {

plot Show3rd = candle3;

Show3rd.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show3rd.SetDefaultColor(Color.GREEN);

Show3rd.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

#AdvanceBlock_1,
###### 1 ####################### AdvanceBlock() #############################
def ThreeShows_1 = If (ShowFirst == ShowFirst.AdvanceBlock_1 or ShowSecond == ShowSecond.AdvanceBlock_1 or ShowThird == ShowThird.AdvanceBlock_1, 1, 0);

rec AdvancedB_Trig = If(AdvanceBlock().bearish , BarNumber(), AdvancedB_Trig[1]);

#Def AB_label = if(Trig_bar > 0, 1, 0);

AddLabel(AdvancedB_Trig > 0  && showLabel  && ThreeShows_1, "1=AdvanceBlock" , CreateColor(255, 0, 0));

Alert(AdvanceBlock() && !TurnAlertOff, "AdvanceBlockAlert", Alert.BAR, Sound.Chimes);

AddChartBubble(AdvanceBlock() && (BubVerb or BubNumb) && ThreeShows_1 , 15 + high ,  if BubNumb

then "1" else if BubVerb then "AdvanceBlock" else "" , CreateColor(255, 0, 0)  , yes);



#DarkcloudCover_2,
###### 2 ####################### DarkCloudCover() #################################
def ThreeShows_2 = If (ShowFirst == ShowFirst.DarkCloudCover_2 or ShowSecond == ShowSecond.DarkCloudCover_2 or ShowThird == ShowThird.DarkCloudCover_2, 1, 0);

rec DarkCloudCover_Trig = If(DarkCloudCover().bearish , BarNumber(), DarkCloudCover_Trig[1]);

AddLabel(DarkCloudCover_Trig > 0  && showLabel  && ThreeShows_2, "2=DarkCloudCover", CreateColor(255, 0, 0));

Alert(DarkCloudCover() && !TurnAlertOff, "DarkCloudCover Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DarkCloudCover() && (BubVerb or BubNumb) && ThreeShows_2, 15 + high ,  if BubNumb

then "2" else if BubVerb then "DarkCloudCover" else "" , CreateColor(255, 0, 0) , yes);



#Deliberation_3,
###### 3 ####################### Deliberation() #################################
def ThreeShows_3 = If (ShowFirst == ShowFirst.Deliberation_3 or ShowSecond == ShowSecond.Deliberation_3 or ShowThird == ShowThird.Deliberation_3, 1, 0);

rec Deliberation_Trig = If(Deliberation().bearish , BarNumber(), Deliberation_Trig[1]);

AddLabel(Deliberation_Trig > 0  && showLabel  && ThreeShows_3, "3=Deliberation", CreateColor(255, 0, 0));

Alert(Deliberation() && !TurnAlertOff, "Deliberation Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(Deliberation() && (BubVerb or BubNumb) && ThreeShows_3, 15 + high ,  if BubNumb

then "3" else if BubVerb then "Deliberation" else "" , CreateColor(255, 0, 0) , yes);




# DownsideGapThreeMethods_4,   #C
###### 4 ####################### DownsideGapThreeMethods() #################################
def ThreeShows_4 = If (ShowFirst == ShowFirst.DownsideGapThreeMethods_4 or ShowSecond == ShowSecond.DownsideGapThreeMethods_4 or ShowThird == ShowThird.DownsideGapThreeMethods_4, 1, 0);

rec DownsideGapThreeMethods_Trig = If(DownsideGapThreeMethods().bearish , BarNumber(), DownsideGapThreeMethods_Trig[1]);

AddLabel(DownsideGapThreeMethods_Trig > 0  && showLabel  && ThreeShows_4, "4=DownsideGapThreeMethods", CreateColor(255, 153, 153));

Alert(DownsideGapThreeMethods() && !TurnAlertOff, "DownsideGapThreeMethods Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideGapThreeMethods() && (BubVerb or BubNumb) && ThreeShows_4, 15 + high ,  if BubNumb

then "4" else if BubVerb then "DownsideGapThreeMethods" else "" , CreateColor(255, 153, 153) , yes);




#DownsideTasukiGap_5, #C
###### 5 ####################### DownsideTasukiGap() #################################
def ThreeShows_5 = If (ShowFirst == ShowFirst.DownsideTasukiGap_5 or ShowSecond == ShowSecond.DownsideTasukiGap_5 or ShowThird == ShowThird.DownsideTasukiGap_5, 1, 0);

rec DownsideTasukiGap_Trig = If(DownsideTasukiGap().bearish , BarNumber(), DownsideTasukiGap_Trig[1]);

AddLabel(DownsideTasukiGap_Trig > 0  && showLabel  && ThreeShows_5, "5=DownsideTasukiGap", CreateColor(255, 153, 153));

Alert(DownsideTasukiGap() && !TurnAlertOff, "DownsideTasukiGap Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideTasukiGap() && (BubVerb or BubNumb) && ThreeShows_5, 15 + high ,  if BubNumb

then "5" else if BubVerb then "DownsideTasukiGap" else "" , CreateColor(255, 153, 153) , yes);


#EveningDojiStar_6, 
###### 6 ####################### EveningDojiStar() #################################
def ThreeShows_6 = If (ShowFirst == ShowFirst.EveningDojiStar_6 or ShowSecond == ShowSecond.EveningDojiStar_6 or ShowThird == ShowThird.EveningDojiStar_6, 1, 0);

rec EveningDojiStar_Trig = If(EveningDojiStar().bearish , BarNumber(), EveningDojiStar_Trig[1]);

AddLabel(EveningDojiStar_Trig > 0  && showLabel  && ThreeShows_6, "6=EveningDojiStar", CreateColor(255, 0, 0));

Alert(EveningDojiStar() && !TurnAlertOff, "EveningDojiStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningDojiStar() && (BubVerb or BubNumb) && ThreeShows_6, 15 + high ,  if BubNumb

then "6" else if BubVerb then "EveningDojiStar" else "" , CreateColor(255, 0, 0) , yes);



#EveningStar_7, 
###### 7 ####################### EveningStar() #################################
def ThreeShows_7 = If (ShowFirst == ShowFirst.EveningStar_7 or ShowSecond == ShowSecond.EveningStar_7 or ShowThird == ShowThird.EveningStar_7, 1, 0);

rec EveningStar_Trig = If(EveningStar().bearish , BarNumber(), EveningStar_Trig[1]);

AddLabel(EveningStar_Trig > 0  && showLabel  && ThreeShows_7, "7=EveningStar", CreateColor(255, 0, 0));

Alert(EveningStar() && !TurnAlertOff, "EveningStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningStar() && (BubVerb or BubNumb) && ThreeShows_7, 15 + high ,  if BubNumb

then "7" else if BubVerb then "EveningStar" else "" , CreateColor(255, 0, 0) , yes);



#FallingThreeMethods_8, #C
###### 8 ####################### FallingThreeMethods() #################################
def ThreeShows_8 = If (ShowFirst == ShowFirst.FallingThreeMethods_8 or ShowSecond == ShowSecond.FallingThreeMethods_8 or ShowThird == ShowThird.FallingThreeMethods_8, 1, 0);

rec FallingThreeMethods_Trig = If(FallingThreeMethods().bearish , BarNumber(), FallingThreeMethods_Trig[1]);

AddLabel(FallingThreeMethods_Trig > 0  && showLabel  && ThreeShows_8, "8=FallingThreeMethods", CreateColor(255, 153, 153));

Alert(FallingThreeMethods() && !TurnAlertOff, "FallingThreeMethods Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(FallingThreeMethods() && (BubVerb or BubNumb) && ThreeShows_8, 15 + high ,  if BubNumb

then "8" else if BubVerb then "FallingThreeMethods" else "" , CreateColor(255, 153, 153) , yes);




#HangingMan_9, 
###### 9 ####################### HangingMan() #################################
def ThreeShows_9 = If (ShowFirst == ShowFirst.HangingMan_9 or ShowSecond == ShowSecond.HangingMan_9 or ShowThird == ShowThird.HangingMan_9, 1, 0);

rec HangingMan_Trig = If(HangingMan().bearish , BarNumber(), HangingMan_Trig[1]);

AddLabel(HangingMan_Trig > 0  && showLabel  && ThreeShows_9, "9=HangingMan", CreateColor(255, 0, 0));

Alert(HangingMan() && !TurnAlertOff, "HangingMan Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(HangingMan() && (BubVerb or BubNumb) && ThreeShows_9,  15 + high,  if BubNumb

then "9" else if BubVerb then "HangingMan" else "" , CreateColor(255, 0, 0), yes);



#IdenticalThreeCrows_10, 
###### 10 ####################### IdenticalThreeCrows() #################################
def ThreeShows_10 = If (ShowFirst == ShowFirst.IdenticalThreeCrows_10 or ShowSecond == ShowSecond.IdenticalThreeCrows_10 or ShowThird == ShowThird.IdenticalThreeCrows_10, 1, 0);

rec IdenticalThreeCrows_Trig = If(IdenticalThreeCrows().bearish , BarNumber(), IdenticalThreeCrows_Trig[1]);

AddLabel(IdenticalThreeCrows_Trig > 0  && showLabel  && ThreeShows_10, "10=IdenticalThreeCrows", CreateColor(255, 0, 0));

Alert(IdenticalThreeCrows() && !TurnAlertOff, "IdenticalThreeCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(IdenticalThreeCrows() && (BubVerb or BubNumb) && ThreeShows_10, 15 + high ,  if BubNumb

then "10" else if BubVerb then "IdenticalThreeCrows" else "" , CreateColor(255, 0, 0) , yes);



#InNeck_11,    #C
###### 11 ####################### InNeck() #################################
def ThreeShows_11 = If (ShowFirst == ShowFirst.InNeck_11 or ShowSecond == ShowSecond.InNeck_11 or ShowThird == ShowThird.InNeck_11, 1, 0);

rec InNeck_Trig = If(InNeck().bearish , BarNumber(), InNeck_Trig[1]);

AddLabel(InNeck_Trig > 0  && showLabel  && ThreeShows_11, "11=InNeck", CreateColor(255, 153, 153));

Alert(InNeck() && !TurnAlertOff, "InNeck Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(InNeck() && (BubVerb or BubNumb) && ThreeShows_11, 15 + high ,  if BubNumb

then "11" else if BubVerb then "InNeck" else "" , CreateColor(255, 153, 153) , yes);




#LowPriceGappingPlay_12, #C
###### 12 ####################### LowPriceGappingPlay() #################################
def ThreeShows_12 = If (ShowFirst == ShowFirst.LowPriceGappingPlay_12 or ShowSecond == ShowSecond.LowPriceGappingPlay_12 or ShowThird == ShowThird.LowPriceGappingPlay_12, 1, 0);

rec LowPriceGappingPlay_Trig = If(LowPriceGappingPlay().bearish , BarNumber(), LowPriceGappingPlay_Trig[1]);

AddLabel(LowPriceGappingPlay_Trig > 0  && showLabel  && ThreeShows_12, "12=LowPriceGappingPlay", CreateColor(255, 153, 153));

Alert(LowPriceGappingPlay() && !TurnAlertOff, "LowPriceGappingPlay Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(LowPriceGappingPlay() && (BubVerb or BubNumb) && ThreeShows_12, 15 + high ,  if BubNumb

then "12" else if BubVerb then "LowPriceGappingPlay" else "" , CreateColor(255, 153, 153) , yes);



#OneBlackCrow_13,
###### 13 ####################### OneBlackCrow() #################################
def ThreeShows_13 = If (ShowFirst == ShowFirst.OneBlackCrow_13 or ShowSecond == ShowSecond.OneBlackCrow_13 or ShowThird == ShowThird.OneBlackCrow_13, 1, 0);

rec OneBlackCrow_Trig = If(OneBlackCrow().bearish , BarNumber(), OneBlackCrow_Trig[1]);

AddLabel(OneBlackCrow_Trig > 0  && showLabel  && ThreeShows_13, "13=OneBlackCrow", CreateColor(255, 0, 0));

Alert(OneBlackCrow() && !TurnAlertOff, "OneBlackCrow Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(OneBlackCrow() && (BubVerb or BubNumb) && ThreeShows_13, 15 + high ,  if BubNumb

then "13" else if BubVerb then "OneBlackCrow" else "" , CreateColor(255, 0, 0) , yes);



#OnNeck_14, #C
###### 14 ####################### OnNeck() #################################
def ThreeShows_14 = If (ShowFirst == ShowFirst.OnNeck_14 or ShowSecond == ShowSecond.OnNeck_14 or ShowThird == ShowThird.OnNeck_14, 1, 0);

rec OnNeck_Trig = If(OnNeck().bearish , BarNumber(), OnNeck_Trig[1]);

AddLabel(OnNeck_Trig > 0  && showLabel  && ThreeShows_14, "14=OnNeck", CreateColor(255, 153, 153));

Alert(OnNeck() && !TurnAlertOff, "OnNeck Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(OnNeck() && (BubVerb or BubNumb) && ThreeShows_14, 15 + high ,  if BubNumb

then "14" else if BubVerb then "OnNeck" else "" , CreateColor(255, 153, 153) , yes);



#ShootingStar_15,
###### 15 ####################### ShootingStar() #################################
def ThreeShows_15 = If (ShowFirst == ShowFirst.ShootingStar_15 or ShowSecond == ShowSecond.ShootingStar_15 or ShowThird == ShowThird.ShootingStar_15, 1, 0);

rec ShootingStar_Trig = If(ShootingStar().bearish , BarNumber(), ShootingStar_Trig[1]);

AddLabel(ShootingStar_Trig > 0  && showLabel  && ThreeShows_15, "15=ShootingStar", CreateColor(255, 0, 0));

Alert(ShootingStar() && !TurnAlertOff, "ShootingStar Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ShootingStar() && (BubVerb or BubNumb) && ThreeShows_15, 15 + high ,  if BubNumb

then "15" else if BubVerb then "ShootingStar" else "" , CreateColor(255, 0, 0) , yes);



#ThreeBlackCrows_16,
###### 16 ####################### ThreeBlackCrows() #################################
def ThreeShows_16 = If (ShowFirst == ShowFirst.ThreeBlackCrows_16 or ShowSecond == ShowSecond.ThreeBlackCrows_16 or ShowThird == ShowThird.ThreeBlackCrows_16, 1, 0);

rec ThreeBlackCrows_Trig = If(ThreeBlackCrows().bearish , BarNumber(), ThreeBlackCrows_Trig[1]);

AddLabel(ThreeBlackCrows_Trig > 0  && showLabel  && ThreeShows_16, "16=ThreeBlackCrows", CreateColor(255, 0, 0));

Alert(ThreeBlackCrows() && !TurnAlertOff, "ThreeBlackCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeBlackCrows() && (BubVerb or BubNumb) && ThreeShows_16, 15 + high ,  if BubNumb

then "16" else if BubVerb then "ThreeBlackCrows" else "" , CreateColor(255, 0, 0) , yes);




#ThreeInsideDown_17,
###### 17 ####################### ThreeInsideDown() #################################
def ThreeShows_17 = If (ShowFirst == ShowFirst.ThreeInsideDown_17 or ShowSecond == ShowSecond.ThreeInsideDown_17 or ShowThird == ShowThird.ThreeInsideDown_17, 1, 0);

rec ThreeInsideDown_Trig = If(DarkCloudCover().bearish , BarNumber(), ThreeInsideDown_Trig[1]);

AddLabel(ThreeInsideDown_Trig > 0  && showLabel  && ThreeShows_17, "17=ThreeInsideDown", Color.GREEN);

Alert(ThreeInsideDown() && !TurnAlertOff, "ThreeInsideDown Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideDown() && (BubVerb or BubNumb) && ThreeShows_17, 15 + high ,  if BubNumb

then "17" else if BubVerb then "ThreeInsideDown" else "" , CreateColor(255, 0, 0) , yes);



#ThreeOutsideDown_18,
###### 18 ####################### ThreeOutsideDown() #################################
def ThreeShows_18 = If (ShowFirst == ShowFirst.ThreeOutsideDown_18 or ShowSecond == ShowSecond.ThreeOutsideDown_18 or ShowThird == ShowThird.ThreeOutsideDown_18, 1, 0);

rec ThreeOutsideDown_Trig = If(DarkCloudCover().bearish , BarNumber(), ThreeOutsideDown_Trig[1]);

AddLabel(ThreeOutsideDown_Trig > 0  && showLabel  && ThreeShows_18, "18=ThreeOutsideDown", CreateColor(255, 0, 0));

Alert(ThreeOutsideDown() && !TurnAlertOff, "ThreeOutsideDown Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideDown() && (BubVerb or BubNumb) && ThreeShows_18, 15 + high ,  if BubNumb

then "18" else if BubVerb then "ThreeOutsideDown" else "" , CreateColor(255, 0, 0) , yes);






#Thrusting_19, #C
###### 19 ####################### Thrusting() #################################
def ThreeShows_19 = If (ShowFirst == ShowFirst.Thrusting_19 or ShowSecond == ShowSecond.Thrusting_19 or ShowThird == ShowThird.Thrusting_19, 1, 0);

rec Thrusting_Trig = If(DarkCloudCover().bearish , BarNumber(), Thrusting_Trig[1]);

AddLabel(Thrusting_Trig > 0  && showLabel  && ThreeShows_19, "19=Thrusting", CreateColor(255, 153, 153));

Alert(Thrusting() && !TurnAlertOff, "Thrusting Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(Thrusting() && (BubVerb or BubNumb) && ThreeShows_19, 15 + high ,  if BubNumb

then "19" else if BubVerb then "Thrusting" else "" , CreateColor(255, 153, 153) , yes);



#TwoCrows_20,
###### 20 ####################### TwoCrows() #################################
def ThreeShows_20 = If (ShowFirst == ShowFirst.TwoCrows_20 or ShowSecond == ShowSecond.TwoCrows_20 or ShowThird == ShowThird.TwoCrows_20, 1, 0);

rec TwoCrows_Trig = If(TwoCrows().bearish , BarNumber(), TwoCrows_Trig[1]);

AddLabel(TwoCrows_Trig > 0  && showLabel  && ThreeShows_20, "20=TwoCrows", CreateColor(255, 0, 0));

Alert(TwoCrows() && !TurnAlertOff, "TwoCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(TwoCrows() && (BubVerb or BubNumb) && ThreeShows_20, 15 + high ,  if BubNumb

then "20" else if BubVerb then "TwoCrows" else "" , CreateColor(255, 0, 0) , yes);



#UpsideGapTwoCrows_21};
###### 21 ####################### UpsideGapTwoCrows() #################################
def ThreeShows_21 = If (ShowFirst == ShowFirst.UpsideGapTwoCrows_21 or ShowSecond == ShowSecond.UpsideGapTwoCrows_21 or ShowThird == ShowThird.UpsideGapTwoCrows_21, 1, 0);

rec UpsideGapTwoCrows_Trig = If(DarkCloudCover().bearish , BarNumber(), UpsideGapTwoCrows_Trig[1]);

AddLabel(UpsideGapTwoCrows_Trig > 0  && showLabel  && ThreeShows_21, "21=UpsideGapTwoCrows", CreateColor(255, 0, 0));

Alert(UpsideGapTwoCrows() && !TurnAlertOff, "UpsideGapTwoCrows Alert", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapTwoCrows() && (BubVerb or BubNumb) && ThreeShows_21, 15 + high ,  if BubNumb

then "21" else if BubVerb then "UpsideGapTwoCrows" else "" , CreateColor(255, 0, 0) , yes);




#############################################################################

############## Processing 'Show All' = yes #######################

#############################################################################
###all adjustments to bubble locations are imput using this second section and the placement is in the second section



# AdvanceBlock_1, #R
###### 1 ####################### AdvanceBlock() & showAll #################################
def  candleAll_41 = If(ShowAll == yes , AdvanceBlock(), Double.NaN);

plot AdvBlk = candleAll_41;

AdvBlk.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

AdvBlk.SetDefaultColor(CreateColor(255, 0, 0));

AdvBlk.SetLineWeight(5);

rec AdvanceBlock_Trig_41 = If (AdvanceBlock().bearish, + BarNumber(), AdvanceBlock_Trig_41[1] );

AddLabel(AdvanceBlock_Trig_41 > 0 && showLabel && ShowAll, "1=AdvanceBlock" , CreateColor(255, 0, 0));

Alert(AdvanceBlock()  && !TurnAlertOff && ShowAll, "AdvanceBlock", Alert.BAR, Sound.Chimes);

AddChartBubble(AdvanceBlock() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "1" else if BubVerb then "AdvanceBlock" else "" ,  CreateColor(255, 0, 0) , yes);



#DarkCloudCover_2, #R
###### 2 ####################### DarkCloudCover() & showAll #################################
def candleAll_42 =  If(ShowAll == yes , DarkCloudCover(), Double.NaN);

plot DCC = candleAll_42;

DCC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DCC.SetDefaultColor(CreateColor(255, 0, 0));

DCC.SetLineWeight(5);

rec DarkCloudCover_Trig_42 = If (DarkCloudCover().bearish , + BarNumber(), DarkCloudCover_Trig_42[1] );

AddLabel(DarkCloudCover_Trig_42 > 0 && showLabel && ShowAll,  "2=DarkCloudCover" , CreateColor(255, 0, 0));

Alert(DarkCloudCover()  && !TurnAlertOff && ShowAll, "DarkCloudCover", Alert.BAR, Sound.Chimes);

AddChartBubble(DarkCloudCover() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "2" else if BubVerb then "DarkCloudCover" else "" ,  CreateColor(255, 0, 0) , yes);



#Deliberation_3, #R
###### 3 ####################### Deliberation() & showAll #################################
def  candleAll_43 = If(ShowAll == yes , Deliberation(), Double.NaN);

plot Delib = candleAll_43;

Delib.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Delib.SetDefaultColor(CreateColor(255, 0, 0));

Delib.SetLineWeight(5);

rec Deliberation_Trig_43 = If (Deliberation().bearish, + BarNumber(), Deliberation_Trig_43[1] );

AddLabel(Deliberation_Trig_43 > 0 && showLabel && ShowAll, "3=Deliberation" , CreateColor(255, 0, 0));

Alert(Deliberation()  && !TurnAlertOff && ShowAll, "Deliberation", Alert.BAR, Sound.Chimes);

AddChartBubble(Deliberation() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "3" else if BubVerb then "Deliberation" else "" ,  CreateColor(255, 0, 0) , yes);



#DownsideGapThreeMethods_4, #C
###### 4 ####################### DownsideGapThreeMethods() & showAll #################################
def candleAll_44 =  If(ShowAll == yes , DownsideGapThreeMethods(), Double.NaN);

plot DGTM = candleAll_44;

DGTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DGTM.SetDefaultColor(CreateColor(255, 153, 153));

DGTM.SetLineWeight(5);

rec DownsideGapThreeMethods_Trig_44 = If (DownsideGapThreeMethods().bearish , + BarNumber(), DownsideGapThreeMethods_Trig_44[1] );

AddLabel(DownsideGapThreeMethods_Trig_44 > 0 && showLabel && ShowAll,  "4=DownsideGapThreeMethods" , CreateColor(255, 153, 153));

Alert(DownsideGapThreeMethods()  && !TurnAlertOff && ShowAll, "DownsideGapThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideGapThreeMethods() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "4" else if BubVerb then "DownsideGapThreeMethods" else "" ,  CreateColor(255, 153, 153) , yes);



# DownsideTasukiGap_5, #C
###### 5 ####################### DownsideTasukiGap() & showAll #################################
def candleAll_45 =  If(ShowAll == yes , DownsideTasukiGap(), Double.NaN);

plot DTG = candleAll_45;

DTG.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

DTG.SetDefaultColor(CreateColor(255, 153, 153));

DTG.SetLineWeight(5);

rec DownsideTasukiGap_Trig_45 = If (DownsideTasukiGap().bearish , + BarNumber(), DownsideTasukiGap_Trig_45[1] );

AddLabel(DownsideTasukiGap_Trig_45 > 0 && showLabel && ShowAll,  "5=DownsideTasukiGap" , CreateColor(255, 153, 153));

Alert(DownsideTasukiGap()  && !TurnAlertOff && ShowAll, "DownsideTasukiGap", Alert.BAR, Sound.Chimes);

AddChartBubble(DownsideTasukiGap() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "5" else if BubVerb then "DownsideTasukiGap" else "" ,  CreateColor(255, 153, 153) , yes);


#EveningDojiStar_6, #R
###### 6 ####################### EveningDojiStar() & showAll #################################
def candleAll_46 =  If(ShowAll == yes , EveningDojiStar(), Double.NaN);

plot EDS = candleAll_46;

EDS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

EDS.SetDefaultColor(CreateColor(255, 0, 0));

EDS.SetLineWeight(5);

rec EveningDojiStar_Trig_46 = If (EveningDojiStar().bearish , + BarNumber(), EveningDojiStar_Trig_46[1] );

AddLabel(EveningDojiStar_Trig_46 > 0 && showLabel && ShowAll,  "6=EveningDojiStar" , CreateColor(255, 0, 0));

Alert(EveningDojiStar()  && !TurnAlertOff && ShowAll, "EveningDojiStar", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningDojiStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "6" else if BubVerb then "EveningDojiStar" else "" ,  CreateColor(255, 0, 0) , yes);



#EveningStar_7, #R
###### 7 ####################### EveningStar() & showAll #################################
def candleAll_47 =  If(ShowAll == yes , EveningStar(), Double.NaN);

plot ES = candleAll_47;

ES.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ES.SetDefaultColor(CreateColor(255, 0, 0));

ES.SetLineWeight(5);

rec EveningStar_Trig_47 = If (EveningStar().bearish , + BarNumber(), EveningStar_Trig_47[1] );

AddLabel(EveningStar_Trig_47 > 0 && showLabel && ShowAll,  "7=EveningStar" , CreateColor(255, 0, 0));

Alert(EveningStar()  && !TurnAlertOff && ShowAll, "EveningStar", Alert.BAR, Sound.Chimes);

AddChartBubble(EveningStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "7" else if BubVerb then "EveningStar" else "" ,  CreateColor(255, 0, 0) , yes);



#FallingThreeMethods_8,   #C
###### 8 ####################### FallingThreeMethods() & showAll #################################
def candleAll_48 =  If(ShowAll == yes , FallingThreeMethods(), Double.NaN);

plot FTM = candleAll_48;

FTM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

FTM.SetDefaultColor(CreateColor(255, 153, 153));

FTM.SetLineWeight(5);

rec FallingThreeMethods_Trig_48 = If (FallingThreeMethods().bearish , + BarNumber(), FallingThreeMethods_Trig_48[1] );

AddLabel(FallingThreeMethods_Trig_48 > 0 && showLabel && ShowAll,  "8=FallingThreeMethods" , CreateColor(255, 153, 153));

Alert(FallingThreeMethods()  && !TurnAlertOff && ShowAll, "FallingThreeMethods", Alert.BAR, Sound.Chimes);

AddChartBubble(FallingThreeMethods() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "8" else if BubVerb then "FallingThreeMethods" else "" ,  CreateColor(255, 153, 153) , yes);



#HangingMan_9, #R
###### 9 ####################### HangingMan() & showAll #################################
def candleAll_49 =  If(ShowAll == yes , HangingMan(), Double.NaN);

plot HM = candleAll_49;

HM.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

HM.SetDefaultColor(CreateColor(255, 0, 0));

HM.SetLineWeight(5);

rec HangingMan_Trig_49 = If (HangingMan().bearish , + BarNumber(), HangingMan_Trig_49[1] );

AddLabel(HangingMan_Trig_49 > 0 && showLabel && ShowAll,  "9=HangingMan" , CreateColor(255, 0, 0));

Alert(HangingMan()  && !TurnAlertOff && ShowAll, "HangingMan", Alert.BAR, Sound.Chimes);

AddChartBubble(HangingMan() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "9" else if BubVerb then "HangingMan" else "" ,  CreateColor(255, 0, 0) , yes);



#IdenticalThreeCrows_10, #R
###### 10 ####################### IdenticalThreeCrows() & showAll #################################
def candleAll_50 =  If(ShowAll == yes , IdenticalThreeCrows(), Double.NaN);

plot ITC = candleAll_50;

ITC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ITC.SetDefaultColor(CreateColor(255, 0, 0));

ITC.SetLineWeight(5);

rec IdenticalThreeCrows_Trig_50 = If (IdenticalThreeCrows().bearish , + BarNumber(), IdenticalThreeCrows_Trig_50[1] );

AddLabel(IdenticalThreeCrows_Trig_50 > 0 && showLabel && ShowAll,  "10=IdenticalThreeCrows" , CreateColor(255, 0, 0));

Alert(IdenticalThreeCrows()  && !TurnAlertOff && ShowAll, "IdenticalThreeCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(IdenticalThreeCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "10" else if BubVerb then "IdenticalThreeCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#InNeck_11, # C
###### 11 ####################### InNeck() & showAll #################################
def candleAll_51 =  If(ShowAll == yes , InNeck(), Double.NaN);

plot IN = candleAll_51;

IN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

IN.SetDefaultColor(CreateColor(255, 153, 153));

IN.SetLineWeight(5);

rec InNeck_Trig_52 = If (InNeck().bearish , + BarNumber(), InNeck_Trig_52[1] );

AddLabel(InNeck_Trig_52 > 0 && showLabel && ShowAll,  "11=InNeck" , CreateColor(255, 153, 153));

Alert(InNeck()  && !TurnAlertOff && ShowAll, "InNeck", Alert.BAR, Sound.Chimes);

AddChartBubble(InNeck() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "11" else if BubVerb then "InNeck" else "" ,  CreateColor(255, 153, 153) , yes);



#LowPriceGappingPlay_12, # C
###### 12 ####################### LowPriceGappingPlay() & showAll #################################
def candleAll_52 =  If(ShowAll == yes , LowPriceGappingPlay(), Double.NaN);

plot LPGP = candleAll_52;

LPGP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

LPGP.SetDefaultColor(CreateColor(255, 153, 153));

LPGP.SetLineWeight(5);

rec LowPriceGappingPlay_Trig_52 = If (LowPriceGappingPlay().bearish , + BarNumber(), LowPriceGappingPlay_Trig_52[1] );

AddLabel(LowPriceGappingPlay_Trig_52 > 0 && showLabel && ShowAll,  "12=LowPriceGappingPlay" , CreateColor(255, 153, 153));

Alert(LowPriceGappingPlay()  && !TurnAlertOff && ShowAll, "LowPriceGappingPlay", Alert.BAR, Sound.Chimes);

AddChartBubble(LowPriceGappingPlay() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "12" else if BubVerb then "LowPriceGappingPlay" else "" ,  CreateColor(255, 153, 153) , yes);



#OneBlackCrow_13, # R
###### 13 ####################### OneBlackCrow() & showAll #################################
def candleAll_53 =  If(ShowAll == yes , OneBlackCrow(), Double.NaN);

plot OBC = candleAll_53;

OBC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

OBC.SetDefaultColor(CreateColor(255, 0, 0));

OBC.SetLineWeight(5);

rec OneBlackCrow_Trig_53 = If (OneBlackCrow().bearish , + BarNumber(), OneBlackCrow_Trig_53[1] );

AddLabel(OneBlackCrow_Trig_53 > 0 && showLabel && ShowAll,  "13=OneBlackCrow" , CreateColor(255, 0, 0));

Alert(OneBlackCrow()  && !TurnAlertOff && ShowAll, "OneBlackCrow", Alert.BAR, Sound.Chimes);

AddChartBubble(OneBlackCrow() && (BubVerb or BubNumb) && (ShowAll) , 15 +  high ,  if BubNumb

then "13" else if BubVerb then "OneBlackCrow" else "" ,  CreateColor(255, 0, 0) , yes);



#OnNeck_14, # C
###### 14 ####################### OnNeck() & showAll #################################
def candleAll_54 =  If(ShowAll == yes , OnNeck(), Double.NaN);

plot ON = candleAll_54;

ON.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ON.SetDefaultColor(CreateColor(255, 153, 153));

ON.SetLineWeight(5);

rec OnNeck_Trig_54 = If (OnNeck().bearish , + BarNumber(), OnNeck_Trig_54[1] );

AddLabel(OnNeck_Trig_54 > 0 && showLabel && ShowAll,  "14=OnNeck" , CreateColor(255, 153, 153));

Alert(OnNeck()  && !TurnAlertOff && ShowAll, "OnNeck", Alert.BAR, Sound.Chimes);

AddChartBubble(OnNeck() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "14" else if BubVerb then "OnNeck" else "" ,  CreateColor(255, 153, 153) , yes);



#ShootingStar_15,
###### 15 ####################### ShootingStar() & showAll #################################
def candleAll_55 =  If(ShowAll == yes , ShootingStar(), Double.NaN);

plot SS = candleAll_55;

SS.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SS.SetDefaultColor(CreateColor(255, 0, 0));

SS.SetLineWeight(5);

rec ShootingStar_Trig_55 = If (ShootingStar().bearish , + BarNumber(), ShootingStar_Trig_55[1] );

AddLabel(ShootingStar_Trig_55 > 0 && showLabel && ShowAll,  "15=ShootingStar" , CreateColor(255, 0, 0));

Alert(ShootingStar()  && !TurnAlertOff && ShowAll, "ShootingStar", Alert.BAR, Sound.Chimes);

AddChartBubble(ShootingStar() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "15" else if BubVerb then "ShootingStar" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeBlackCrows_16,
###### 16 ####################### ThreeBlackCrows() & showAll #################################
def candleAll_56 =  If(ShowAll == yes , ThreeBlackCrows(), Double.NaN);

plot TBC = candleAll_56;

TBC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TBC.SetDefaultColor(CreateColor(255, 0, 0));

TBC.SetLineWeight(5);

rec ThreeBlackCrows_Trig_56 = If (ThreeBlackCrows().bearish , + BarNumber(), ThreeBlackCrows_Trig_56[1] );

AddLabel(ThreeBlackCrows_Trig_56 > 0 && showLabel && ShowAll,  "16=ThreeBlackCrows" , CreateColor(255, 0, 0));

Alert(ThreeBlackCrows()  && !TurnAlertOff && ShowAll, "ThreeBlackCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeBlackCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high  ,  if BubNumb

then "16" else if BubVerb then "ThreeBlackCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeInsideDown_17,
###### 17 ####################### ThreeInsideDown() & showAll #################################
def candleAll_57 =  If(ShowAll == yes , ThreeInsideDown(), Double.NaN);

plot TID = candleAll_57;

TID.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TID.SetDefaultColor(CreateColor(255, 0, 0));

TID.SetLineWeight(5);

rec ThreeInsideDown_Trig_57 = If (ThreeInsideDown().bearish , + BarNumber(), ThreeInsideDown_Trig_57[1] );

AddLabel(ThreeInsideDown_Trig_57 > 0 && showLabel && ShowAll,  "17=ThreeInsideDown" , CreateColor(255, 0, 0));

Alert(ThreeInsideDown()  && !TurnAlertOff && ShowAll, "ThreeInsideDown", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeInsideDown() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "17" else if BubVerb then "ThreeInsideDown" else "" ,  CreateColor(255, 0, 0) , yes);



#ThreeOutsideDown_18,
###### 18 ####################### ThreeOutsideDown() & showAll #################################
def candleAll_58 =  If(ShowAll == yes , ThreeOutsideDown(), Double.NaN);

plot TOD = candleAll_58;

TOD.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TOD.SetDefaultColor(CreateColor(255, 0, 0));

TOD.SetLineWeight(5);

rec ThreeOutsideDown_Trig_58 = If (ThreeOutsideDown().bearish , + BarNumber(), ThreeOutsideDown_Trig_58[1] );

AddLabel(ThreeOutsideDown_Trig_58 > 0 && showLabel && ShowAll,  "18=ThreeOutsideDown" , CreateColor(255, 0, 0));

Alert(ThreeOutsideDown()  && !TurnAlertOff && ShowAll, "ThreeOutsideDown", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeOutsideDown() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "18" else if BubVerb then "ThreeOutsideDown" else "" ,  CreateColor(255, 0, 0) , yes);



#Thrusting_19, # C
###### 19 ####################### Thrusting() & showAll #################################
def candleAll_59 =  If(ShowAll == yes , Thrusting(), Double.NaN);

plot Thrust = candleAll_59;

Thrust.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Thrust.SetDefaultColor(CreateColor(255, 153, 153));

Thrust.SetLineWeight(5);

rec Thrusting_Trig_59 = If (Thrusting().bearish , + BarNumber(), Thrusting_Trig_59[1] );

AddLabel(Thrusting_Trig_59 > 0 && showLabel && ShowAll,  "19=Thrusting" , CreateColor(255, 153, 153));

Alert(Thrusting()  && !TurnAlertOff && ShowAll, "Thrusting", Alert.BAR, Sound.Chimes);

AddChartBubble(Thrusting() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "19" else if BubVerb then "Thrusting" else "" ,  CreateColor(255, 153, 153) , yes);



#TwoCrows_20,
###### 20 ####################### TwoCrows() & showAll #################################
def candleAll_60 =  If(ShowAll == yes , TwoCrows(), Double.NaN);

plot TC = candleAll_60;

TC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TC.SetDefaultColor(CreateColor(255, 0, 0));

TC.SetLineWeight(5);

rec TwoCrows_Trig_60 = If (TwoCrows().bearish , + BarNumber(), TwoCrows_Trig_60[1] );

AddLabel(TwoCrows_Trig_60 > 0 && showLabel && ShowAll,  "20=TwoCrows" , CreateColor(255, 0, 0));

Alert(TwoCrows()  && !TurnAlertOff && ShowAll, "TwoCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(TwoCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "20" else if BubVerb then "TwoCrows" else "" ,  CreateColor(255, 0, 0) , yes);



#UpsideGapTwoCrows_21,
###### 21 ####################### UpsideGapTwoCrows() & showAll #################################
def candleAll_61 =  If(ShowAll == yes , UpsideGapTwoCrows(), Double.NaN);

plot UGTC = candleAll_61;

UGTC.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

UGTC.SetDefaultColor(CreateColor(255, 0, 0));

UGTC.SetLineWeight(5);

rec UpsideGapTwoCrows_Trig_61 = If (UpsideGapTwoCrows().bearish , + BarNumber(), UpsideGapTwoCrows_Trig_61[1] );

AddLabel(UpsideGapTwoCrows_Trig_61 > 0 && showLabel && ShowAll,  "21=UpsideGapTwoCrows" , CreateColor(255, 0, 0));

Alert(UpsideGapTwoCrows()  && !TurnAlertOff && ShowAll, "UpsideGapTwoCrows", Alert.BAR, Sound.Chimes);

AddChartBubble(UpsideGapTwoCrows() && (BubVerb or BubNumb) && (ShowAll) , 15 + high ,  if BubNumb

then "21" else if BubVerb then "UpsideGapTwoCrows" else "" ,  CreateColor(255, 0, 0) , yes);

The next 2 sections took me the longest. I had to make the system know each pattern was either bullish only or bearish only since each study will plot both a bullish arrow and bearish arrow unless you state otherwise, which is what I have done.
One thing to note, which I noted in the top of both of these studies, I took out 3 of the studies with # in front of but the format is there if you want to mess around with it.
I've taken out #Diji, #Williams Fractal & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.
Here is why I have #'ed out the Williams Fractal and zig zag:
Adzc2Bi.png


# Bullish&&Bearish Bullish only

This is the verbose B&B Bullish only:
NlQZh8p.png


This is the ID# B&B Bullish only:
bBcTwJV.png


B&B Bull Code:
Code:
#Bullish_AND_Bearish_Bullish_Patterns_only

declare upper;

#Hint: BullishCandlesticks: Plots and identifies all 14 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#formated by mourningwood4521 on usethinkscript using the format outlined by 'StanL' on TOS' ThinkScript Lounge for bull only.

AddLabel(yes, "Bull & Bear Bullish only Reversals", color.blue);
AddLabel(yes, "Bull & Bear Bullish only Continuations: 10, 12, 13, 14", createColor(0, 202, 236));

#shows all bullish only patterns of the bullish and bearish patterns on TOS except for #Diji, #Williams Fractural & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.


input TurnAlertOff_BBl = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_BBl = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubbleBull = {default none_Bull, Verbose_Bull, BullishID_Number}; #Hint showBubble:Choice of what format the candle bubble ID should have

def BubNoneBull = If (showBubbleBull == showBubbleBull.none_Bull, 1, 0);

def BubVerbBull = If (showBubbleBull == showBubbleBull.Verbose_Bull, 1, 0);

def BubNumbBull = If (showBubbleBull == showBubbleBull.BullishID_Number, 1, 0);

input ShowAll_BBl = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.

#####################################################
############ Define the three selection Enums #################
#####################################################

input ShowSeventh =   {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input ShowEighth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input ShowNinth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show
###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle7;

switch (ShowSeventh) {
case AbandonedBaby_1:

    candle7 = If(ShowSeventh.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle7 = If(ShowSeventh.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle7 = If(ShowSeventh.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle7 = If(ShowSeventh.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle7 = If(ShowSeventh.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle7 = If(ShowSeventh.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle7 = If(ShowSeventh.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle7 = If(ShowSeventh.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle7 = If(ShowSeventh.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle7 = If(ShowSeventh.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle7 = If(ShowSeventh.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle7 = If(ShowSeventh.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle7 = If(ShowSeventh.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle7 = If(ShowSeventh.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle7 = If(ShowSeventh.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle7 = If(ShowSeventh.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle7 = If(ShowSeventh.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle7 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show7th = candle7;

Show7th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show7th.SetDefaultColor(Color.GREEN);

Show7th.SetLineWeight(5);
###################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle8;

switch (ShowEighth) {
case AbandonedBaby_1:

    candle8 = If(ShowEighth.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle8 = If(ShowEighth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle8 = If(ShowEighth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle8 = If(ShowEighth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle8 = If(ShowEighth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle8 = If(ShowEighth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle8 = If(ShowEighth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle8 = If(ShowEighth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle8 = If(ShowEighth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle8 = If(ShowEighth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle8 = If(ShowEighth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle8 = If(ShowEighth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle8 = If(ShowEighth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle8 = If(ShowEighth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle8 = If(ShowEighth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle8 = If(ShowEighth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle8 = If(ShowEighth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle8 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show8th = candle8;

Show8th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show8th.SetDefaultColor(Color.GREEN);

Show8th.SetLineWeight(5);

###################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle9;

switch (ShowNinth) {
case AbandonedBaby_1:

    candle9 = If(ShowNinth.AbandonedBaby(), AbandonedBaby().bullish, Double.NaN);   # edited in .bullish.need to do this  for.bearish for all
case BeltHold_2:

    candle9 = If(ShowNinth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle9 = If(ShowNinth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle9 = If(ShowNinth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle9 = If(ShowNinth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle9 = If(ShowNinth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle9 = If(ShowNinth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle9 = If(ShowNinth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle9 = If(ShowNinth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle9 = If(ShowNinth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle9 = If(ShowNinth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle9 = If(ShowNinth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle9 = If(ShowNinth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle9 = If(ShowNinth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle9 = If(ShowNinth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle9 = If(ShowNinth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle9 = If(ShowNinth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle9 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show9th = candle9;

Show9th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show9th.SetDefaultColor(Color.GREEN);

Show9th.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################

###### 1 ####################### AbandonedBaby() #############################
def ThreeShows_71 = If (ShowSeventh == ShowSeventh.AbandonedBaby_1 or ShowEighth == ShowEighth.AbandonedBaby_1 or ShowNinth == ShowNinth.AbandonedBaby_1, 1, 0);

rec AbandonedBaby_Trig_bull = If(AbandonedBaby().bullish , BarNumber(), AbandonedBaby_Trig_bull[1]);

AddLabel(AbandonedBaby_Trig_bull > 0  && showLabel_BBl  && ThreeShows_71, "1=AbandonedBaby" , Color.GREEN);

Alert(AbandonedBaby().bullish && !TurnAlertOff_BBl, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_71 , low - 6 ,  if BubNumbBull

then "1" else if BubVerbBull then "AbandonedBaby" else "" , color.white  , no);



#BeltHold_2, #Bear
###### 2 ####################### BeltHold() #############################
def ThreeShows_72 = If (ShowSeventh == ShowSeventh.BeltHold_2 or ShowEighth == ShowEighth.BeltHold_2 or ShowNinth == ShowNinth.BeltHold_2, 1, 0);

rec BeltHold_Trig_bull = If(BeltHold().bullish , BarNumber(), BeltHold_Trig_bull[1]);

AddLabel(BeltHold_Trig_bull > 0  && showLabel_BBl  && ThreeShows_72, "2=BeltHold" , Color.RED);

Alert(BeltHold().bullish && !TurnAlertOff_BBl, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_72 , low - 6 ,  if BubNumbBull

then "2" else if BubVerbBull then "BeltHold" else "" , Color.WHITE  , no);



#Breakaway_3,
###### 3 ####################### Breakaway() #############################
def ThreeShows_73 = If (ShowSeventh == ShowSeventh.Breakaway_3 or ShowEighth == ShowEighth.Breakaway_3 or ShowNinth == ShowNinth.Breakaway_3, 1, 0);

rec Breakaway_Trig_bull = If(Breakaway().bullish , BarNumber(), Breakaway_Trig_bull[1]);

AddLabel(Breakaway_Trig_bull > 0  && showLabel_BBl  && ThreeShows_73, "3=Breakaway" , Color.RED);

Alert(Breakaway().bullish && !TurnAlertOff_BBl, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway() && (BubVerbBull or BubNumbBull) && ThreeShows_73 , low - 6 ,  if BubNumbBull

then "3" else if BubVerbBull then "Breakaway" else "" , Color.WHITE  , no);


#Doji_4,
###### 4 ####################### Doji() #############################
#def ThreeShows_84 = If (ShowSeventh == ShowSeventh.Doji_4 or ShowEighth == ShowEighth.Doji_4 or ShowNinth == ShowNinth.Doji_4, 1, 0);
#rec Doji_Trig_bull = If(Doji(), BarNumber(), Doji_Trig_bull[1]);
#AddLabel(Doji_Trig_bull > 0  && showLabel_BBl  && ThreeShows_84, "4=Doji" , Color.RED);
#Alert(Doji() && !TurnAlertOff_BBl, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBull or BubNumbBull) && ThreeShows_84 , low - 6  ,  if BubNumbBull
#then "4" else if BubVerbBull then "Doji" else "" , Color.WHITE  , no);


#Engulfing_5,
###### 5 ####################### Engulfing() #############################
def ThreeShows_75 = If (ShowSeventh == ShowSeventh.Engulfing_5 or ShowEighth == ShowEighth.Engulfing_5 or ShowNinth == ShowNinth.Engulfing_5, 1, 0);

rec Engulfing_Trig_bull = If(Engulfing().bullish , BarNumber(), Engulfing_Trig_bull[1]);

AddLabel(Engulfing_Trig_bull > 0  && showLabel_BBl  && ThreeShows_75, "5=Engulfing" , Color.RED);

Alert(Engulfing().bullish && !TurnAlertOff_BBl, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_75 , low - 6 ,  if BubNumbBull

then "5" else if BubVerbBull then "Engulfing" else "" , Color.WHITE  , no);



#Harami_6,
###### 6 ####################### Harami() #############################
def ThreeShows_76 = If (ShowSeventh == ShowSeventh.Harami_6 or ShowEighth == ShowEighth.Harami_6 or ShowNinth == ShowNinth.Harami_6, 1, 0);

rec Harami_Trig_bull = If(Harami().bullish , BarNumber(), Harami_Trig_bull[1]);

AddLabel(Harami_Trig_bull > 0  && showLabel_BBl  && ThreeShows_76, "6=Harami" , Color.RED);

Alert(Harami().bullish && !TurnAlertOff_BBl, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_76 , low - 6 ,  if BubNumbBull

then "6" else if BubVerbBull then "Harami" else "" , Color.WHITE  , no);



#HaramiCross_7,
###### 7 ####################### HaramiCross() #############################
def ThreeShows_77 = If (ShowSeventh == ShowSeventh.HaramiCross_7 or ShowEighth == ShowEighth.HaramiCross_7 or ShowNinth == ShowNinth.HaramiCross_7, 1, 0);

rec HaramiCross_Trig_bull = If(HaramiCross().bullish , BarNumber(), HaramiCross_Trig_bull[1]);

AddLabel(HaramiCross_Trig_bull > 0  && showLabel_BBl  && ThreeShows_77, "7=HaramiCross" , Color.RED);

Alert(HaramiCross().bullish && !TurnAlertOff_BBl, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_77 , low - 6 ,  if BubNumbBull

then "7" else if BubVerbBull then "HaramiCross" else "" , Color.WHITE  , no);



#Kicking_8,
###### 8 ####################### BeltHold() #############################
def ThreeShows_78 = If (ShowSeventh == ShowSeventh.Kicking_8 or ShowEighth == ShowEighth.Kicking_8 or ShowNinth == ShowNinth.Kicking_8, 1, 0);

rec Kicking_Trig_bull = If(Kicking().bullish , BarNumber(), Kicking_Trig_bull[1]);

AddLabel(Kicking_Trig_bull > 0  && showLabel_BBl  && ThreeShows_78, "8=Kicking" , Color.RED);

Alert(Kicking().bullish && !TurnAlertOff_BBl, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_78 , low - 6 ,  if BubNumbBull

then "8" else if BubVerbBull then "Kicking" else "" , Color.WHITE  , no);



#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() #############################
def ThreeShows_79 = If (ShowSeventh == ShowSeventh.LongLeggedDoji_9 or ShowEighth == ShowEighth.LongLeggedDoji_9 or ShowNinth == ShowNinth.LongLeggedDoji_9, 1, 0);

rec LongLeggedDoji_Trig_bull = If(LongLeggedDoji().bullish , BarNumber(), LongLeggedDoji_Trig_bull[1]);

AddLabel(LongLeggedDoji_Trig_bull > 0  && showLabel_BBl  && ThreeShows_79, "9=LongLeggedDoji" , Color.RED);

Alert(LongLeggedDoji().bullish && !TurnAlertOff_BBl, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_79 , low - 6 ,  if BubNumbBull

then "9" else if BubVerbBull then "LongLeggedDoji" else "" , Color.WHITE  , no);



#Marubozu_10,
###### 10 ####################### Marubozu() #############################
def ThreeShows_80 = If (ShowSeventh == ShowSeventh.Marubozu_10 or ShowEighth == ShowEighth.Marubozu_10 or ShowNinth == ShowNinth.Marubozu_10, 1, 0);

rec Marubozu_Trig_bull = If(Marubozu().bullish , BarNumber(), Marubozu_Trig_bull[1]);

AddLabel(Marubozu_Trig_bull > 0  && showLabel_BBl  && ThreeShows_80, "10=Marubozu" , createColor(0, 202, 236));

Alert(Marubozu().bullish && !TurnAlertOff_BBl, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_80, low - 6 ,  if BubNumbBull

then "10" else if BubVerbBull then "Marubozu" else "" , createColor(0, 202, 236)  , no);



#MeetingLines_11,
###### 11 ####################### MeetingLines() #############################
def ThreeShows_81 = If (ShowSeventh == ShowSeventh.MeetingLines_11 or ShowEighth == ShowEighth.MeetingLines_11 or ShowNinth == ShowNinth.MeetingLines_11, 1, 0);

rec MeetingLines_Trig_bull = If(MeetingLines().bullish , BarNumber(), MeetingLines_Trig_bull[1]);

AddLabel(MeetingLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_81, "11=MeetingLines" , Color.GREEN);

Alert(MeetingLines().bullish && !TurnAlertOff_BBl, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_81, low - 6 ,  if BubNumbBull

then "1" else if BubVerbBull then "MeetingLines" else "" , Color.WHITE  , no);



#SeparatingLines_12,
###### 12 ####################### SeparatingLines() #############################
def ThreeShows_82 = If (ShowSeventh == ShowSeventh.SeparatingLines_12 or ShowEighth == ShowEighth.SeparatingLines_12 or ShowNinth == ShowNinth.SeparatingLines_12, 1, 0);

rec SeparatingLines_Trig_bull = If(SeparatingLines().bullish , BarNumber(), SeparatingLines_Trig_bull[1]);

AddLabel(SeparatingLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_82, "12=SeparatingLines" , createColor(0, 202, 236));

Alert(SeparatingLines().bullish && !TurnAlertOff_BBl, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_82, low - 6 ,  if BubNumbBull

then "12" else if BubVerbBull then "SeparatingLines" else "" , createColor(0, 202, 236)  , no);



#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() #############################
def ThreeShows_83 = If (ShowSeventh == ShowSeventh.SideBySideWhiteLines_13 or ShowEighth == ShowEighth.SideBySideWhiteLines_13 or ShowNinth == ShowNinth.SideBySideWhiteLines_13, 1, 0);

rec SideBySideWhiteLines_Trig_bull = If(SideBySideWhiteLines().bullish , BarNumber(), SideBySideWhiteLines_Trig_bull[1]);

AddLabel(SideBySideWhiteLines_Trig_bull > 0  && showLabel_BBl  && ThreeShows_83, "13=SideBySideWhiteLines" , createColor(0, 202, 236));

Alert(SideBySideWhiteLines().bullish && !TurnAlertOff_BBl, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_83, low - 6 ,  if BubNumbBull

then "13" else if BubVerbBull then "SideBySideWhiteLines" else "" , createColor(0, 202, 236)  , no);



#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() #############################
def ThreeShows_84 = If (ShowSeventh == ShowSeventh.ThreeLineStrike_14 or ShowEighth == ShowEighth.ThreeLineStrike_14 or ShowNinth == ShowNinth.ThreeLineStrike_14, 1, 0);

rec ThreeOutsideUp_Trig_bull = If(ThreeLineStrike().bullish , BarNumber(), ThreeOutsideUp_Trig_bull[1]);

AddLabel(ThreeOutsideUp_Trig_bull > 0  && showLabel_BBl  && ThreeShows_84 , "14=ThreeLineStrike" , createColor(0, 202, 236));

Alert(ThreeLineStrike().bullish && !TurnAlertOff_BBl, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_84, low - 6 ,  if BubNumbBull

then "14" else if BubVerbBull then "ThreeLineStrike" else "" , createColor(0, 202, 236)  , no);


#TriStar_15,
###### 15 ####################### TriStar() #############################
def ThreeShows_85 = If (ShowSeventh == ShowSeventh.TriStar_15 or ShowEighth == ShowEighth.TriStar_15 or ShowNinth == ShowNinth.TriStar_15, 1, 0);

rec TriStar_Trig_bull = If(TriStar().bullish , BarNumber(), TriStar_Trig_bull[1]);

AddLabel(TriStar_Trig_bull > 0  && showLabel_BBl  && ThreeShows_85, "15=TriStar" , Color.GREEN);

Alert(TriStar().bullish && !TurnAlertOff_BBl, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bullish && (BubVerbBull or BubNumbBull) && ThreeShows_85, low - 6 ,  if BubNumbBull

then "15" else if BubVerbBull then "TriStar" else "" , Color.WHITE  , no);



#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() #############################
#def ThreeShows_86 = If (ShowSeventh == ShowSeventh.WilliamsFractal_16 or ShowEighth == ShowEighth.WilliamsFractal_16 or ShowNinth == ShowNinth.WilliamsFractal_16, 1, 0);
#rec WilliamsFractal_Trig_upfractal = If(WilliamsFractal().upfractal , BarNumber(), WilliamsFractal_Trig_upfractal[1]);
#AddLabel(WilliamsFractal_Trig_upfractal > 0  && showLabel_BBl  && ThreeShows_86, "16=WilliamsFractal" , Color.GREEN);
#Alert(WilliamsFractal().upfractal && !TurnAlertOff_BBl, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().upfractal && (BubVerbBull or BubNumbBull) && ThreeShows_86, low - 6 ,  if BubNumbBull
#then "16" else if BubVerbBull then "WilliamsFractal" else "" , Color.WHITE  , no);


#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() #############################
#def ThreeShows_87 = If (ShowSeventh == ShowSeventh.ZigZagStepPattern_17 or ShowEighth == ShowEighth.ZigZagStepPattern_17 or ShowNinth == ShowNinth.ZigZagStepPattern_17, 1, 0);
#rec ZigZagStepPattern_Trig_upstep = If(ZigZagStepPattern().upstep , BarNumber(), ZigZagStepPattern_Trig_upstep[1]);
#AddLabel(ZigZagStepPattern_Trig_upstep > 0  && showLabel_BBl  && ThreeShows_87, "17=ZigZagStepPattern" , Color.GREEN);
#Alert(ZigZagStepPattern().upstep && !TurnAlertOff_BBl, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().upstep && (BubVerbBull or BubNumbBull) && ThreeShows_87, low - 6 ,  if BubNumbBull
#then "17" else if BubVerbBull then "ZigZagStepPattern" else "" , Color.WHITE  , no);



###############################################################################
#start bottom section

# AbandonedBaby_1,   
###### 1 ####################### AbandonedBaby() & showAll #################################
def  candleAll_71 = If(ShowAll_BBl == yes , AbandonedBaby().bullish, Double.NaN);

plot AB_bullish = candleAll_71;

AB_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

AB_bullish.SetDefaultColor(Color.BLUE);

AB_bullish.SetLineWeight(5);

rec AbandonedBaby_bullish_Trig_71 = If (AbandonedBaby().bullish, + BarNumber(), AbandonedBaby_bullish_Trig_71[1] );

AddLabel(AbandonedBaby_bullish_Trig_71 > 0 && showLabel_BBl && ShowAll_BBl, "1=AbandonedBaby" , Color.BLUE);

Alert(AbandonedBaby().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6,  if BubNumbBull

then "1" else if BubVerbBull then "AbandonedBaby" else "" ,  Color.BLUE , no);



#BeltHold_2,
###### 2 ####################### BeltHold() & showAll #################################
def  candleAll_72 = If(ShowAll_BBl == yes , BeltHold().bullish, Double.NaN);

plot BH_bullish = candleAll_72;

BH_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

BH_bullish.SetDefaultColor(Color.BLUE);

BH_bullish.SetLineWeight(5);

rec BeltHold_bullish_Trig_72 = If (BeltHold().BULLISH, + BarNumber(), BeltHold_bullish_Trig_72[1] );

AddLabel(BeltHold_bullish_Trig_72 > 0 && showLabel_BBl && ShowAll_BBl, "2=BeltHold" , Color.BLUE);

Alert(BeltHold().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "2" else if BubVerbBull then "BeltHold" else "" ,  Color.BLUE , no);


# Breakaway_3, 
###### 3 ####################### Breakaway() & showAll #################################
def  candleAll_73 = If(ShowAll_BBl == yes , Breakaway().bullish, Double.NaN);

plot BAWAY_bullish = candleAll_73;

BAWAY_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

BAWAY_bullish.SetDefaultColor(Color.BLUE);

BAWAY_bullish.SetLineWeight(5);

rec Breakaway_bullish_Trig_73 = If (Breakaway().bullish, + BarNumber(), Breakaway_bullish_Trig_73[1] );

AddLabel(Breakaway_bullish_Trig_73 > 0 && showLabel_BBl && ShowAll_BBl, "3=Breakaway" , Color.BLUE);

Alert(Breakaway().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "3" else if BubVerbBull then "Breakaway" else "" ,  Color.BLUE , no);



#Doji_4,
###### 4 ####################### Doji() & showAll #################################
#def  candleAll_74 = If(ShowAll == yes , Doji(), Double.NaN);

#plot DOJI = candleAll_74;
#DOJI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#DOJI.SetDefaultColor(Color.YELLOW);
#DOJI.SetLineWeight(5);
#rec DOJI_Trig_74 = If (Doji(), + BarNumber(), DOJI_Trig_74[1] );
#AddLabel(DOJI_Trig_74 > 0 && showLabel && ShowAll, "4=Doji" , Color.VIOLET);
#Alert(Doji()  && !TurnAlertOff && ShowAll, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBull or BubNumbBull) && (ShowAll) , low - 6 ,  if BubNumbBull
#then "4" else if BubVerbBull then "Doji" else "" ,  Color.VIOLET , no);



#Engulfing_5,
###### 5 ####################### Engulfing() & showAll #################################
def  candleAll_75 = If(ShowAll_BBl == yes , Engulfing().bullish, Double.NaN);

plot Engulfing_bullish = candleAll_75;

Engulfing_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Engulfing_bullish.SetDefaultColor(Color.BLUE);

Engulfing_bullish.SetLineWeight(5);

rec Engulfing_bullish_Trig_75 = If (Engulfing().bullish, + BarNumber(), Engulfing_bullish_Trig_75[1] );

AddLabel(Engulfing_bullish_Trig_75 > 0 && showLabel_BBl && ShowAll_BBl, "5=Engulfing" , Color.BLUE);

Alert(Engulfing().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "5" else if BubVerbBull then "Engulfing" else "" ,  Color.BLUE , no);


#Harami_6,
###### 6 ####################### Harami() & showAll #################################
def  candleAll_76 = If(ShowAll_BBl == yes , Harami().bullish, Double.NaN);

plot Harami_bullish = candleAll_76;

Harami_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Harami_bullish.SetDefaultColor(Color.BLUE);

Harami_bullish.SetLineWeight(5);

rec Harami_bullish_Trig_76 = If (Harami().bullish, + BarNumber(), Harami_bullish_Trig_76[1] );

AddLabel(Harami_bullish_Trig_76 > 0 && showLabel_BBl && ShowAll_BBl, "6=Harami" , Color.BLUE);

Alert(Harami().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "6" else if BubVerbBull then "Harami" else "" ,  Color.BLUE , no);



#HaramiCross_7,
###### 7 ####################### HaramiCross() & showAll #################################
def  candleAll_77 = If(ShowAll_BBl == yes , HaramiCross().bullish, Double.NaN);

plot HaramiCross_bullish = candleAll_77;

HaramiCross_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

HaramiCross_bullish.SetDefaultColor(Color.BLUE);

HaramiCross_bullish.SetLineWeight(5);

rec HaramiCross_bullish_Trig_77 = If (HaramiCross().bullish, + BarNumber(), HaramiCross_bullish_Trig_77[1] );

AddLabel(HaramiCross_bullish_Trig_77 > 0 && showLabel_BBl && ShowAll_BBl, "7=HaramiCross" , Color.BLUE);

Alert(HaramiCross().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "7" else if BubVerbBull then "HaramiCross" else "" ,  Color.BLUE , no);


#Kicking_8,
###### 8 ####################### Kicking() & showAll #################################
def  candleAll_78 = If(ShowAll_BBl == yes , Kicking().bullish, Double.NaN);

plot Kicking_bullish = candleAll_78;

Kicking_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Kicking_bullish.SetDefaultColor(Color.BLUE);

Kicking_bullish.SetLineWeight(5);

rec Kicking_bullish_Trig_78 = If (Kicking().bullish, + BarNumber(), Kicking_bullish_Trig_78[1] );

AddLabel(Kicking_bullish_Trig_78 > 0 && showLabel_BBl && ShowAll_BBl, "8=Kicking" , Color.BLUE);

Alert(Kicking().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "8" else if BubVerbBull then "Kicking" else "" ,  Color.BLUE , no);


#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() & showAll #################################
def  candleAll_79 = If(ShowAll_BBl == yes , LongLeggedDoji().bullish, Double.NaN);

plot LongLeggedDoji_bullish = candleAll_79;

LongLeggedDoji_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

LongLeggedDoji_bullish.SetDefaultColor(Color.BLUE);

LongLeggedDoji_bullish.SetLineWeight(5);

rec LongLeggedDoji_bullish_Trig_79 = If (LongLeggedDoji().bullish, + BarNumber(), LongLeggedDoji_bullish_Trig_79[1] );

AddLabel(LongLeggedDoji_bullish_Trig_79 > 0 && showLabel_BBl && ShowAll_BBl, "9=LongLeggedDoji" , Color.BLUE);

Alert(LongLeggedDoji().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "9" else if BubVerbBull then "LongLeggedDoji" else "" ,  Color.BLUE , no);


#Marubozu_10,
###### 10 ####################### Marubozu() & showAll #################################
def  candleAll_80 = If(ShowAll_BBl == yes , Marubozu().bullish, Double.NaN);

plot Marubozu_bullish = candleAll_80;

Marubozu_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Marubozu_bullish.SetDefaultColor(createColor(0, 202, 236));

Marubozu_bullish.SetLineWeight(5);

rec Marubozu_bullish_Trig_80 = If (Marubozu().bullish, + BarNumber(), Marubozu_bullish_Trig_80[1] );

AddLabel(Marubozu_bullish_Trig_80 > 0 && showLabel_BBl && ShowAll_BBl, "10=Marubozu" , createColor(0, 202, 236));

Alert(Marubozu().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "10" else if BubVerbBull then "Marubozu" else "" ,  createColor(0, 202, 236) , no);


#MeetingLines_11,
###### 11 ####################### MeetingLines() & showAll #################################
def  candleAll_81 = If(ShowAll_BBl == yes , MeetingLines().bullish, Double.NaN);

plot MeetingLines_bullish = candleAll_81;

MeetingLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

MeetingLines_bullish.SetDefaultColor(Color.BLUE);

MeetingLines_bullish.SetLineWeight(5);

rec MeetingLines_bullish_Trig_81 = If (MeetingLines().bullish, + BarNumber(), MeetingLines_bullish_Trig_81[1] );

AddLabel(MeetingLines_bullish_Trig_81 > 0 && showLabel_BBl && ShowAll_BBl, "11=MeetingLines" , Color.BLUE);

Alert(MeetingLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "11" else if BubVerbBull then "MeetingLines" else "" ,  Color.BLUE , no);


#SeparatingLines_12,
###### 12 ####################### SeparatingLines() & showAll #################################
def  candleAll_82 = If(ShowAll_BBl == yes , SeparatingLines().bullish, Double.NaN);

plot SeparatingLines_bullish = candleAll_82;

SeparatingLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SeparatingLines_bullish.SetDefaultColor(createColor(0, 202, 236));

SeparatingLines_bullish.SetLineWeight(5);

rec SeparatingLines_bullish_Trig_82 = If (SeparatingLines().bullish, + BarNumber(), SeparatingLines_bullish_Trig_82[1] );

AddLabel(SeparatingLines_bullish_Trig_82 > 0 && showLabel_BBl && ShowAll_BBl, "12=SeparatingLines" , createColor(0, 202, 236));

Alert(SeparatingLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "12" else if BubVerbBull then "SeparatingLines" else "" ,  createColor(0, 202, 236) , no);


#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() & showAll #################################
def  candleAll_83 = If(ShowAll_BBl == yes , SideBySideWhiteLines().bullish, Double.NaN);

plot SideBySideWhiteLines_bullish = candleAll_83;

SideBySideWhiteLines_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

SideBySideWhiteLines_bullish.SetDefaultColor(createColor(0, 202, 236));

SideBySideWhiteLines_bullish.SetLineWeight(5);

rec SideBySideWhiteLines_bullish_Trig_83 = If (SideBySideWhiteLines().bullish, + BarNumber(), SideBySideWhiteLines_bullish_Trig_83[1] );

AddLabel(SideBySideWhiteLines_bullish_Trig_83 > 0 && showLabel_BBl && ShowAll_BBl, "13=SideBySideWhiteLines" , createColor(0, 202, 236));

Alert(SideBySideWhiteLines().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "13" else if BubVerbBull then "SideBySideWhiteLines" else "" ,  createColor(0, 202, 236) , no);


#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() & showAll #################################
def  candleAll_84 = If(ShowAll_BBl == yes , ThreeLineStrike().bullish, Double.NaN);

plot ThreeLineStrike_bullish = candleAll_84;

ThreeLineStrike_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

ThreeLineStrike_bullish.SetDefaultColor(createColor(0, 202, 236));

ThreeLineStrike_bullish.SetLineWeight(5);

rec ThreeLineStrike_bullish_Trig_84 = If (ThreeLineStrike().bullish, + BarNumber(), ThreeLineStrike_bullish_Trig_84[1] );

AddLabel(ThreeLineStrike_bullish_Trig_84 > 0 && showLabel_BBl && ShowAll_BBl, "14=ThreeLineStrike" , createColor(0, 202, 236));

Alert(ThreeLineStrike().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "14" else if BubVerbBull then "ThreeLineStrike" else "" ,  createColor(0, 202, 236) , no);


#TriStar_15,
###### 15 ####################### TriStar() & showAll #################################
def  candleAll_85 = If(ShowAll_BBl == yes , TriStar(), Double.NaN);

plot TriStar_bullish = candleAll_85;

TriStar_bullish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

TriStar_bullish.SetDefaultColor(Color.BLUE);

TriStar_bullish.SetLineWeight(5);

rec TriStar_bullish_Trig_85 = If (TriStar().bullish, + BarNumber(), TriStar_bullish_Trig_85[1] );

AddLabel(TriStar_bullish_Trig_85 > 0 && showLabel_BBl && ShowAll_BBl, "15=TriStar" , Color.BLUE);

Alert(TriStar().bullish  && !TurnAlertOff_BBl && ShowAll_BBl, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bullish && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull

then "15" else if BubVerbBull then "TriStar" else "" ,  Color.BLUE , no);


#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() & showAll #################################
#def  candleAll_86 = If(ShowAll_BBl == yes , WilliamsFractal().UpFractal, Double.NaN);
#plot WilliamsFractal = candleAll_86;
#WilliamsFractal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#WilliamsFractal.SetDefaultColor(Color.BLUE);
#WilliamsFractal.SetLineWeight(5);
#rec WilliamsFractal_Trig_86 = If (WilliamsFractal().UpFractal, + WilliamsFractal(), WilliamsFractal_Trig_86[1] );
#AddLabel(WilliamsFractal_Trig_86 > 0 && showLabel && ShowAll_BBl, "16=WilliamsFractal" , Color.VIOLET);
#Alert(WilliamsFractal().UpFractal  && !TurnAlertOff_BBl && ShowAll_BBl, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().UpFractal && (BubVerbBull or BubNumbBull) && (ShowAll_BBl) , low - 6 ,  if BubNumbBull
#then "16" else if BubVerbBull then "WilliamsFractal" else "" ,  Color.VIOLET , no);


#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() & showAll #################################
#def  candleAll_87 = If(ShowAll == yes , ZigZagStepPattern(), Double.NaN);
#plot ZigZagStepPattern = candleAll_87;
#ZigZagStepPattern.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#ZigZagStepPattern.SetDefaultColor(Color.BLUE);
#ZigZagStepPattern.SetLineWeight(5);
#rec ZigZagStepPattern_Trig_87 = If (ZigZagStepPattern().upstep, + ZigZagStepPattern(), ZigZagStepPattern_Trig_87[1]);
#AddLabel(ZigZagStepPattern_Trig_87 > 0 && showLabel && ShowAll, "17=ZigZagStepPattern" , Color.VIOLET);
#Alert(ZigZagStepPattern()  && !TurnAlertOff && ShowAll, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern() && (BubVerbBull or BubNumbBull) && (ShowAll) , low - 6 ,  if BubNumbBull
#then "17" else if BubVerbBull then "ZigZagStepPattern" else "" ,  Color.VIOLET , no);

# Bullish&&Bearish Bullish only

This is the verbose B&B Bearish only:
lvxpyCN.png


This is the ID# B&B Bearish only:
ocYwtPC.png


This is select a few only of the B&B Bearish only:
ocYwtPC.png


B&B Bear Code:
Code:
#Bullish_AND_Bearish_Bearish_Patterns_only

declare upper;

#Hint: BearishCandlesticks: Plots and identifies all 14 candlesticks or 3 individually selected candlesticks. Can be used with any aggregation period. Alerts, bubbles and labels may be toggled on/off. Within 'edit studies', any candle pattern can be isolated. A number-ID system is incorporated to enhance chart readability or the candle names may be used.

#formated by mourningwood4521 on usethinkscript using the format outlined by 'StanL' on TOS' ThinkScript Lounge for bull only.

AddLabel(yes, "Bull & Bear Bearish only Reversals", CreateColor(255, 136, 12));
AddLabel(yes, "Bull & Bear Bearish only Continuations: 10, 12, 13, 14", createColor(255, 255, 153));

#shows all bearish only patterns of the bullish and bearish patterns on TOS except for #Diji, #Williams Fractural & #ZigZagPattern due to diji plotting too much, #williams fractural and #zigzag would be added on the addBubble but wouldn't plot the addlabel section probably due to their complex nature.I #'ed them out so anyone who wants to have a go at it can have at it. Also notice how those 3 have different plot terms instead of bearish/bullish. #Doji is plotted at doji, # Williamns Fractal is plotted as upfractal and downfractal, and #ZigzagPattern is plotted as Upstep and Downstep.


input TurnAlertOff_BBr = yes;#hint TurnAlertOff:Turns on and off the alerts for any selected label that shows

input showLabel_BBr = yes;#hint showLabel:Turns on and off the showing of candle names in labels atop the plot

input showBubbleBear = {default none_bear, Verbose_Bear, BearishID_Number};#Hint showBubble:Choice of what format the candle bubble ID should have

def BubNoneBear = If (showBubbleBear == showBubbleBear.none_bear, 1, 0);

def BubVerbBear = If (showBubbleBear == showBubbleBear.Verbose_Bear, 1, 0);

def BubNumbBear = If (showBubbleBear == showBubbleBear.BearishID_Number, 1, 0);

input ShowAll_BBr = yes;#Hint ShowAll:A YES shows all candle where they exist. NO yturns off this plot so that individual candles may be selected in ShowFirst, ShowSecond or ShowThird.

#####################################################

############ Define the three selection Enums #################

#####################################################

input ShowTenth =   {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show

input Showeleventh =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show


input ShowThelfth =  {default none, AbandonedBaby_1, BeltHold_2, Breakaway_3, Doji_4, Engulfing_5, Harami_6, HaramiCross_7, Kicking_8, LongLeggedDoji_9, Marubozu_10, MeetingLines_11, SeparatingLines_12, SideBySideWhiteLines_13, ThreeLineStrike_14, TriStar_15, WilliamsFractal_16, ZigZagStepPattern_17}; #hint ShowSecond:Select the candle to show
###################################################
############ Process Input 'ShowFirst' Enum ##################
###################################################
def candle10;

switch (ShowTenth) {
case AbandonedBaby_1:

    candle10 = If(ShowTenth.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle10 = If(ShowTenth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle10 = If(ShowTenth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle10 = If(ShowTenth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle10 = If(ShowTenth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle10 = If(ShowTenth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle10 = If(ShowTenth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle10 = If(ShowTenth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle10 = If(ShowTenth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle10 = If(ShowTenth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle10 = If(ShowTenth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle10 = If(ShowTenth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle10 = If(ShowTenth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle10 = If(ShowTenth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle10 = If(ShowTenth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle10 = If(ShowTenth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle10 = If(ShowTenth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle10 = Double.NaN;
}  # Closing of switch (ShowTenth) {

plot Show10th = candle10;

Show10th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show10th.SetDefaultColor(Color.GREEN);

Show10th.SetLineWeight(5);
###################################################
############ Process Input 'ShowSecond' Enum ##################
###################################################
def candle11;

switch (Showeleventh) {
case AbandonedBaby_1:

    candle11 = If(Showeleventh.AbandonedBaby(), AbandonedBaby(), Double.NaN);
case BeltHold_2:

    candle11 = If(Showeleventh.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle11 = If(Showeleventh.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle11 = If(Showeleventh.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle11 = If(Showeleventh.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle11 = If(Showeleventh.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle11 = If(Showeleventh.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle11 = If(Showeleventh.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle11 = If(Showeleventh.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle11 = If(Showeleventh.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle11 = If(Showeleventh.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle11 = If(Showeleventh.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle11 = If(Showeleventh.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle11 = If(Showeleventh.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle11 = If(Showeleventh.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle11 = If(Showeleventh.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle11 = If(Showeleventh.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle11 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show11th = candle11;

Show11th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show11th.SetDefaultColor(Color.GREEN);

Show11th.SetLineWeight(5);

###################################################
############ Process Input 'ShowThird' Enum ##################
###################################################
def candle12;

switch (ShowThelfth) {
case AbandonedBaby_1:

    candle12 = If(ShowThelfth.AbandonedBaby(), AbandonedBaby().bullish, Double.NaN);
# edited in .bullish.need to do this  for.bearish for all
case BeltHold_2:

    candle12 = If(ShowThelfth.BeltHold(), BeltHold(), Double.NaN);
case Breakaway_3:

    candle12 = If(ShowThelfth.Breakaway(), Breakaway(), Double.NaN);
case Doji_4:

    candle12 = If(ShowThelfth.Doji(), Doji(), Double.NaN);
case Engulfing_5:

    candle12 = If(ShowThelfth.Engulfing(), Engulfing(), Double.NaN);
case Harami_6:

    candle12 = If(ShowThelfth.Harami(), Harami(), Double.NaN);
case HaramiCross_7:

    candle12 = If(ShowThelfth.HaramiCross(), HaramiCross(), Double.NaN);
case Kicking_8:

    candle12 = If(ShowThelfth.Kicking(), Kicking(), Double.NaN);
case LongLeggedDoji_9:

    candle12 = If(ShowThelfth.LongLeggedDoji(), LongLeggedDoji(), Double.NaN);
case Marubozu_10:

    candle12 = If(ShowThelfth.Marubozu(), Marubozu(), Double.NaN);
case MeetingLines_11:

    candle12 = If(ShowThelfth.MeetingLines(), MeetingLines(), Double.NaN);
case SeparatingLines_12:

    candle12 = If(ShowThelfth.SeparatingLines(), SeparatingLines(), Double.NaN);
case SideBySideWhiteLines_13:

    candle12 = If(ShowThelfth.SideBySideWhiteLines(), SideBySideWhiteLines(), Double.NaN);
case ThreeLineStrike_14:

    candle12 = If(ShowThelfth.ThreeLineStrike(), ThreeLineStrike(), Double.NaN);
case TriStar_15:

    candle12 = If(ShowThelfth.TriStar(), TriStar(), Double.NaN);
case WilliamsFractal_16:

    candle12 = If(ShowThelfth.WilliamsFractal(), WilliamsFractal(), Double.NaN);
case ZigZagStepPattern_17:

    candle12 = If(ShowThelfth.ZigZagStepPattern(), ZigZagStepPattern(), Double.NaN);
case none:

    candle12 = Double.NaN;
}  # Closing of switch (ShowFirst) {

plot Show12th = candle12;

Show12th.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);

Show12th.SetDefaultColor(Color.GREEN);

Show12th.SetLineWeight(5);
#########################################################################################

      ### Then following applies to Show1st, Show2nd & Show3rd plots ##########

     ########## The conditions for all 3 plots are implemented #################

#########################################################################################


# AbandonedBaby_1,
###### 1 ####################### AbandonedBaby() #############################
def ThreeShows_101 = If (ShowTenth == ShowTenth.AbandonedBaby_1 or Showeleventh == Showeleventh.AbandonedBaby_1 or ShowThelfth == ShowThelfth.AbandonedBaby_1, 1, 0);

rec AbandonedBaby_Trig_bear = If(AbandonedBaby().bearish , BarNumber(), AbandonedBaby_Trig_bear[1]);

AddLabel(AbandonedBaby_Trig_bear > 0  && showLabel_BBr  && ThreeShows_101, "1=AbandonedBaby" , CreateColor(255, 136, 12));

Alert(AbandonedBaby().bearish && !TurnAlertOff_BBr, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_101 , high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "AbandonedBaby" else "" , CreateColor(255, 136, 12)  , yes);  #BubVerbBear



#BeltHold_2, #Bear
###### 2 ####################### BeltHold() #############################
def ThreeShows_102 = If (ShowTenth == ShowTenth.BeltHold_2 or Showeleventh == Showeleventh.BeltHold_2 or ShowThelfth == ShowThelfth.BeltHold_2, 1, 0);

rec BeltHold_Trig_bear = If(BeltHold().bearish , BarNumber(), BeltHold_Trig_bear[1]);

AddLabel(BeltHold_Trig_bear > 0  && showLabel_BBr  && ThreeShows_102, "2=BeltHold" , CreateColor(255, 136, 12));

Alert(BeltHold().bearish && !TurnAlertOff_BBr, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_102 , high + 6 ,  if BubNumbBear

then "2" else if BubVerbBear then "BeltHold" else "" , CreateColor(255, 136, 12)  , yes);



#Breakaway_3,
###### 3 ####################### Breakaway() #############################
def ThreeShows_103 = If (ShowTenth == ShowTenth.Breakaway_3 or Showeleventh == Showeleventh.Breakaway_3 or ShowThelfth == ShowThelfth.Breakaway_3, 1, 0);

rec Breakaway_Trig_bear = If(Breakaway().bearish , BarNumber(), Breakaway_Trig_bear[1]);

AddLabel(Breakaway_Trig_bear > 0  && showLabel_BBr  && ThreeShows_103, "3=Breakaway" , CreateColor(255, 136, 12));

Alert(Breakaway().bearish && !TurnAlertOff_BBr, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_103 , high + 6 ,  if BubNumbBear

then "3" else if BubVerbBear then "Breakaway" else "" , CreateColor(255, 136, 12)  , yes);



#Doji_4,
###### 4 ####################### Doji() #############################
#def ThreeShows_104 = If (ShowTenth == ShowTenth.Doji_4 or Showeleventh == Showeleventh.Doji_4 or ShowThelfth == ShowThelfth.Doji_4, 1, 0);
#rec Doji_Trig = If(Doji(), BarNumber(), Doji_Trig[1]);
#AddLabel(Doji_Trig > 0  && showLabel_BBr  && ThreeShows_104, "4=Doji" , color.yellow);
#Alert(Doji() && !TurnAlertOff_BBr, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBear or BubNumbBear) && ThreeShows_104 , high + 6 ,  if BubNumbBear
#then "4" else if BubVerbBear then "Doji" else "" , color.yellow  , yes);



#Engulfing_5,
###### 5 ####################### Engulfing() #############################
def ThreeShows_105 = If (ShowTenth == ShowTenth.Engulfing_5 or Showeleventh == Showeleventh.Engulfing_5 or ShowThelfth == ShowThelfth.Engulfing_5, 1, 0);

rec Engulfing_Trig_bear = If(Engulfing().bearish , BarNumber(), Engulfing_Trig_bear[1]);

AddLabel(Engulfing_Trig_bear > 0  && showLabel_BBr  && ThreeShows_105, "5=Engulfing" , CreateColor(255, 136, 12));

Alert(Engulfing().bearish && !TurnAlertOff_BBr, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_105 , high + 6 ,  if BubNumbBear

then "5" else if BubVerbBear then "Engulfing" else "" , CreateColor(255, 136, 12)  , yes);  #10



#Harami_6,
###### 6 ####################### Harami() #############################
def ThreeShows_106 = If (ShowTenth == ShowTenth.Harami_6 or Showeleventh == Showeleventh.Harami_6 or ShowThelfth == ShowThelfth.Harami_6, 1, 0);

rec Harami_Trig_bear = If(Harami().bearish , BarNumber(), Harami_Trig_bear[1]);

AddLabel(Harami_Trig_bear > 0  && showLabel_BBr  && ThreeShows_106, "6=Harami" , CreateColor(255, 136, 12));

Alert(Harami().bearish && !TurnAlertOff_BBr, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_106 , high + 6 ,  if BubNumbBear

then "6" else if BubVerbBear then "Harami" else "" , CreateColor(255, 136, 12)  , yes);



#HaramiCross_7,
###### 7 ####################### HaramiCross() #############################
def ThreeShows_107 = If (ShowTenth == ShowTenth.HaramiCross_7 or Showeleventh == Showeleventh.HaramiCross_7 or ShowThelfth == ShowThelfth.HaramiCross_7, 1, 0);

rec HaramiCross_Trig_bear = If(HaramiCross().bearish , BarNumber(), HaramiCross_Trig_bear[1]);

AddLabel(HaramiCross_Trig_bear > 0  && showLabel_BBr  && ThreeShows_107, "7=HaramiCross" , CreateColor(255, 136, 12));

Alert(HaramiCross().bearish && !TurnAlertOff_BBr, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_107 , high + 6 ,  if BubNumbBear

then "7" else if BubVerbBear then "HaramiCross" else "" , CreateColor(255, 136, 12)  , yes);



#Kicking_8,
###### 8 ####################### BeltHold() #############################
def ThreeShows_108 = If (ShowTenth == ShowTenth.Kicking_8 or ShowEleventh == ShowEleventh.Kicking_8 or ShowThelfth == ShowThelfth.Kicking_8, 1, 0);

rec Kicking_Trig_bear = If(Kicking().bearish , BarNumber(), Kicking_Trig_bear[1]);

AddLabel(Kicking_Trig_bear > 0  && showLabel_BBr  && ThreeShows_108, "8=Kicking" , CreateColor(255, 136, 12));

Alert(Kicking().bearish && !TurnAlertOff_BBr, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_108 , high + 6 ,  if BubNumbBear

then "8" else if BubVerbBear then "Kicking" else "" , CreateColor(255, 136, 12)  , yes);



#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() #############################
def ThreeShows_109 = If (ShowTenth == ShowTenth.LongLeggedDoji_9 or ShowEleventh == ShowEleventh.LongLeggedDoji_9 or ShowThelfth == ShowThelfth.LongLeggedDoji_9, 1, 0);

rec LongLeggedDoji_Trig_bear = If(LongLeggedDoji().bearish , BarNumber(), LongLeggedDoji_Trig_bear[1]);

AddLabel(LongLeggedDoji_Trig_bear > 0  && showLabel_BBr  && ThreeShows_109, "9=LongLeggedDoji" , CreateColor(255, 136, 12));

Alert(LongLeggedDoji().bearish && !TurnAlertOff_BBr, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_109 , high + 6 ,  if BubNumbBear

then "9" else if BubVerbBear then "LongLeggedDoji" else "" , CreateColor(255, 136, 12)  , yes);



#Marubozu_10,
###### 10 ####################### Marubozu() #############################
def ThreeShows_10 = If (ShowTenth == ShowTenth.Marubozu_10 or ShowEleventh == ShowEleventh.Marubozu_10 or ShowThelfth == ShowThelfth.Marubozu_10, 1, 0);

rec Marubozu_Trig_bear = If(Marubozu().bearish , BarNumber(), Marubozu_Trig_bear[1]);

AddLabel(Marubozu_Trig_bear > 0  && showLabel_BBr  && ThreeShows_10, "10=Marubozu" , createColor(255, 255, 153));

Alert(Marubozu().bearish && !TurnAlertOff_BBr, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_10, high + 6 ,  if BubNumbBear

then "10" else if BubVerbBear then "Marubozu" else "" , createColor(255, 255, 153)  , yes);



#MeetingLines_11,
###### 11 ####################### MeetingLines() #############################
def ThreeShows_111 = If (ShowTenth == ShowTenth.MeetingLines_11 or ShowEleventh == ShowEleventh.MeetingLines_11 or ShowThelfth == ShowThelfth.MeetingLines_11, 1, 0);

rec MeetingLines_Trig_bear = If(MeetingLines().bearish , BarNumber(), MeetingLines_Trig_bear[1]);

AddLabel(MeetingLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_111, "11=MeetingLines" , CreateColor(255, 136, 12));

Alert(MeetingLines().bearish && !TurnAlertOff_BBr, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_111, high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "MeetingLines" else "" , CreateColor(255, 136, 12)  , yes);



#SeparatingLines_12,
###### 12 ####################### SeparatingLines() #############################
def ThreeShows_112 = If (ShowTenth == ShowTenth.SeparatingLines_12 or ShowEleventh == ShowEleventh.SeparatingLines_12 or ShowThelfth == ShowThelfth.SeparatingLines_12, 1, 0);

rec SeparatingLines_Trig_bear = If(SeparatingLines().bearish , BarNumber(), SeparatingLines_Trig_bear[1]);

AddLabel(SeparatingLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_112, "12=SeparatingLines" , createColor(255, 255, 153));

Alert(SeparatingLines().bearish && !TurnAlertOff_BBr, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_112,  high + 6 ,  if BubNumbBear

then "12" else if BubVerbBear then "SeparatingLines" else "" , createColor(255, 255, 153)  , yes);



#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() #############################
def ThreeShows_113 = If (ShowTenth == ShowTenth.SideBySideWhiteLines_13 or ShowEleventh == ShowEleventh.SideBySideWhiteLines_13 or ShowThelfth == ShowThelfth.SideBySideWhiteLines_13, 1, 0);

rec SideBySideWhiteLines_Trig_bear = If(SideBySideWhiteLines().bearish , BarNumber(), SideBySideWhiteLines_Trig_bear[1]);

AddLabel(SideBySideWhiteLines_Trig_bear > 0  && showLabel_BBr  && ThreeShows_113, "13=SideBySideWhiteLines" , createColor(255, 255, 153));

Alert(SideBySideWhiteLines().bearish && !TurnAlertOff_BBr, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_113, high + 6 ,  if BubNumbBear

then "13" else if BubVerbBear then "SideBySideWhiteLines" else "" , createColor(255, 255, 153)  , yes);



#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() #############################
def ThreeShows_114 = If (ShowTenth == ShowTenth.ThreeLineStrike_14 or ShowEleventh == ShowEleventh.ThreeLineStrike_14 or ShowThelfth == ShowThelfth.ThreeLineStrike_14, 1, 0);

rec ThreeOutsideUp_Trig_bear = If(ThreeLineStrike().bearish , BarNumber(), ThreeOutsideUp_Trig_bear[1]);

AddLabel(ThreeOutsideUp_Trig_bear > 0  && showLabel_BBr  && ThreeShows_114, "14=ThreeLineStrike" , createColor(255, 255, 153));

Alert(ThreeLineStrike().bearish && !TurnAlertOff_BBr, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_114, high + 6 ,  if BubNumbBear

then "14" else if BubVerbBear then "ThreeLineStrike" else "" , createColor(255, 255, 153)  , yes);



#TriStar_15,
###### 15 ####################### TriStar() #############################
def ThreeShows_115 = If (ShowTenth == ShowTenth.TriStar_15 or ShowEleventh == ShowEleventh.TriStar_15 or ShowThelfth == ShowThelfth.TriStar_15, 1, 0);

rec TriStar_Trig_bear = If(TriStar().bearish , BarNumber(), TriStar_Trig_bear[1]);

AddLabel(TriStar_Trig_bear > 0  && showLabel_BBr  && ThreeShows_115 , "15=TriStar" , CreateColor(255, 136, 12));

Alert(TriStar().bearish && !TurnAlertOff_BBr, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bearish && (BubVerbBear or BubNumbBear) && ThreeShows_115, high + 6 ,  if BubNumbBear

then "15" else if BubVerbBear then "TriStar" else "" , CreateColor(255, 136, 12)  , yes);



#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() #############################
#def ThreeShows_116 = If (ShowTenth == ShowTenth.WilliamsFractal_16 or ShowEleventh == ShowEleventh.WilliamsFractal_16 or ShowThelfth == ShowThelfth.WilliamsFractal_16, 1, 0);
#rec WilliamsFractal_Trig_downfractal = If(WilliamsFractal().downfractal , BarNumber(), WilliamsFractal_Trig_downfractal[1]);
#AddLabel(WilliamsFractal_Trig_downfractal > 0  && showLabel_BBr  && ThreeShows_116, "16=WilliamsFractal" , color.yellow);
#Alert(WilliamsFractal().downfractal && !TurnAlertOff_BBr, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().downfractal && (BubVerbBear or BubNumbBear) && ThreeShows_116, high + 6 ,  if BubNumbBear
#then "16" else if BubVerbBear then "WilliamsFractal" else "" , color.yellow  , no);



#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() #############################
#def ThreeShows_117 = If (ShowTenth == ShowTenth.ZigZagStepPattern_17 or ShowEleventh == ShowEleventh.ZigZagStepPattern_17 or ShowThelfth == ShowThelfth.ZigZagStepPattern_17, 1, 0);
#rec ZigZagStepPattern_Trig_downstep = If(ZigZagStepPattern().downstep , BarNumber(), ZigZagStepPattern_Trig_downstep[1]);
#AddLabel(ZigZagStepPattern_Trig_downstep > 0  && showLabel_BBr  && ThreeShows_117, "17=ZigZagStepPattern" , color.yellow);
#Alert(ZigZagStepPattern().downstep && !TurnAlertOff_BBr, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().downstep && (BubVerbBear or BubNumbBear) && ThreeShows_117 , high + 6 ,  if BubNumbBear
#then "17" else if BubVerbBear then "ZigZagStepPattern" else "" , color.yellow  , no);



#####################################################################################################
#Start Main Bottom Section

# AbandonedBaby_1,   
###### 1 ####################### AbandonedBaby() & showAll ################################# 10
def  candleAll_101 = If(ShowAll_BBr == yes , AbandonedBaby().bearish, Double.NaN);

plot AB_bearish = candleAll_101;

AB_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

AB_bearish.SetDefaultColor(CreateColor(255, 136, 12));

AB_bearish.SetLineWeight(5);

rec AbandonedBaby_Trig_101 = If (AbandonedBaby().bearish, + BarNumber(), AbandonedBaby_Trig_101[1] );

AddLabel(AbandonedBaby_Trig_101 > 0 && showLabel_BBr && ShowAll_BBr, "1=AbandonedBaby" , CreateColor(255, 136, 12));

Alert(AbandonedBaby().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "AbandonedBaby", Alert.BAR, Sound.Chimes);

AddChartBubble(AbandonedBaby().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "1" else if BubVerbBear then "AbandonedBaby" else "" ,  CreateColor(255, 136, 12) , yes);



#BeltHold_2,
###### 2 ####################### BeltHold() & showAll #################################
def  candleAll_102 = If(ShowAll_BBr == yes , BeltHold().bearish, Double.NaN);

plot BH_bearish = candleAll_102;

BH_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

BH_bearish.SetDefaultColor(CreateColor(255, 136, 12));

BH_bearish.SetLineWeight(5);

rec BeltHold_Trig_102 = If (BeltHold().bearish, + BarNumber(), BeltHold_Trig_102[1] );

AddLabel(BeltHold_Trig_102 > 0 && showLabel_BBr && ShowAll_BBr, "2=BeltHold" , CreateColor(255, 136, 12));

Alert(BeltHold().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "BeltHold", Alert.BAR, Sound.Chimes);

AddChartBubble(BeltHold().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "2" else if BubVerbBear then "BeltHold" else "" ,  CreateColor(255, 136, 12) , yes);



# Breakaway_3, 
###### 3 ####################### Breakaway() & showAll #################################
def  candleAll_103 = If(ShowAll_BBr == yes , Breakaway().bearish, Double.NaN);

plot BAWAY_bearish = candleAll_103;

BAWAY_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

BAWAY_bearish.SetDefaultColor(CreateColor(255, 136, 12));

BAWAY_bearish.SetLineWeight(5);

rec Breakaway_Trig_103 = If (Breakaway().bearish, + BarNumber(), Breakaway_Trig_103[1] );

AddLabel(Breakaway_Trig_103 > 0 && showLabel_BBr && ShowAll_BBr, "3=Breakaway" , CreateColor(255, 136, 12));

Alert(Breakaway().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Breakaway", Alert.BAR, Sound.Chimes);

AddChartBubble(Breakaway().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "3" else if BubVerbBear then "Breakaway" else "" ,  CreateColor(255, 136, 12) , yes);


#######if you want to take out or add the dojis, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.

#Doji_4,
###### 4 ####################### Doji() & showAll #################################
#def  candleAll_104 = If(ShowAll_BBr == yes , Doji(), Double.NaN);
#plot DOJI = candleAll_104;
#DOJI.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#DOJI.SetDefaultColor(Color.YELLOW);
#DOJI.SetLineWeight(5);
#rec DOJI_Trig_104 = If (Doji(), + BarNumber(), DOJI_Trig_104[1] );
#AddLabel(DOJI_Trig_104 > 0 && showLabel_BBr && ShowAll_BBr, "4=Doji" , Color.YELLOW);
#Alert(Doji()  && !TurnAlertOff_BBr && ShowAll_BBr, "Doji", Alert.BAR, Sound.Chimes);
#AddChartBubble(Doji() && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "4" else if BubVerbBear then "Doji" else "" ,  Color.YELLOW , yes);



#Engulfing_5,
###### 5 ####################### Engulfing() & showAll #################################
def  candleAll_105 = If(ShowAll_BBr == yes , Engulfing().bearish, Double.NaN);

plot Engulfing_bearish = candleAll_105;

Engulfing_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Engulfing_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Engulfing_bearish.SetLineWeight(5);

rec Engulfing_Trig_105 = If (Engulfing().bearish, + BarNumber(), Engulfing_Trig_105 [1] );

AddLabel(Engulfing_Trig_105 > 0 && showLabel_BBr && ShowAll_BBr, "5=Engulfing" , CreateColor(255, 136, 12));

Alert(Engulfing().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Engulfing", Alert.BAR, Sound.Chimes);

AddChartBubble(Engulfing().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "5" else if BubVerbBear then "Engulfing" else "" ,  CreateColor(255, 136, 12) , yes);


#Harami_6,
###### 6 ####################### Harami() & showAll #################################
def  candleAll_106 = If(ShowAll_BBr == yes , Harami().bearish, Double.NaN);

plot Harami_bearish = candleAll_106;

Harami_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Harami_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Harami_bearish.SetLineWeight(5);

rec Harami_Trig_106 = If (Harami().bearish, + BarNumber(), Harami_Trig_106[1] );

AddLabel(Harami_Trig_106 > 0 && showLabel_BBr && ShowAll_BBr, "6=Harami" , CreateColor(255, 136, 12));

Alert(Harami().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Harami", Alert.BAR, Sound.Chimes);

AddChartBubble(Harami().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "6" else if BubVerbBear then "Harami" else "" ,  CreateColor(255, 136, 12) , yes);



#HaramiCross_7,
###### 7 ####################### HaramiCross() & showAll #################################
def  candleAll_107 = If(ShowAll_BBr == yes , HaramiCross().bearish, Double.NaN);

plot HaramiCross_bearish = candleAll_107;

HaramiCross_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN); # bearish

HaramiCross_bearish.SetDefaultColor(CreateColor(255, 136, 12));

HaramiCross_bearish.SetLineWeight(5);

rec HaramiCross_Trig_107 = If (HaramiCross().bearish, + BarNumber(), HaramiCross_Trig_107[1] );

AddLabel(HaramiCross_Trig_107 > 0 && showLabel_BBr && ShowAll_BBr, "7=HaramiCross" , CreateColor(255, 136, 12));

Alert(HaramiCross().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "HaramiCross", Alert.BAR, Sound.Chimes);

AddChartBubble(HaramiCross().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "7" else if BubVerbBear then "HaramiCross" else "" ,  CreateColor(255, 136, 12) , yes);


#Kicking_8,
###### 8 ####################### Kicking() & showAll #################################
def  candleAll_108 = If(ShowAll_BBr == yes , Kicking().bearish, Double.NaN);

plot Kicking_bearish = candleAll_108;

Kicking_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Kicking_bearish.SetDefaultColor(CreateColor(255, 136, 12));

Kicking_bearish.SetLineWeight(5);

rec Kicking_Trig_108 = If (Kicking().bearish, + BarNumber(), Kicking_Trig_108[1] );

AddLabel(Kicking_Trig_108 > 0 && showLabel_BBr && ShowAll_BBr, "8=Kicking" , CreateColor(255, 136, 12));

Alert(Kicking().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Kicking", Alert.BAR, Sound.Chimes);

AddChartBubble(Kicking().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "8" else if BubVerbBear then "Kicking" else "" ,  CreateColor(255, 136, 12) , yes);


#LongLeggedDoji_9,
###### 9 ####################### LongLeggedDoji() & showAll #################################
def  candleAll_109 = If(ShowAll_BBr == yes , LongLeggedDoji().bearish, Double.NaN);

plot LongLeggedDoji_bearish = candleAll_109;

LongLeggedDoji_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

LongLeggedDoji_bearish.SetDefaultColor(CreateColor(255, 136, 12));

LongLeggedDoji_bearish.SetLineWeight(5);

rec LongLeggedDoji_Trig_109 = If (LongLeggedDoji().bearish, + BarNumber(), LongLeggedDoji_Trig_109[1] );

AddLabel(LongLeggedDoji_Trig_109 > 0 && showLabel_BBr && ShowAll_BBr, "9=LongLeggedDoji" , CreateColor(255, 136, 12));

Alert(LongLeggedDoji().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "LongLeggedDoji", Alert.BAR, Sound.Chimes);

AddChartBubble(LongLeggedDoji().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "9" else if BubVerbBear then "LongLeggedDoji" else "" ,  CreateColor(255, 136, 12) , yes);


#Marubozu_10,
###### 10 ####################### Marubozu() & showAll #################################
def  candleAll_110 = If(ShowAll_BBr == yes , Marubozu().bearish, Double.NaN);

plot Marubozu_bearish = candleAll_110;

Marubozu_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

Marubozu_bearish.SetDefaultColor(createColor(255, 255, 153));

Marubozu_bearish.SetLineWeight(5);

rec Marubozu_Trig_110 = If (Marubozu().bearish, + BarNumber(), Marubozu_Trig_110[1] );

AddLabel(Marubozu_Trig_110 > 0 && showLabel_BBr && ShowAll_BBr, "10=Marubozu" , createColor(255, 255, 153));

Alert(Marubozu().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "Marubozu", Alert.BAR, Sound.Chimes);

AddChartBubble(Marubozu().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "10" else if BubVerbBear then "Marubozu" else "" ,  createColor(255, 255, 153) , yes);


#MeetingLines_11,
###### 11 ####################### MeetingLines() & showAll #################################
def  candleAll_111 = If(ShowAll_BBr == yes , MeetingLines().bearish, Double.NaN);

plot MeetingLines_bearish = candleAll_111;

MeetingLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

MeetingLines_bearish.SetDefaultColor(CreateColor(255, 136, 12));

MeetingLines_bearish.SetLineWeight(5);

rec MeetingLines_Trig_111 = If (MeetingLines().bearish, + BarNumber(), MeetingLines_Trig_111[1] );

AddLabel(MeetingLines_Trig_111 > 0 && showLabel_BBr && ShowAll_BBr, "11=MeetingLines" , CreateColor(255, 136, 12));

Alert(MeetingLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "MeetingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(MeetingLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "11" else if BubVerbBear then "MeetingLines" else "" ,  CreateColor(255, 136, 12) , yes);


#SeparatingLines_12,
###### 12 ####################### SeparatingLines() & showAll #################################
def  candleAll_112 = If(ShowAll_BBr == yes , SeparatingLines().bearish, Double.NaN);

plot SeparatingLines_bearish = candleAll_112;

SeparatingLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SeparatingLines_bearish.SetDefaultColor(createColor(255, 255, 153));

SeparatingLines_bearish.SetLineWeight(5);

rec SeparatingLines_Trig_112 = If (SeparatingLines().bearish, + BarNumber(), SeparatingLines_Trig_112[1] );

AddLabel(SeparatingLines_Trig_112 > 0 && showLabel_BBr && ShowAll_BBr, "12=SeparatingLines" , createColor(255, 255, 153));

Alert(SeparatingLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "SeparatingLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SeparatingLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "12" else if BubVerbBear then "SeparatingLines" else "" ,  createColor(255, 255, 153) , yes);


#SideBySideWhiteLines_13,
###### 13 ####################### SideBySideWhiteLines() & showAll #################################
def  candleAll_113 = If(ShowAll_BBr == yes , SideBySideWhiteLines().bearish, Double.NaN);

plot SideBySideWhiteLines_bearish = candleAll_113;

SideBySideWhiteLines_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

SideBySideWhiteLines_bearish.SetDefaultColor(createColor(255, 255, 153));

SideBySideWhiteLines_bearish.SetLineWeight(5);

rec SideBySideWhiteLines_Trig_113 = If (SideBySideWhiteLines().bearish, + BarNumber(), SideBySideWhiteLines_Trig_113[1] );

AddLabel(SideBySideWhiteLines_Trig_113 > 0 && showLabel_BBr && ShowAll_BBr, "13=SideBySideWhiteLines" , createColor(255, 255, 153));

Alert(SideBySideWhiteLines().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "SideBySideWhiteLines", Alert.BAR, Sound.Chimes);

AddChartBubble(SideBySideWhiteLines().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "13" else if BubVerbBear then "SideBySideWhiteLines" else "" ,  createColor(255, 255, 153) , yes);


#ThreeLineStrike_14,
###### 14 ####################### ThreeLineStrike() & showAll #################################
def  candleAll_114 = If(ShowAll_BBr == yes , ThreeLineStrike().bearish, Double.NaN);

plot ThreeLineStrike_bearish = candleAll_114;

ThreeLineStrike_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

ThreeLineStrike_bearish.SetDefaultColor(createColor(255, 255, 153));

ThreeLineStrike_bearish.SetLineWeight(5);

rec ThreeLineStrike_Trig_114 = If (ThreeLineStrike().bearish, + BarNumber(), ThreeLineStrike_Trig_114[1] );

AddLabel(ThreeLineStrike_Trig_114 > 0 && showLabel_BBr && ShowAll_BBr, "14=ThreeLineStrike" , createColor(255, 255, 153));

Alert(ThreeLineStrike().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "ThreeLineStrike", Alert.BAR, Sound.Chimes);

AddChartBubble(ThreeLineStrike().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "14" else if BubVerbBear then "ThreeLineStrike" else "" ,  createColor(255, 255, 153) , yes);


#TriStar_15,
###### 15 ####################### TriStar() & showAll #################################
def  candleAll_115 = If(ShowAll_BBr == yes , TriStar().bearish, Double.NaN);

plot TriStar_bearish = candleAll_115;

TriStar_bearish.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);

TriStar_bearish.SetDefaultColor(CreateColor(255, 136, 12));

TriStar_bearish.SetLineWeight(5);

rec TriStar_Trig_115 = If (TriStar().bearish, + BarNumber(), TriStar_Trig_115[1] );

AddLabel(TriStar_Trig_115 > 0 && showLabel_BBr && ShowAll_BBr, "15=TriStar" , CreateColor(255, 136, 12));

Alert(TriStar().bearish  && !TurnAlertOff_BBr && ShowAll_BBr, "TriStar", Alert.BAR, Sound.Chimes);

AddChartBubble(TriStar().bearish && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear

then "15" else if BubVerbBear then "TriStar" else "" ,  CreateColor(255, 136, 12) , yes);

#######if you want to take out or add the WilliamsFractal, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.
#WilliamsFractal_16,
###### 16 ####################### WilliamsFractal() & showAll #################################
#def  candleAll_116 = If(ShowAll_BBr == yes , WilliamsFractal().downfractal, Double.NaN);
#plot WilliamsFractal = candleAll_116;
#WilliamsFractal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#WilliamsFractal.SetDefaultColor(CreateColor(255, 136, 12));
#WilliamsFractal.SetLineWeight(5);
#rec WilliamsFractal_Trig_116 = If (WilliamsFractal().DownFractal, + BarNumber(), WilliamsFractal_Trig_116[1] );
#AddLabel(WilliamsFractal_Trig_116 is true && showLabel_BBr && ShowAll_BBr, "16=WilliamsFractal" , Color.YELLOW); # changed > 0 to is true
#Alert(WilliamsFractal().DownFractal  && !TurnAlertOff_BBr && ShowAll_BBr, "WilliamsFractal", Alert.BAR, Sound.Chimes);
#AddChartBubble(WilliamsFractal().DownFractal && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "16" else if BubVerbBear then "WilliamsFractal" else "" ,  Color.YELLOW , yes);

#######if you want to take out or add the ZigZagStepPattern, just hit return between the  first word and the # so you dont have to keep deleting and adding #'s when you change your mind.

#ZigZagStepPattern_17,
###### 17 ####################### ZigZagStepPattern() & showAll #################################
#def  candleAll_117 = If(ShowAll_BBr == yes , ZigZagStepPattern().downstep, Double.NaN);
#plot ZigZagStepPattern = candleAll_117;
#ZigZagStepPattern.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#ZigZagStepPattern.SetDefaultColor(CreateColor(255, 136, 12));
#ZigZagStepPattern.SetLineWeight(5);
#rec ZigZagStepPattern_Trig_117 = If (ZigZagStepPattern().upstep, + BarNumber(), ZigZagStepPattern_Trig_117[1]);
#AddLabel(ZigZagStepPattern_Trig_117 is true && showLabel_BBr && ShowAll_BBr, "17=ZigZagStepPattern" , Color.YELLOW); # changed > 0 to is true
#Alert(ZigZagStepPattern().downstep  && !TurnAlertOff_BBr && ShowAll_BBr, "ZigZagStepPattern", Alert.BAR, Sound.Chimes);
#AddChartBubble(ZigZagStepPattern().downstep && (BubVerbBear or BubNumbBear) && (ShowAll_BBr) , high + 6 ,  if BubNumbBear
#then "17" else if BubVerbBear then "ZigZagStepPattern" else "" ,  Color.YELLOW , yes);

Here is all 4 study patterns verbose:
XsBYuro.png


Here is all 4 study patterns ID #:
PBgLBOO.png

is there a way to move the titles closer to the arrows?

https://ibb.co/thcfx58
 
is there a way to move the titles closer to the arrows?

https://ibb.co/thcfx58
I am having this same issue. I am enjoying using this study as a learning and research tool.

But the bubbles are sooo far down that I can't both see the bubbles and have the candlesticks at the proper size for meaningful interpretation.

Any idea how to move the bubbles right up underneath the candlesticks?

EDIT: interestingly, this issue only seems to happen on certain stocks, and not others. Why might this be?
 
is there a way to move the titles closer to the arrows?

https://ibb.co/thcfx58
I am having this same issue. I am enjoying using this study as a learning and research tool.

But the bubbles are sooo far down that I can't both see the bubbles and have the candlesticks at the proper size for meaningful interpretation.

Any idea how to move the bubbles right up underneath the candlesticks?

EDIT: interestingly, this issue only seems to happen on certain stocks, and not others. Why might this be?
Not totally sure what your questions are, but does this help?
https://usethinkscript.com/threads/addchartbubble-tutorial-for-thinkorswim.10297/
 
Is it possible to make this as a lower indicator that shows when there is a bullish (or bearish) candlestick pattern. Like a dot or something, or a ribbon that shows a different color when they occur like green dots for bullish and red dots for bearish. I see this as a trigger to enter when other indicators already show a directional bias. Such as- all your indicators say market looks bullish, then get a bullish candlestick payyern as the trigger. Any assistance is appreciated
 
Is it possible to make this as a lower indicator that shows when there is a bullish (or bearish) candlestick pattern. Like a dot or something, or a ribbon that shows a different color when they occur like green dots for bullish and red dots for bearish. I see this as a trigger to enter when other indicators already show a directional bias. Such as- all your indicators say market looks bullish, then get a bullish candlestick payyern as the trigger. Any assistance is appreciated
I attempted such a thing once. It was ugly and not successful.
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
380 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top