# Potential Breakout Arrow Plots Indicator for ThinkorSwim

## What should I focus on making next

• ### a sell calls plot

• Total voters
28

#### J007RMC

##### Active member
2019 Donor
Warehouse
VIP
Looked at this rather confusing script to better see what is being used. Removed a lot of unused code. Made one change to the original script code by removing plot b = QS[1] and plot x = QS[1] and just plotting QS and QB.
Code:
``````input conso = .02;
input outo = .01;
input coc = close;
input linRegLength = 21;
input smLength = 3;
input displace2 = 0;

def value = Average(Inertia(coc[-displace2], linRegLength), smLength);
def error = Average(sterr(coc[-displace2], linRegLength), smLength);
def MiddleLine = value;
def total = if close < open then (high + 2 * low + close) / 2 else if close > open then (2 * high + low + close) / 2 else (high + low + 2 * close) / 2;
def UpperPr = total[1] - low[1];
def LowerPr = total[1] - high[1];

def price = close;
def length4 = 10;
def displace = 0;
def AvgExp = ExpAverage(price[-displace], length4);
def length6 = 48.5;
def AvgExp2 = ExpAverage(price[-displace], length6);
def c = close;

def length2 = 30;
def calclength2 = 5;
def smoothlength2 = 3;
input agg = AggregationPeriod.DAY;

def o10 = open(period = agg);
def c10 = close(period = agg);
def data = fold i = 0 to length2
with s
do s + (if c10 > GetValue(o10, i)
then 1
else if c10 < GetValue(o10, i)
then - 1
else 0);
def EMA5 = ExpAverage(data, calclength2);
def Main = ExpAverage(EMA5, smoothLength2);
def Signal = ExpAverage(Main, smoothLength2);

def  ob3 = if IsNaN(c10) then Double.NaN else Round(length2 * .7);

input SellEntry = 3;

plot QS = Lowest(low, SellEntry);

plot midline = (qs[1]+qb[1])/2;

plot differencechange = ((main-signal) < 1) and ((main - signal) > -1)  and (main < ob3);

plot comboupstrongstrongstrong = (close > qb[1]) and (c[1] < qb[2]) and (((open - qb[1])/100) < outo) and (((qb[1] - Avgexp)/100) < conso) and (close < midline[1]);

plot comboupstrongstrong = (close > qb[1]) and (c[1] < qb[2]) and (((open - qb[1])/100) < outo) and (((qb[1] - Avgexp)/100) < conso) and (open[1] or open[2] or open[3] < midline) and comboupstrongstrongstrong is false and (open < qb[1]) and (open[1] > Qs[2]) and (close[1] < midline[2]);

plot comboupstrong = (close > qb[1]) and (close[1] < qb[2]) and (((open - qb[1])/100) < outo) and (((qb[1] - Avgexp)/100) < conso)  and comboupstrongstrongstrong is false and comboupstrongstrong is false and (close > open) and (low < middleline) and (close > open);

plot midcrossgapup = (((open < midline) and ((close > midline)) or ((close[1] < midline[2])) and (open > midline[1]))) and (close > open) and (differencechange) and (close[1] < qb[2]) and (close > upperpr);

plot combodown = (qs[1] > qs[2]) and (close < qs[1]) and (c[1] > qs[2]) and (((qs[1] - open)/100) < outo) and (((Avgexp - qs[1])/100) < conso);
plot midcrossgapdown = (((open > midline) and ((close < midline)) or ((close[1] > midline[2])) and (open < midline[1]))) and (close < open) and (close[1] > qs[2]) and (close < lowerpr);

plot sellputs = (lowerpr < QS);``````

M

#### mini

##### New member
Just open the study and uncheck the low 1-10 and high 1-10 selections
Thank you!

##### Active member
Wednesday night I will release a watchlist to test this. It will be stocks that scanned as breaking out as well as considering other ta. After they all receive sell signals I'll check back in. It could be 1-2 weeks out. Unfortunately it is a weird market environment to test a buy side indicator in but hopefully it should still prevail.

P

#### Playstation

##### Active member
VIP
this has proven to be one of your best work.

##### Active member
@Playstation Thanks. I'm working on this now and I would say its better in many cases. I'm making a hybrid of them soon. I will also be able to get rid of some of the false signals with a little bit of work. https://tos.mx/0jN6R1H

W

#### wnozick

##### New member
@Playstation Thanks. I'm working on this now and I would say its better in many cases. I'm making a hybrid of them soon. I will also be able to get rid of some of the false signals with a little bit of work. https://tos.mx/0jN6R1H
Looking forward to it! Going to try this one next week.

T

#### TrueDepth

##### Member
Here is the code for the Arrows, so you don't have to keep sharing your entire chart.

#_____________________________________________________________________________________
comboupstrongstrongstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrongstrongstrong.setdefaultColor(createcolor(255,255,255));
comboupstrongstrongstrong.SetLineWeight(5);
comboupstrongstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrongstrong.setdefaultColor(createcolor(255,255,255));
comboupstrongstrong.SetLineWeight(2);
midcrossgapup.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
midcrossgapup.setdefaultColor(createcolor(72,71,135));
midcrossgapup.SetLineWeight(1);
midcrossgapdown.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_DOWN);
midcrossgapdown.setdefaultColor(createcolor(72,71,135));
midcrossgapdown.SetLineWeight(1);
comboupstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrong.setdefaultColor(createcolor(230,190,0));
comboupstrong.SetLineWeight(1);
goodsetup.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
goodsetup.setdefaultColor(createcolor(255,126,0));
goodsetup.SetLineWeight(5);
#____________________________________________________________________________________

##### Active member
Here is the code for the Arrows, so you don't have to keep sharing your entire chart.

#_____________________________________________________________________________________
comboupstrongstrongstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrongstrongstrong.setdefaultColor(createcolor(255,255,255));
comboupstrongstrongstrong.SetLineWeight(5);
comboupstrongstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrongstrong.setdefaultColor(createcolor(255,255,255));
comboupstrongstrong.SetLineWeight(2);
midcrossgapup.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
midcrossgapup.setdefaultColor(createcolor(72,71,135));
midcrossgapup.SetLineWeight(1);
midcrossgapdown.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_DOWN);
midcrossgapdown.setdefaultColor(createcolor(72,71,135));
midcrossgapdown.SetLineWeight(1);
comboupstrong.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
comboupstrong.setdefaultColor(createcolor(230,190,0));
comboupstrong.SetLineWeight(1);
goodsetup.setPaintingStrategy(paintingstrategy.BOOLEAN_ARROW_UP);
goodsetup.setdefaultColor(createcolor(255,126,0));
goodsetup.SetLineWeight(5);
#____________________________________________________________________________________
Thanks except the chart I shared was plotting using a different indicator. I'll add this to the breakout arrow code.

T

#### TrueDepth

##### Member
Oh, I didn't know the other indicators were important.