Bollinger Band Breakout Scan Code (Up and Down) 1) I use 21 period, which is 1mo on daily. You may prefere to use 20period and it is not a very hard adjustment 2) I use 2.0 standard deviations in calculating the bollinger bands (some folks prefer 1.5 or whatever). Again, not a terribly hard adjustment to make 3) IF you need adjustments, let me know. I will stick to my version vanilla here to avoid confusing anyone. -------------------------------------------------------------------------------------------------------------------------------------------------------- Bollinger Band Breakout to Upside TC2000: C1 <= AVGC21.1 + 2 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 21 * AVGC21.1 ^ 2) / 21) AND C > AVGC21 + 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 - 21 * AVGC21 ^ 2) / 21) TOS: #Many thanks to Hugh Bryant for help #Ed Carter def c = close; input n = 21; #hint n is the number of periods for the Moving Average input SdMult = 2.000; #hint SdMult is the multiplier for the Standard Deviation Bands def SD = StDev(c, n); def Avg = Average(c, n); def BBupper = Avg + (SdMult * SD); def bbUpperBO = c[1] <= BBupper and c > BBupper; plot scan = bbUpperBO; ---------------------------------------------------------------------------------------------------------------------------------------------------------- Bollinger Band Breakout to Downside TC2000: C1 >= AVGC21.1 - 2 * SQR(ABS(C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 + C21 ^ 2 - 21 * AVGC21.1 ^ 2) / 21) AND C < AVGC21 - 2 * SQR(ABS(C ^ 2 + C1 ^ 2 + C2 ^ 2 + C3 ^ 2 + C4 ^ 2 + C5 ^ 2 + C6 ^ 2 + C7 ^ 2 + C8 ^ 2 + C9 ^ 2 + C10 ^ 2 + C11 ^ 2 + C12 ^ 2 + C13 ^ 2 + C14 ^ 2 + C15 ^ 2 + C16 ^ 2 + C17 ^ 2 + C18 ^ 2 + C19 ^ 2 + C20 ^ 2 - 21 * AVGC21 ^ 2) / 21) TOS: #Many thanks to Hugh Bryant for help #Ed Carter def c = close; input n = 21; #hint n is the number of periods for the Moving Average input SdMult = 2.000; #hint SdMult is the multiplier for the Standard Deviation Bands def SD = StDev(c, n); def Avg = Average(c, n); def BBlower = Avg - (SdMult * SD); def bbLowerBO = c[1] >= BBlower and c < BBlower; plot scan = bbLowerBO;