Originally you asked about asc+des, p2t+p2b. Everything in that book is there. Just paste that code in a paintbar study but delete the plot statement and delete the setPlotColor statement. Replace it with 1 of these plot statements.
{asc paintbar} if s[si,6]>0 then plotPaintBar[currentbar-s[si,0]](s[si,1],s[si,2]);
{des paintbar} if s[si,6]<0 then plotPaintBar[currentbar-s[si,0]](s[si,1],s[si,2]);
{p2t paintbar} if s[si,7]>0 then plotPaintBar[currentbar-s[si,0]](s[si,1],s[si,2]);
{p2b paintbar} if s[si,7]<0 then plotPaintBar[currentbar-s[si,0]](s[si,1],s[si,2]); |