Following code plots horizontal lines for 1st bar O/C.I want these lines ONLY for CURRENT day.Pl. make changes in code.
tf = Param( "TF", 15, 1, 100000, 1 ) ;
Clrclose = colorCustom12 ;
Clropen = colorCustom12 ;
stylefirstbar = styleThick ;
tfs = tf * in1Minute ;
TimeFrameSet( tfs ) ;
firstbar = Day() != Ref( Day(), -1 ) ;
Cfirst = ValueWhen( firstbar, C, 1 ) ;
Ofirst = ValueWhen( firstbar, O, 1 ) ;
TimeFrameRestore() ;
Cfirste = TimeFrameExpand( Cfirst, tfs, expandFirst ) ;
Ofirste = TimeFrameExpand( Ofirst, tfs, expandFirst ) ;
Plot( Cfirste, "First bar Close", ClrClose, stylefirstbar ) ;//|styleNoRescale
Plot( Ofirste, "First bar Open", ClrOpen, stylefirstbar ) ;//|styleNoRescale
tf = Param( "TF", 15, 1, 100000, 1 ) ;
Clrclose = colorCustom12 ;
Clropen = colorCustom12 ;
stylefirstbar = styleThick ;
tfs = tf * in1Minute ;
TimeFrameSet( tfs ) ;
firstbar = Day() != Ref( Day(), -1 ) ;
Cfirst = ValueWhen( firstbar, C, 1 ) ;
Ofirst = ValueWhen( firstbar, O, 1 ) ;
TimeFrameRestore() ;
Cfirste = TimeFrameExpand( Cfirst, tfs, expandFirst ) ;
Ofirste = TimeFrameExpand( Ofirst, tfs, expandFirst ) ;
Plot( Cfirste, "First bar Close", ClrClose, stylefirstbar ) ;//|styleNoRescale
Plot( Ofirste, "First bar Open", ClrOpen, stylefirstbar ) ;//|styleNoRescale