Look-Ahead Bias (Future Data)
mql4
// EA reads levels from an existing .hst file
ReadFileHst(datapath);
double level = data[pos][1]; // Levels are already "known"
Problem: The EA uses data already in the history file for trading. This is like "looking into the future" in backtesting.
mql4
// A "magic" system without valid trading logic
if(data[pos][1] > Open[0]) // BUY based on file data
if(data[pos][1] < Open[0]) // SELL based on file data
// Pinbars are merely "camouflage" to appear legitimate
if(IsBuyPinbar()) // False confirmation
Curve Fitting / Data Mining:
Trading levels are "selected" based on historical data
No valid trading logic (indicators, pattern analysis, etc.)
Only suitable for previously optimized data
File Dependency Manipulation
mql4
mql4datapath = TerminalInfoString(3) + "\\history\\" +
account_server + "\\" + Symbol() + "240.hst";