AFL for volume of all the advancing stocks

Hello everone,
I have coded an AFL for sum volume of all advancing stocks.
I am strugglig with getting the right output.
Please help.
below is the code

a = Close < Open ;
b = Sum (Volume,a);
Buy = 0;
Filter = 0;
AddToComposite( b, "advol", "X" , 7);
advvol = Foreign("advol", "C", True);
Plot ( advvol , "b", colorWhite,styleHistogram,0,0,0,0,1);

Similar threads