Adding Previous Day's Close Line To TOS
- cnguyentrade
- Aug 2, 2015
- 1 min read

How to add previous day's close line to TOS charts: 1) Click studies and go to 'edit studies' 2) Hit 'New..' 3) Delete the default plot and add this script: # input aggregationPeriod = AggregationPeriod.DAY; input length = 1; input displace = -1; input showOnlyLastPeriod = no; plot PrevDayClose; if showOnlyLastPeriod and !IsNaN(close(period = aggregationPeriod)[-1]) { PrevDayClose = Double.NaN; } else { PrevDayClose = Highest(close(period = aggregationPeriod)[-displace], length); } PrevDayClose.SetDefaultColor(GetColor(9) ); 4) Click 'Ok' and save your work space
Enjoy!
Comments