@ab_trader Ok so everything is working now. So the reason for the errors was that in the init for my strategy I initialized the self.gamma variable with gamma1(self.data).dummyline. That was my mistake I should have deleted that .dummyline.
I think I go confused for a bit and accidentally put that there in the init of my strategy. I also used self.line.dummyline in the next() of my strat. which should be used in my indicator class not strat class.
Bunch of dumb mistakes I made. HUGE thanks to @ab_trader and @run-out for helping me out, and clarifying many aspects of BT for me.
You should consider trying simple examples until you get the concepts and then tackle the strategy you want to execute here. This forum it's difficult to back up and give you the entire lesson of backtrader. Dive into the manuals and once you are ready, tackle your code. Then we will help you solve your problems. It takes time.
Nevermind I figured it out. I wanted to do line[-5] as the value because this would fit the offsetting problem but it always gives errors, but I just had to basically skip the beginning of the line (where line[-5] didn't exist yet) and that fixed it. Sorry idk how I didn't figure this out last night guess I was just burned out. So yeah if anyone comes across this problem just basically do:
line[-5] = value you normally would put at line
and if you have a situation like mine, I had to use the pivot period so it was like above but had to convert the period to Int