Discussing the article: "Pesaran–Timmermann Test in MQL5: Separating Real Directional Skill from a Lucky Hit Rate"

Check out the new article: Pesaran–Timmermann Test in MQL5: Separating Real Directional Skill from a Lucky Hit Rate.

This article implements the Pesaran–Timmermann directional accuracy test in pure MQL5 and applies its rolling right-tail p-value as a gate to enable or disable an Expert Advisor. Forecasts are scored without look-ahead, and the framework includes an EA, a rolling statistical display, and a self-test. The method is evaluated on XAUUSD, EURUSD and GBPUSD, with a coin-flip control to quantify false alarms.

Say a forecaster gets 58% of next-bar directions right. Is that good? You can't tell until you know how often price went up and how often the forecaster said "up". If the market rose on 60% of bars and the model said "up" 90% of the time, 58% is exactly what a model with no information would score. Pesaran and Timmermann (1992) turned that comparison into a proper test.

Here I implement the test in plain MQL5 and use it as a gate. The EA trades a one-bar direction forecast only when the right-tail p-value of the latest rolling window is below α. That is a screening rule, not proof of skill, and a coin flip runs through the same gate because I wanted to see how often pure noise gets through.

Author: Adewumi Babatunde Gbadebo