Index | Recent Threads | Who's Online | Search

New Thread
This topic has been viewed 91 times and has 4 replies
sevensisters
Problem with using MACDD in aggregate series

Hi all,

I would like to count the number of stocks which fulfill the following criteria:
MACDD(12,26,1,0) < 0 AND LoopMin("MACDD(12,26,1,CTR)",14)>3 AND LoopMin("MACDD(12,26,1,CTR)",14)<8


I tried to implement this in a custom series as per attached screen capture, but it seems that it somehow doesn't like MACDD as a rule. Rule 1 in the screen capture is not required but works fine, but somehow it must be the combination of LoopMin and MACDD.

Any solution is appreciated!

Attachment Capture.JPG (76885 bytes) (Download count: 54)


Jan 16, 2020 9:30:52 AM       
pdemartino
Re: Problem with using MACDD in aggregate series

I created a custom formula out of mLMIN and it seems to work. Of course, zero companies passed that rule as written in the last five years, so...

Jan 16, 2020 9:50:45 AM       
Edit 1 times, last edit by pdemartino at Jan 16, 2020 9:58:38 AM
yuvaltaylor
Re: Problem with using MACDD in aggregate series

I'm not 100% sure about this, but it is my understanding that Aggregate Series only accepts commands that are listed under the "Series Reference" tab, and LoopMin is not one of them. If I were you I would do as Paul suggests and use a custom formula for the LoopMin function. The error message seems to be incorrect in this case . . .

Yuval Taylor
Product Manager, Portfolio123
invest(igations)
Any opinions or recommendations in this message are not opinions or recommendations of Portfolio123 Securities LLC.

Jan 16, 2020 1:01:16 PM       
sevensisters
Re: Problem with using MACDD in aggregate series

Thanks gents. Custom formula will work.

Jan 17, 2020 2:31:40 AM       
sevensisters
Re: Problem with using MACDD in aggregate series

And here is the result (attached). It counts how many stocks in the S&P500 had a turnaround in the MACD signal between 3 and 8 bars ago with a MACDD value of -2 or smaller.

This is a custom universe that can then be used to implement the trading strategy I showed in this thread:
https://www.portfolio123.com/mvnforum/viewthread_thread,12081

Attachment Capture.JPG (96239 bytes) (Download count: 27)


Jan 17, 2020 6:19:59 AM