Can I change delete my profile and all my informations (including posts)? Or can I change my username? How can i contact the admin team? Thanks a lot.
Latest posts made by albertoburchi
Lagged Indicator (eg. SMA)
I would like to build an indicator with lagged data. For example, get the SMA not today's close, but yesterday's or 2 days behind.
Is there such a possibility in Backtrader or do I have to build an indicator by myself?
Below I tried a lagged SMA of 7 days but I can't define the method next. Will you help me?
lines = ('laggedsma1',)
params = (('period', 14),
def next (self): datasum = math.fsum(self.data.get(size=self.p.period)) self.lines.sma = datasum / self.p.period