Well, the difference between the AskPrice function and the long entry price in testtrades.csv are almost the same, so this part is working fine. The suggested bid price calculation 'AskPrice - Spread' however leads to the wrong bid price, OR(!) the logged long exit price is wrong. I understand that there are minor differences, but that's not the case, compared to the ask/entry price. I haven't tried it myself yet, but is this Spread function a constant or a variable?