addminperiod is consistent. It is your expectation of what it should do.
As explained above if you have:
class MyIndicator(bt.Indicator): lines = ('ind',) def __init__(self): self.addminperiod(756) ... ... dval8 = dval7 * 0.6 + dval7(-1) * 0.25 self.lines.ind = dval8
addminperiod is being called as
self.addminperiod and as such it will affect the object to which it belongs. It doesn't even know that
dval8 will be calculated.
self.lines.ind falls below the umbrella of
MyIndicator and consequently is affected by the operation
And the assignment
self.lines.ind = dval8 makes sure that you will find
756 values under
In your implementation now (unknown here), you may try the following instead of having
The code is there, but so far there wasn't any use case for this and it is still very unclear why you may need the last
756 values of a calculation. There must be something else which is being calculated.