Potential Breakout Arrow Plots Indicator for ThinkorSwim

What should I focus on making next

  • an exit indicator

    Votes: 37 39.4%
  • improving signals

    Votes: 39 41.5%
  • making new signals

    Votes: 10 10.6%
  • a sell calls plot

    Votes: 8 8.5%

  • Total voters
    94
@YungTraderFromMontana are you using it as part of a call/put strategy?
Personally yes but it can be used however you like. It just fits the risk/reward of weekly options because of its short term accuracy. Short term accuracy is especially valuable with options because it maximizes delta with minimum theta loss. Therefore even accounting for failed signals the risk of losing premium on otm options is worth the multiple times it will make 250%+. It is just important you trade with multiple options at once in consistent trade sizes diversified put/call against general market direction.
 
@TrueDepth The atr is qs[1] and qb[1]. I'm not even sure if that is the true terminology but it looks similar to other atr's I've seen. I used chaiken vol. to eliminate moves that were insignificant to warrant a signal. It is more accurate then terminating signals if the candle size is to small because it weighs the overall volatlity. It just seemed to work. The biggest factor is if the high or close, depending on what arrow, crosses the qb[1].

--------------
def QB = Highest(high, BuyEntry);
def QS = Lowest(low, SellEntry);
-------------------------
It looks to me like qb and qs are not ATR. qb and qs are showing as highest high of the last x bars, or the lowest low of the last x bars. ATR stands for Average True Range and has a different formula.

Primarily it looks like the study is giving an Arrow when the current bar close is higher than the previous 3 bars and some other stuff.

The reason I am asking is because the "comboupstrongstrongstrong" and "comboupstrongstrong" plots work, but I don't understand how ATR is factored in. Did you write this code or get it from another study?

---------------------------------------------------
plot comboupstrongstrongstrong = (high > qb[1]) and (c[1] < qb[2]) and (((high - qb[1])/100) < outo) and (((qb[1] - Avgexp)/100) < conso) and (low < midline[1]);
-----------------------------------------------------
 
--------------
def QB = Highest(high, BuyEntry);
def QS = Lowest(low, SellEntry);
-------------------------
It looks to me like qb and qs are not ATR. qb and qs are showing as highest high of the last x bars, or the lowest low of the last x bars. ATR stands for Average True Range and has a different formula.

Primarily it looks like the study is giving an Arrow when the current bar close is higher than the previous 3 bars and some other stuff.

The reason I am asking is because the "comboupstrongstrongstrong" and "comboupstrongstrong" plots work, but I don't understand how ATR is factored in. Did you write this code or get it from another study?

---------------------------------------------------
plot comboupstrongstrongstrong = (high > qb[1]) and (c[1] < qb[2]) and (((high - qb[1])/100) < outo) and (((qb[1] - Avgexp)/100) < conso) and (low < midline[1]);
-----------------------------------------------------
You are right. I used the qb and qs from the topbreakout strategy and added conditions. I realized it wasn't an atr after someone commented that it couldn't be.
 
Yung Trader thanks for the script truly amazing. Is it possible to insert a swing high/lo script edited by Tomask where the absolute top/bottom bars are identified and colored as magenta/ cyan. https://tos.mx/SUgr2bw
Well I maybe over thinking this runs as a stand alone and compliments your study as is really.

rums3OX.png
 
Last edited by a moderator:
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 BuyEntry = 3;
input SellEntry = 3;

plot QB = Highest(high, BuyEntry);
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);
 
Yung Trader thanks for the script truly amazing. Is it possible to insert a swing high/lo script edited by Tomask where the absolute top/bottom bars are identified and colored as magenta/ cyan. https://tos.mx/SUgr2bw
Well I maybe over thinking this runs as a stand alone and compliments your study as is really.

rums3OX.png
What d you mean by insert it other then overlaying it? I agree it does work well together.
 
Yung Trader thanks for the script truly amazing. Is it possible to insert a swing high/lo script edited by Tomask where the absolute top/bottom bars are identified and colored as magenta/ cyan. https://tos.mx/SUgr2bw
Well I maybe over thinking this runs as a stand alone and compliments your study as is really.

rums3OX.png
I made it plot a large green arrow if a cyan bar was printed either in the current, current[1], or current[2] bars.
https://tos.mx/YDxyL1x
great suggestion
 
The only option I am not finding is to change line type and color for the hi/lo piots
 
They lag but the green arrows don't so lag isn't a factor in most scenarios. The only time there would be an issue is when a previous purple bar disappears with a green arrow proceeding it. This will not happen often.

If I get what you're saying change the color of the qb, qs, or midline plots. If you want to change the colored candles on the study you suggested integrating go to the last line of code and manually change the colors in this line (AssignPriceColor(if swingLow then Color.cyan else if swingHigh then Color.mageNTA else Color.current);
 
It is to complex to scan because of the addition of the new study, I'll try to do a workaround tomorrow

Yes they do, that's is why you can use the green to confirm. If the purple and cyan signals didn't repaint it would be an impossibly perfect indicator. If you want to see exactly how it reacts real time, go to any futures ticker and make the chart a 30 tick chart. Candles will paint quickly and therefore you can see how It functions real time.
 
@YungTraderFromMontana
Very interesting indicator! I wonder though - Why did you remove the exit/sell signals? I see in this post the script includes them but in your most recent they do not!

Will test this tomorrow side-by-side with a trend painter to get an idea of exits.

Thanks for your hard work!
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
289 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