Pine Script look-ahead checker

Calculator by Stochastly. The method, the assumptions and the sources are on the full page of the calculator.

Result

potential look-ahead risk

  1. Line 3: security() with lookahead_on and no explicit expression history offset can leak higher timeframe values into historical bars.

    request.security(syminfo.tickerid, "1D", close, lookahead=barmerge.lookahead_on)

    Possible false positives: Same or lower timeframe requests, an offset inside a helper or intermediate variable, or a non-price expression can require manual review.