AD line for my Portfolio

Hey guys, I have been searching the forum for a code to allow me to build an AD line for my portfolio, could anyone help me on this… that would be great!

GH

I replied to Grant elsewhere, but for the benefit of others here’s how to build a cumulative advance/decline line in the custom Market Breadth module. It calculates the net difference each day between advances (Change()>0) and declines (Change()<0):

Capture

Just to add to this, the reason Darren’s script works is that we treat Boolean values as 0 for false and 1 for true. So we can sum up true values to get a count.