pine-script-request-security-nonrepainting-params

To prevent MTF repainting in Pine Script request.security() calls, use gaps=barmerge.gaps_off and omit the lookahead parameter (defaults to lookahead_off). Intrabar lookahead causes the security value to shift after the bar closes, producing backtest results that cannot be replicated in live trading.