Need a custom smoothing function in R

Job ID: 32426479

Budget: $10 – $75 USD

Given a time series of stock or commodity prices, which include a close price,, high price and low price, I want to create and plot a smooth line through the time series that will have the following two characteristics:

1) The smooth line must be bounded at each point between the high and low prices.
2) The smooth line cannot change past values if new points are added to the time series.

Most common smoothers (loess, spline, etc) will not work because they are not necessarily bounded by the high/low prices at each point, and because past values change if new points are added.

So I need a custom smoothing function that will generate the values of the smooth line as outputs given the inputs of the time series. An example time series is attached.

The deliverable for this project is a complete R script that will read the csv file, plot it, then plot the smooth line as described.