is_test_datetime = timestamp(2019,9,5,0,0) <= time and time <= timestamp(2019,9,6,0,0) bgcolor( is_test_datetime ? color.gray : color.white )
entry1 = close < open
float a = na float b = na float c = na
if( entry1 and is_test_datetime and strategy.position_size==0 ) a := high b := a + tr * 3 c := a - tr * 3 strategy.entry( "Entry1" ,strategy.long ,1 ,stop=a ) strategy.exit( "Exit1" ,"Entry1" ,stop=c ,limit=b ) =====