December 16, 2021 at 7:34 pm #66955
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
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:December 17, 2021 at 2:54 am #66957Deepak
- Topics: 83
- Replies: 69
- Posts: 152
It seems ismember is not working on this any reason.
DeepakDecember 17, 2021 at 6:34 pm #66961January 25, 2022 at 11:03 pm #67357123456789101112131415//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 #67691
If you type ‘linear’ in the script editor window then all suggestions will pop up, including LRSLOPE():March 15, 2022 at 9:10 pm #67697
Save workbook attached (requires access to the CBOE Indices data).May 4, 2022 at 9:08 pm #68097
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()<-3May 11, 2022 at 6:50 pm #68207
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 #68583
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 Low123456//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.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.
ThomasJune 23, 2022 at 5:03 pm #68649
- You must be logged in to reply to this topic.