// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN( "Price Chart" );
SetChartOptions( 0, chartShowArrows | chartShowDates );
_N( Title = StrFormat( "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ) );
Plot( C, "Close", ParamColor( "Color", colorBrightGreen ), styleNoTitle | ParamStyle( "Style" ) | GetPriceStyle() );
_SECTION_END();

_SECTION_BEGIN("Previous Days High & Low");

function CDL( array )
{
    doy = DayOfYear();
    Lastdoy = doy == LastValue( doy );
    Dayline = array * Lastdoy;

    return IIf( Dayline, Dayline, Null );
}

H1 = TimeFrameGetPrice( "H", inDaily, -1 );
L1 = TimeFrameGetPrice( "L", inDaily, -1 );

Plot( cdl( H1 ), "", colorYellow, styleLine + styleDashed + styleNoRescale );
Plot( cdl( L1 ), "", colorYellow, styleLine + styleDashed + styleNoRescale );

Buy = C > H1;
Sell = C < L1;
Buy = ExRem( Buy, Sell );
Sell = ExRem( Sell, Buy );
Filter = Buy OR Sell ;
SetOption( "NoDefaultColumns", True );
AddTextColumn( Name(),     "Symbol", 1.0, colorDefault, colorDefault, 80 );
AddColumn( DateTime(), "Date", formatDateTime, colorDefault, colorDefault, 70 );
AddColumn( C, "CMP", 1.2, colorDefault, colorDefault, 80 );
AddTextColumn( WriteIf( Buy, "Previous Day High Break", "Previous Day Low Break" ), "Trade", 1.0, colorDefault, colorDefault, 50 );

_SECTION_END();