// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("NetLines");

netbull= Sum(C<Ref(C,-1),3)==3;
netbear= Sum(C>Ref(C,-1),3)==3;

NLBL= ValueWhen(netbull,Ref(H,-2));
NLSL= ValueWhen(netbear,Ref(L,-2));

netline=IIf(BarsSince(NLBL)<BarsSince(NLSL),NLBL, NLSL);
Color= IIf(netline==NLBL,colorBlue, colorRed);

Plot(IIf(Ref(C,-1)< NLBL,NLBL,Null),"NLBL",colorBlue,styleDots|styleNoLine|styleThick);
Plot(IIf(Ref(C,-1)> NLSL,NLSL,Null),"NLSL",colorRed,styleDots|styleNoLine|styleThick);

Couleur= IIf(C> NLBL, colorBlue, IIf(C<NLSL, colorRed, colorBlack));
Plot( C, "Close", couleur, styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 

if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
 ToolTip=StrFormat("Open: %g\nHigh:  %g\nLow:   %g\nClose:  %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}
_SECTION_END();