This script is meant to be used intraday, on futures products.
It charts the previous day/week/month settlement price as a constant level intraday.
The settlement price of a product is calculated by the exchange at the end of each day. It is shown in the D/W/M chart as the close price. The settlement price does not coincide with the last close price intraday, thus creating the need of a script like this.
The settlement price can be a pivotal price in intraday futures trading, as it can act as support or resistance
You can select the resolution of the settlement by the "Resolution" input