Potential Breakout Arrow Plots Indicator for ThinkorSwim

  • Thread starter YungTraderFromMontana
  • Start date

What should I focus on making next

  • an exit indicator

    Votes: 15 53.6%
  • improving signals

    Votes: 10 35.7%
  • making new signals

    Votes: 2 7.1%
  • a sell calls plot

    Votes: 1 3.6%

  • Total voters
    28
YungTraderFromMontana

YungTraderFromMontana

Active member
@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.
 
YungTraderFromMontana

YungTraderFromMontana

Active member
A little callout for anyone interested. Junior gold miners are all over the scan for tomorrow. Names like jnug will skyrocket.
Here is the scan I used http://tos.mx/GQwXZQm
 
T

TrueDepth

Member
@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]);
-----------------------------------------------------
 
horserider

horserider

Well-known member
VIP
TrueDepth is correct. No ATR is used. It is defined but never used in any calculation.
 
YungTraderFromMontana

YungTraderFromMontana

Active member
--------------
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.
 
J007RMC

J007RMC

Active member
2019 Donor
Warehouse
VIP
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.

 
Last edited by a moderator:
horserider

horserider

Well-known member
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 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);
 
J007RMC

J007RMC

Active member
2019 Donor
Warehouse
VIP
Very nice thank you
 
Last edited:
YungTraderFromMontana

YungTraderFromMontana

Active member
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.

What d you mean by insert it other then overlaying it? I agree it does work well together.
 
YungTraderFromMontana

YungTraderFromMontana

Active member
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.

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
 
J007RMC

J007RMC

Active member
2019 Donor
Warehouse
VIP
The only option I am not finding is to change line type and color for the hi/lo piots
 
YungTraderFromMontana

YungTraderFromMontana

Active member
can we get the scan for the code above? Also, looking at other stocks, it looks like works well with fang tickers
Also, do the purple bars lag or do they show real time? because if they do, it's almost like a perfect setup every time
@YungTraderFromMontana

https://tos.mx/YDxyL1x
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.
 
YungTraderFromMontana

YungTraderFromMontana

Active member
The only option I am not finding is to change line type and color for the hi/lo piots
The only option I am not finding is to change line type and color for the hi/lo piots
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);[/QUOTE]
 
YungTraderFromMontana

YungTraderFromMontana

Active member
can we get the scan for the code above? Also, looking at other stocks, it looks like works well with fang tickers
Also, do the purple bars lag or do they show real time? because if they do, it's almost like a perfect setup every time
@YungTraderFromMontana

https://tos.mx/YDxyL1x
It is to complex to scan because of the addition of the new study, I'll try to do a workaround tomorrow
 
YungTraderFromMontana

YungTraderFromMontana

Active member
looks like the purple and cyan signals on the 10 min re-paint
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.
 
J007RMC

J007RMC

Active member
2019 Donor
Warehouse
VIP
please disregard my first post I got it , tired
 
W

wnozick

New member
@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:
BenTen

BenTen

Administrative
Staff
VIP
@YungTraderFromMontana Please mention in your original thread which part of the indicator will repaint. That way our members are noted before they use the indicator.
 

Top