@soakedoats This is a known error that was just fixed on Backtrader2 today. See here for the fix. You can install backtrader two, or just add the one line in to your backtrader library in feeds/yahoo.py
@Sajil-Thamban I'm guessing when the crossover happens closer to the end of a bar, it will be treated as happening in the next bar. Because I observed similar behavior for my testing. I have the exact same strategy tested in backtrader and Tradingview. For some trades, the enter and exit (crossovers) occur at the same bar but for some trades, the crossovers will occur one bar earlier or later, even visually I saw the crossover as happening at the same bar on both platforms. The situation will become even worse when both MA lines overlapping each other during a tight range. Just my 2 cents worth of opinion.
Can you please how your backtesting P/L looks like. I'm assuming we buy at 21.84 and sell at 15.90 is it? are there any other confirmation studies we can add to it ? as mostly Zig Zag repaints(overwrites the signals)