Optuma Forums › Optuma General Discussion › Twitter Charts 2
Tagged: DayOfWeek, DDP, drawdown, pivot labels, VIX Curve
- This topic has 11 replies, 4 voices, and was last updated 3 days ago by
Darren.
-
AuthorPosts
-
December 16, 2021 at 7:34 pm #66955
Darren
- Topics: 70
- Replies: 802
- Posts: 872
Following on from this thread here are details for charts posted on our Twitter account. Comment in the Tweet and we’ll post the details here.
For example, to calculate the average drawdown for the members of an index, as per this Tweet: https://twitter.com/Optuma/status/1471137257969135621?s=20
This was calculated using the Drawdown Percent function DDP() in the custom Market Breadth module, with the Breadth Action set to Average.
By default, the DDP() function will calculate distance from the 1 year high.
Once calculated, the data can be viewed in the Breadth Data tool below the price chart:
2 users thanked author for this post.
December 17, 2021 at 2:54 am #66957Deepak
- Topics: 83
- Replies: 69
- Posts: 152
Hii Sir,
It seems ismember is not working on this any reason.
Regards,
DeepakDecember 17, 2021 at 6:34 pm #66961Darren
- Topics: 70
- Replies: 802
- Posts: 872
Hi Deepak,
The ISMEMBER() function only works with true/false conditions, not when calculating averages.
3 users thanked author for this post.
January 25, 2022 at 11:03 pm #67357Darren
- Topics: 70
- Replies: 802
- Posts: 872
Breakout scan: https://twitter.com/Optuma/status/1482727843171868672?t=JzBy3BTgpMf_3_i2Z3lAzw&s=19
123456789101112131415//Define pivots;#$Bars=10;H1=PIVOT(MIN=$Bars, TYPE=High, IGNOREUNCONFIRMED=True);L1=PIVOT(MIN=$Bars, TYPE=Low, IGNOREUNCONFIRMED=True);//Get pivot values;H2=VALUEWHEN(HIGH(), H1);L2=VALUEWHEN(LOW(),L1);//When did the pivots occur?;$TH1=TIMESINCESIGNAL(H1, UNIT=Bars);$TL1=TIMESINCESIGNAL(L1, UNIT=Bars);//Close crosses previous pivot level with a new high/low since the pivot;(CLOSE() CrossesAbove H2 and CLOSE() > HIGHESTHIGH(BARS=$TL1)) or(CLOSE() CrossesBelow L2 and CLOSE() < LOWESTLOW(BARS=$TL1))1 user thanked author for this post.
February 23, 2022 at 4:46 pm #67583Tim
- Topics: 21
- Replies: 19
- Posts: 40
Can you post the script for the slope of the linear regression.
March 14, 2022 at 9:09 pm #67691Darren
- Topics: 70
- Replies: 802
- Posts: 872
If you type ‘linear’ in the script editor window then all suggestions will pop up, including LRSLOPE():
March 15, 2022 at 9:10 pm #67697Darren
- Topics: 70
- Replies: 802
- Posts: 872
VIX curve chart: https://twitter.com/Optuma/status/1503686929652408322?s=20&t=1bCnrW9A03LrLGX9BhgMig
Save workbook attached (requires access to the CBOE Indices data).
May 4, 2022 at 9:08 pm #68097Darren
- Topics: 70
- Replies: 802
- Posts: 872
Day of the Week formulas: https://twitter.com/Optuma/status/1520384472356560896
The DAYOFWEEK() function assigns a value to each week day, with Sundays assigned a 1, Mondays = 2, etc. As such, to mark all Fridays on a chart use DAYOFWEEK()==6 in a Show Bar. This will show all Fridays with a fall greater than 3%:
1234DAYOFWEEK()==6 andCHANGE()<-31 user thanked author for this post.
May 11, 2022 at 6:50 pm #68207Darren
- Topics: 70
- Replies: 802
- Posts: 872
5 Consecutive Down Weeks: https://twitter.com/Optuma/status/1523622055534419968
The Days Down DD() function counts the consecutive bars a value (the close by default) has been lower (Days Up DU() does the opposite).
On a weekly timeframe DD()==5 will signal when there have been 5 consecutive weekly lower closes, which was used in the signal test.
For 5 consecutive lower highs use DD(HIGH())==5
The Days Down tool can be used on a chart (currently 6 weeks for the SPX):
June 17, 2022 at 10:15 pm #68583Darren
- Topics: 70
- Replies: 802
- Posts: 872
To calculate how long ago the close was at the latest low (or high) – and the dates they occured: https://twitter.com/Optuma/status/1537704403205079040
Worst Change Since:
1234567//Display as Date in Watchlist;//Get the last 1D ROC change %;D1=LAST(ROC(BARS=1));//Get the BarDate when the 1D ROC was less than D1;BARDATE(ROC(BARS=1)<D1, UNIT=Days)Lowest Close Since:
1234567//Display as Date in Watchlist;//Get the last close price;D1=LAST(CLOSE());//Get the BarDate when the Close was less than D1;BARDATE(CLOSE()<D1)Weeks Since Low
123456//Get the last close price;D1=LAST(CLOSE());//Get the time since the Close was less than D1;TIMESINCESIGNAL(CLOSE()<D1, Unit=Weeks)To find the high dates instead, change the < to >. Sample weekly watchlist attached that can be saved as a layout and applied to any other lists.
2 users thanked author for this post.
June 23, 2022 at 3:47 pm #68647Thomas
- Topics: 127
- Replies: 161
- Posts: 288
Hi Optuma team,
can you publish the script for the Twitter chart “ATH Drawdown” (https://twitter.com/Optuma/status/1539727679586443265)?
As always many thanks for your excellent support.
Best wishes,
ThomasJune 23, 2022 at 5:03 pm #68649Darren
- Topics: 70
- Replies: 802
- Posts: 872
Hi Thomas – use the Drawdown tool set to 100 year lookback (the all-time high calculation is wrong and is being fixed).
https://help.optuma.com/kb/faq.php?id=1237
1 user thanked author for this post.
-
AuthorPosts
- You must be logged in to reply to this topic.