Shifting is implemented with the (x) operators in lines objects.
See: Docs - Concepts and look for delayed. The use of the term delayed was meant to indicate that looking into the future is not possible. But it is possible for indicators to project values into the future (like Ichimoku does), although it is seldom used.
newline = self.rsi + self.rsi(-1)
Notice how the first term doesn't use the (x) notation and with it it simply takes the current value. One could of course also do it formally as:
newline = self.rsi(0) + self.rsi(-1)
which is functionally 100% equivalent but not 100% memory equivalent because self.rsi(0) will create an extra buffer for the copies of itself.
RSI has a single line, so there is not much need to address the specific lines and by simply using the indicator itself the 1st line in the indicator is automatically used.
But for indicators with multiple lines like a MACD, one can also do things like:
newline = self.macd + self.macd(-1) # 1st line
newline = self.macd.lines.macd + self.macd.lines.macd(-1) # the 1st line is also called macd
newline = self.macd + self.macd.lines.signal(-1) # sum of present 1st line + delayed line "signal"
New changes have only uncovered a typo in the ta-lib integration by which auto-generated wrappers had the module itself in the __module__ attribute instead of the module name. Corrected in the development branch
The final implementation, already pushed to the development branch, respects the original implementation by Ehlers and rather than expecting the price component to have high and low it takes simply self.data (which unless changed is the close from regular data feeds)
The advantage of not having specifics like high and low in the code is that the LRSI can be calculated for anything which is a data feed or descendant of ... you could create the LRSI of a SimpleMovingAverage
The default behavior is to not write the value of indicators with a writer to avoid cluttering in the csv output and thus selected indicators must have the csv flag activated.
If a single data feed is added to the system with replaydata, only this data will be output. In this case the only data known to cerebro is the one with timeframe=bt.TimeFrame.Minutes and compression=15. The original is NOT in the system
Add it too with: cerebro.adddata(data)
The original behavior of backtrader enforced adding the larger timeframe data feeds after the smaller timeframe feeds. With the new sychronization mechanism available since 1.9.x., this is no longer needed. In any case the suggestions would be for this:
Add the larger timeframe (your replaydata) after the smaller timeframe (adddata)
In that case: self.data0 will be the smaller timeframe and self.data1 the larger timeframe. Use the appropriate reference when creating the indicators
Although not strictly needed use cerebro.run(next=True). This will keep the buffers fully sync'ed and allows plotting.
If you have something precalculated which is not a data feed the use case is about synchronization, because you probably want to use it as an indicator. You should then check the datetime of the data feed passed to the indicator to fetch the proper data from the dataframe.
A more detailed use case would help in understanding what may (or may not) missing.
This is a non-expected usage pattern and for sure one which is not going to work.
LineBuffer is an internal object which is not meant for user consumption. And of course self.dval1 is turning into a float, you are assigning a float to the member attribute you created yourself.
This is not the same as self.lines.xxx = yyy during the __init__ phase, because in that case self.lines is an object, and xxx is constructed by means of Descriptors, which allows controlling things like assignment (via __set__). But assignment cannot be controlled on a member attribute you have created.
The use case is actually a lot easier:
self.dval1 = bt.ind.Lowest(self.data.low, period=10) # or bt.ind.MinN(self.data.low, period=10)
print('the current lowest value is:', self.dval1)
The indicator family is big and tries to cover all possible aspects