Registered User Joined: 10/7/2004 Posts: 14
|
hi,
I have been trying to write a pcf to detect the maximum daily MACD level over n number of periods , say 10 days.
When using the maximum function for a Worden predefined indicator such as MS over 10 periods, it would be written, MAX(MS,10 ) and for maximum of MS over 10 days starting 15 days back, it would be MAX(MS,10.15)
Knowing that the formula for a daily MACD indicator line 12, 26 is XAVGC12-XAVGC26, I tried to apply the MAX function to it , but using the pattern MAX((XAVGC12-XAVGC26),10) returns an error.
Could you please tell me how to write a pcf to identify the maximum daily MACD 12,26 for 10 days from today, and if possible also how to write another pcf to identify the same , but starting 15 days back?
Many thanks,
Stephen
|
Worden Trainer
Joined: 10/1/2004 Posts: 18,819
|
Visual sorting is going to be the best solution for you here. You cannot put a function within a MAX(). If you right-click on your MACD and choose SORT BY and do a visual sort you will rank the WatchList by the MACD and the highest MACDs will be at the top. Play with it and let me know how it looks to you.
Sort by Visual Value to find new highs and lows in price and indicators
- Craig Here to Help!
|