Complete Backtesting Tutorial?

I am a beginner in Automated Trading and I am looking for a complete tutorial on how to backtest my Expert Advisor data.

As I am a complete beginner in this field, I would like to know if backtesting in MQL4 & MQL5 is accurate. I know that it doesn’t work the same way in both software, so I would like to know which one is best at backtesting Expert Advisors.

I heard that MQL4 backtesting is not accurate because it looks at the data in the future to make your trades successful, which is ridiculous for accurate testing.

I have looked on many forums to find a complete tutorial on this but I only found one for MQL4, which seems to be worse than MQL5. Does someone has a complete tutorial?

Thank you.