I’m also building this breadth, however I’m unsure if my total Advance/Decline Volume script is correct.
My scripting is different however achieves the same (forgive me I’m still relatively new to scripting):
Advancing Volume:
u1 = VOL();
u2 = VOL(OFFSET=-1);
u3 = u2 - u1;
u3 > 0
Declining Volume:
u1 = VOL();
u2 = VOL(OFFSET=-1);
u3 = u2 - u1;
u3 < 0
So Advance/Decline Volume Percent for the ASX200 has the symbol ADVPASX200:
We’ll be adding this data for the Indian NSE exchange in the next few months, but it’s a bit tricky to calculate manually. What you would need to do is calculate two breadth measures: one summing the advancing volume and one declining volume.
C1=CLOSE();
P1=VOL();
//Calculate Advance/Decline volume;
ADV1 = IF(C1 IsUp, P1,0);
DEC1 = IF(C1 IsDown, P1,0);
//Output ADV1 for Advances or DEC1 for Declines
ADV1
Once ADV1 and DEC1 have been calculated in Market Breadth, use the Data > Custom Codes to calculate the ratio, which would be: