Related:
An editable time series is a time series whose data is populated by your strategy’s own custom logic from within its “When Bar Updates” section.
You simply need to set the editable time series’ most recent value on every price bar from within the “When Bar Updates” section, and the editable time series will then contain one data point for both the current price bar as well as one data point for each of the previous price bars for which your strategy’s custom logic gave the editable time series a value.
Your strategy’s logic can then access the value of the editable time series for both the current bar and previous bars, and if the editable time series is numeric you can plot it on the chart to which the strategy is attached.