// Downloaded From https://www.WiseStockTrader.com
TimeFrameSet(inDaily);
H1 = HHV(H, 1) ;

H2= (H1-C)< .001*C;

L1 = LLV(L,1) ;


L2 = (C-L1) < .001*C ;

TimeFrameRestore() ;

SetOption("NoDefaultColumns", True);

AddTextColumn(Name(), "Symbol");
AddColumn(DateTime(), "Date", formatDateTime);
AddColumn(C, "CMP", 1.2);


Filter = H2 OR L2 ;

Plot(H2,"",colorBlue,styleDashed);
Plot(L2,"",4,styleDashed);

Buy = H2 ;
Sell = L2 ;

PlotShapes( Buy * shapeUpArrow + Sell * shapeDownArrow, IIf( Buy, colorYellow, colorYellow ) );