Feeding previously calculated indicator to backtrader
Hi. I am fairly new to backtrader but I am planning to test lot of strategies on it. Here is an example of what I am doing:
I use 3 SMAs (fast, medium and slow). Use the crossover between the fast and the slow as a buying signal and the crossover between the medium and fast as a selling signal. Of course I need to optimize the period for these SMAs, resulting in hundreds of calculations.
My question is the following: Is there any way to calculate the SMAs only ONCE and then upload the already calculated values to backtrader? As my code stands I feed the raw stock market prices on every run and backtrader has to calculate the SMAs every time...
run-out last edited by