IBD Style Chart and Scan

markos

markos

Well-known member
VIP
Thank you everyone!!! You guys are awesome!!!
Hey @Nick if you look at the chart I posted in the beginning, I also use this chart for marking my bot and sold prices.
That is a checkbox in settings on first tab or Equity tab. Hopefully your version has that. Just going from memory, but thought you'd want to know.
 
N

Nick

Member
2019 Donor
VIP
Hey @Nick if you look at the chart I posted in the beginning, I also use this chart for marking my bot and sold prices.
That is a checkbox in settings on first tab or Equity tab. Hopefully your version has that. Just going from memory, but thought you'd want to know.
Thanks @markos, i believe it is the "show trades"that you are referring. Thanks.
 
markos

markos

Well-known member
VIP
We have visitors on this site from around the globe!
If you are having trouble opening and downloading the Excel and Word Documents from the shared drive below, it could be your country or your ISP:

 
A

arthurx

New member
Here is a more accurate way to calculate the IBD Relative Price Strength but I don't know how to write the code.
(((2*(c/c63)+(c/c126)+(c/189)+(c/252))/4)
I probably don't have the parenthesis set up correctly?
This code would give a more accurate representation of the RPS do to it being "weighted" in the first variable "(2*(c/63))"
Thanks for your help in coding this RPS formula.
 
A

arthurx

New member
Another way to represent the current RPS would be to calculate the RPS from the day of a significant low on the SPX.
The two most recent major lows on the SPX were on 6/3/19 and 12/24/18.
What is the code to calculate how many "market days" ago these major lows occurred?
Here is a webpage that will calculate the number of business days between two given dates.
June 3rd was 79 days ago so we can change the value from 252 to 79 to see the RPS from the SPX low on June 3d.
 
markos

markos

Well-known member
VIP
Here is a more accurate way to calculate the IBD Relative Price Strength but I don't know how to write the code.
(((2*(c/c63)+(c/c126)+(c/189)+(c/252))/4)
I probably don't have the parenthesis set up correctly?
This code would give a more accurate representation of the RPS do to it being "weighted" in the first variable "(2*(c/63))"
Thanks for your help in coding this RPS formula.
@arthurx I do need to revisit this, it just may be a while. I was thinking of something akin to this:
2*(c/c63)+1.25*(c/c126)+(c/c189)+0.75*(c/c252) then /4. I just don't know. I've been tied up for a while and will continue to be.

I have a few trials in Market Watch Columns that show quite a different take on the work I have done.
The release of the variations should be released by end of October. One of the codes uses too much data and I run over the limit.

If anyone would like to throw their code at the wall to see if it sticks, please feel free to do so! :) I'm sure @MBF has some ideas!!:eek:
 
MBF

MBF

Active member
2019 Donor
Warehouse
@arthurx I do need to revisit this, it just may be a while. I was thinking of something akin to this:
2*(c/c63)+1.25*(c/c126)+(c/c189)+0.75*(c/c252) then /4. I just don't know. I've been tied up for a while and will continue to be.

I have a few trials in Market Watch Columns that show quite a different take on the work I have done.
The release of the variations should be released by end of October. One of the codes uses too much data and I run over the limit.

If anyone would like to throw their code at the wall to see if it sticks, please feel free to do so! :) I'm sure @MBF has some ideas!!:eek:
My idea is, I stick with learning to day trade and stop getting mixed up in AP Calculus!
🧠 🔥
 
netarchitech

netarchitech

Well-known member
@markos Just wanted to express my thanks to you for all of your efforts in the uTS community and posting this excellent scan/watchlist. It may not be the exact replica of the original IBD list, but it sure provides some interesting "picks". NEE looks like a rocket to ride tomorrow and for the foreseeable future :cool:

Good Luck and Good Trading...
 
A

arthurx

New member
How to get this relative price strength to appear in a "chart box" on a chart?
 
markos

markos

Well-known member
VIP
@markos Just wanted to express my thanks to you for all of your efforts in the uTS community and posting this excellent scan/watchlist. It may not be the exact replica of the original IBD list, but it sure provides some interesting "picks". NEE looks like a rocket to ride tomorrow and for the foreseeable future :cool:
Good Luck and Good Trading...
@netarchitech thanks for the kind words. That means a lot to me. It has been bothering me for years not having some point of reference.
NEE has good possibilities, just remember that is supposed to act like a stodgy old Utility and one day it will again.

As I mentioned in a post above, I have three proxies running side by side in my watchlist. The current one from above and two others i'm testing.
They may be as late as late Oct., Nov. Good trading and good fortune to you as well.
 
netarchitech

netarchitech

Well-known member
@markos
NEE has good possibilities, just remember that is supposed to act like a stodgy old Utility and one day it will again.
Point well taken...With that said, looking at a twenty year monthly chart, check out the AZO rocket that blasted off a while back and it's still going... In fact, it's gone from 650 to 1100 in the last year and a half! BKNG (formerly PCLN) is another prime example... Of course, there's Amazin' AMZN, but that's been ranging for the last year or so... Alas, like all rockets these too will run out of fuel at some point and gravity will take hold. Until then, stand back in amazement or, better yet, jump on...sky's the limit :D

In closing, I look forward to seeing what develops in late October / November. Thanks again for your efforts/contributions... It is most definitely much appreciated :)

Good Luck and Good Trading...
 
markos

markos

Well-known member
VIP
@netarchitech thanks for the kind words. That means a lot to me. It has been bothering me for years not having some point of reference.
NEE has good possibilities, just remember that is supposed to act like a stodgy old Utility and one day it will again.

As I mentioned in a post above, I have three proxies running side by side in my watchlist. The current one from above and two others i'm testing.
They may be as late as late Oct., Nov. Good trading and good fortune to you as well.
Ok, it's the End of October! 🥳 Here is a share link to 5 Different Relative Strength Indicators that also includes my watchlist setup.
http://tos.mx/xCZKBN9

Below the picture are the codes for the individual columns.
For those that will test this, please give it a good workout and provide feedback on the column that works best for you.

@BenTen @mc01439 @Hguru @skynetgen @korygill @dougn @diazlaz @Shinthus @MBF @netarchitech @arthurx @Nick
Apologies to anyone I missed.


Here are the 5 Relative Strength Studies in the Picture Above:

Column #1:

%CTM - Chande Trend Meter is a Scan, Column, and Lower Study. http://tos.mx/az08ZJg This can be found in school.stockcharts.com

Code:
# %CTM_Chande_Trend_Meter Scan ported in TSL by Mobius per request
#declare lower;
def h = high;
def l = low;
def c = close;
script Scale {
    input c = close;
    input Min = 0;
    input Max = 100;
    def hh = HighestAll(c);
    def ll = LowestAll(c);
    plot Range = (((Max - Min) * (c - ll)) /  (hh - ll)) + Min;
}
script BB
    {
    input price = close;
    input length = 20;
    def avg = Average(price, length);
    def sd = StDev(price, length);
    def upperBand = avg + (2 * sd);
    def lowerBand = avg - (2 * sd);
    plot PercentB = (price - lowerBand) / (upperBand - lowerBand) * 10;
}
def BB20H = BB(h, 20);
def BB20L = BB(l, 20);
def BB20C = BB(c, 20);
def BB50H = BB(h, 50);
def BB50L = BB(l, 50);
def BB50C = BB(c, 50);
def BB75H = BB(h, 75);
def BB75L = BB(l, 75);
def BB75C = BB(c, 75);
def BB100H = BB(h, 100);
def BB100L = BB(l, 100);
def BB100C = BB(c, 100);
def zScore = ((c - Average(c, 100)) / StDev(c, 100)) * 10;
def RSI = RSI() / 10;
def PriceChannel = ((c - Lowest(l, 2)) / (Highest(h, 2) - Lowest(l, 2))) * 10;
def sum = BB20H + BB20L + BB20C + BB50H + BB50L + BB50C + BB75H + BB75L + BB75C + BB100H + BB100L + BB100C + zScore + RSI + PriceChannel;
plot CTM = scale(sum);
#plot "90" = if isNaN(c) then double.nan else 90;
#plot "80" = if isNaN(c) then double.nan else 80;
#plot "60" = if isNaN(c) then double.nan else 60;
#plot "20" = if isNaN(c) then double.nan else 20;
# End Code CTM
Column #2:
My Weighted RS Script http://tos.mx/mpjIxjA
Code:
#09:56 Dave_S: # October 9 2019 in TSL
# Hi markos: here's is your repaired script; It still throws complex code warning.
# 07:38 markos: Good Morning. I am attempting to create my own version of a RS Rating watchlist column that is weighted to the latest 3 months.  This little code throws a complex script warning. What can be done to simplify it? Loooking for suggestions. Thanks!
#MYexpRS3 by Markos chgd title to RSwQH3qY 10-2019
#The idea here is a hack to create a Weighted Relative Strength per the math in Def Data2.

#declare lower;

input lengthYR = 252;
input length3QTRs = 189;
input lengthHalfYr = 126;
input lengthQTR = 63;
input lengthWk = 6;
input mid = 50;

  def C252 = Average(close, lengthYR);
  def C189  = Average(close, length3QTRs);
  def C126  = Average(close, lengthHalfYr);
  def C63  = Average(close, lengthQTR);
  def C6 = Average(close, lengthWk);

# def Data1 = close / close("ITOT");
def Data1 = close / Average(close, 6);
# def Data2 = (((2*(c/c63))+(1.25*(c/c126))+(c/c189)+(0.75*(c/c252)))/4);
def Data2 = (((2*(close/c63))+(1.00*(close/c126))+(0.75*(close/c189))+(0.50*(close/c252)))/4);
#def Data2 = (((5*(close/c63))+(3.00*(close/c126))+(1.00*(close/c189))+(0.25*(close/c252)))/4);
def Data3 = Data1 * Data2;
def newRngMin = 1;
def newRngMax = 100;
def HHData3 = HighestAll( Data3);
def LLData3 = LowestAll( Data3 );
plot nr = ((( newRngMax - newRngMin ) * ( Data3 - LLData3 )) / ( HHData3 - LLData3 )) + newRngMin;
#plot midline = mid;
#End MyexpRS3 Markos chgd title to RSwQH3qY 10-2019
Column #3:
http://tos.mx/f8FS7hd RS 6 Month Column

Code:
#WLC_RS6mo
#RS_Rank - 8/28/2019 Developed by GHorschman  ([email protected])
#######################################################################
# This is a custom quote to compute the Relative Strength percentile.
# It is calculated the same way that IV_Percentile is computed.  Just
# change the length to specify the time frame of interest.  The
# background color is tied to the following ranges:
#
#    RS_Rank > 80       -- Dark Green
#    80 <= RS_Rank < 60 -- Light Green
#    60 <= RS_Rank < 40 -- Gray
#    40 <= RS_Rank < 20 -- Light Red
#    RS_Rank <= 20      -- Dark Red
######################################################################

# Set length to period of interest.

#  1 Wk – 5 trading days
#  1 Mos – 21 Days
#  3 Mos – 63 Days
#  6 Mos – 126 Days
#  12 Mos – 252 Days

def length = 126;

#def RS = if IsNan(relativeStrength("SPX")) then 0 else relativeStrength("SPX") ;
def RS = RelativeStrength ("ITOT");
def RSLow = Lowest(RS, length);
def RSHigh = Highest(RS, length);
def RSRank = round(100 * (RS - RSLow) / (RSHigh - RsLow),0);
addlabel (yes,RSRank);

#AddLabel (yes, if  RSRank >= 1 and RSRank < 100 then "000" + astext(RSRank) else astext( RSRank)   );

assignbackgroundcolor (if RSRank > 80 then color.dark_green else
                       if RSRank > 60 and RSRank <= 80 then createcolor(0,175,0) else
                       if RSRank > 40 and RSRank <= 60 then color.gray else
                       if RSRank > 20 and RSRank <= 40 then CreateColor(220, 0,0) else
                       if RSRank <= 20 then CreateColor(150, 0,0) else
                       color.white);
#End Code
Column #4:
http://tos.mx/BNYLITs RS 12 month Script

Code:
#WLC_RS1Yr
#RS_Rank - 8/28/2019 Developed by GHorschman  ([email protected])
#####################################
# This is a custom quote to compute the Relative Strength percentile.
# It is calculated the same way that IV_Percentile is computed.  Just
# change the length to specify the time frame of interest.  The
# background color is tied to the following ranges:
#
#    RS_Rank > 80       -- Dark Green
#    80 <= RS_Rank < 60 -- Light Green
#    60 <= RS_Rank < 40 -- Gray
#    40 <= RS_Rank < 20 -- Light Red
#    RS_Rank <= 20      -- Dark Red
######################################

# Set length to period of interest.

#  1 Wk – 5 trading days
#  1 Mos – 21 Days
#  3 Mos – 63 Days
#  6 Mos – 126 Days
#  12 Mos – 252 Days

def length = 252;

#def RS = if IsNan(relativeStrength("SPX")) then 0 else relativeStrength("SPX") ;
def RS = relativeStrength("ITOT"); #SPX is default
def RSLow = Lowest(RS, length);
def RSHigh = Highest(RS, length);
def RSRank = round(100 * (RS - RSLow) / (RSHigh - RsLow),0);
addlabel (yes,RSRank);

#AddLabel (yes, if  RSRank >= 1 and RSRank < 100 then "000" + astext(RSRank) else astext( RSRank)   );

assignbackgroundcolor (if RSRank > 80 then color.dark_green else
                       if RSRank > 60 and RSRank <= 80 then createcolor(0,175,0) else
                       if RSRank > 40 and RSRank <= 60 then color.gray else
                       if RSRank > 20 and RSRank <= 40 then CreateColor(220, 0,0) else
                       if RSRank <= 20 then CreateColor(150, 0,0) else
                       color.white);
#End Code
Column #5:
http://tos.mx/dqmp2K1 This was the iteration from page 1. It is Percent Inside 52 week range.

Code:
# Mobius© WLC Percent Inside 52 Week Range
def h = highest(high, 252);
def l = lowest(low, 252);
def x = (close - l) / (h - l); 
plot r = round(x * 100, 0);
#End Code
Please try out and see what works for you on your time frame!
 
Last edited:
MBF

MBF

Active member
2019 Donor
Warehouse
Ok, it's the End of October! 🥳 Here is a share link to 5 Different Relative Strength Indicators that also includes my watchlist setup.
WARNING... Loading this probably will change your current Watchlist Set-Up!
TOS does NOT save Watchlist set-ups!
If you want your current set-up kept, please take a screen shot & download it so that it can be rebuilt.
http://tos.mx/xCZKBN9
For those that will test this, please give it a good workout and provide feedback.

:unsure: :oops: 🥺😭
 
D

diazlaz

Well-known member
2019 Donor
VIP
@markos thanks - for the watchlist, the share doesn't attach the studies and custom fields, as a chart. you will have to share each individual custom watchlist first, then add them , then import the watchlist. or you can add the code blocks for the custom lists in order to recreate the watchlist setup.
 
markos

markos

Well-known member
VIP
@markos thanks - for the watchlist, the share doesn't attach the studies and custom fields, as a chart. you will have to share each individual custom watchlist first, then add them , then import the watchlist. or you can add the code blocks for the custom lists in order to recreate the watchlist setup.
Thanks @diazlaz I'll look into that. I need to finish this up.
I will post each of the 5 RS indicators with their links below the screenshot up above.
 
Last edited:
markos

markos

Well-known member
VIP
How to get this relative price strength to appear in a "chart box" on a chart?
In the Education Tab in ThinkorSwim you will find what you need. Look up AddLabel in their search bar.
 
D

diazlaz

Well-known member
2019 Donor
VIP
thank you @markos - amazing work and orchestration. if you ever want to brainstorm in developing a trading plan around this and create a few plans and backtest them, count me in and i will invest time.
 
Thread starter Similar threads Forum Replies Date
R Questions 13

Top