January 8, 2021 at 1:32 am #61971
I’ve created this thread for some of the charts that are posted on our Twitter account. If there are any you would like to see post the request and Tweet link in a reply.
I’ll start with this one that uses the custom Market Breadth module to calculate the daily percentage of stocks in the S&P500 that outperform the index. As the S&P500 is a market cap weighted index the largest companies have a bigger impact on performance. So when the number of companies outperforming the index is low its the big guys doing the work, whereas if 73% are outperforming then performance will be skewed to the smaller caps.
To build the breadth measure use this simple Relative Index Comparison function:123RIC() IsUp
This will count the number of stocks whose relative performance is higher than the previous bar. If true, then it has outperformed the index on that day and is given a value of 1. The breadth engine will then sum this value up for each day to build the data. For accuracy, use the Historical Membership so that only stocks that were in the index at the time are included, along with the IsMember() function.
Once the breadth data has been built (my example created a ticker symbol SPXOUTPF) then it should display when you open the attached workbook. The Watchlist will load the latest data for the S&P500 stocks and put them into true/false groups. If you have our Fundamental Data on your account then it will also calculate the average market cap size of each group for that day’s trading.
Download and save the workbook top open the chart (if you don’t have the Market Breadth module then the lower panel will be blank).January 21, 2021 at 12:47 am #62073
Automated Fibonacci levels: https://twitter.com/Optuma/status/1351881460156809217?s=20
The script will calculate the high/low range between January 1st and May 1st 2020, and then plot the 138.2% and 161.8% levels:123456789101112//Set Hi/Low date period;H52 = HIGHESTHIGH(RANGE=Range, RANGESTART=2020-01-01, RANGEEND=2020-02-29);L52 = LOWESTLOW(RANGE=Range, RANGESTART=2020-03-01, RANGEEND=2020-05-01);//Calculate Hi-Low range;R1=(H52-L52);//Plot levels;Plot1=LAST(L52);Plot2=LAST(H52);Plot3=LAST(L52+(R1*1.382));Plot4=LAST(L52+(R1*1.618));
The Show View below the chart plots the retracement levels:12345678910//Set Hi/Low date period;H52 = HIGHESTHIGH(RANGE=Range, RANGESTART=2020-01-01, RANGEEND=2020-02-29);L52 = LOWESTLOW(RANGE=Range, RANGESTART=2020-03-01, RANGEEND=2020-05-01);//Calculate Hi-Low range;R1=(H52-L52);//Calculate retracement;R2 = CLOSE()-L52;R2/R1 * 100February 10, 2021 at 9:50 pm #62415
TimeSinceSignal scripts: https://twitter.com/Optuma/status/1359122061592039428
Days since RSI below 50:123TIMESINCESIGNAL(RSI(BARS=14)<50)
Weeks since being on the left side of the RRG (on weekly watchlist – requires RRG Pro module):1234V1=JDKRS().Ratio<100;TIMESINCESIGNAL(V1)February 11, 2021 at 2:25 am #62425Thomas
- Topics: 94
- Replies: 123
- Posts: 217
als always thank you very much for your post and especially workbook.
One last question: Can you post the code for the column “Date since” you have in the watchlist in your Twitter chart?
ThomasFebruary 11, 2021 at 6:26 pm #62443
Date Since RSI(14) was last below 50:1234V1=TIMESINCESIGNAL(RSI(BARS=14)<50, UNIT=Days);LAST(BARDATE())-V1
This will display as a number, so right-click on the watchlist column heading and change the Column Type to Date.February 24, 2021 at 7:43 pm #62691
Stats on stocks joining the S&P500 index
Workbook with scripts attached.
- You must be logged in to reply to this topic.