OPEN-SOURCE SCRIPT
AI MES Asian Session Strategy

How this script works:
The first 30 minutes after 6pm ET (orange shading) builds the opening range. Once locked in, two setups compete — whichever fires first wins and blocks the other for the session.
Breakout fires when price closes outside the range with above-average volume and RSI momentum confirming direction. Stop goes back inside the range, target is 1.5R.
Mean reversion fade fires when price tags a range extreme, RSI is overbought/oversold, and the close reversal bar closes back inside the range. Stop goes just beyond the extreme, target is the range midpoint. Volume threshold is lower here (0.8× average) because fades naturally happen on lighter volume.
Key things to tune in the backtest:
Max Range Size (default 20pts) — filters out nights where a news event blows the range wide open, making fades dangerous
RSI Overbought/Oversold thresholds — tighten these (e.g. 65/35) for fewer but higher quality fade signals
The small faded circles on the chart show when a fade condition was met but couldn't fire (trade limit reached or position already open) — useful for eyeballing missed setups
Run this on the 5-minute timeframe — the Asian session moves slowly enough that 3-minute adds noise without improving entry timing.
The first 30 minutes after 6pm ET (orange shading) builds the opening range. Once locked in, two setups compete — whichever fires first wins and blocks the other for the session.
Breakout fires when price closes outside the range with above-average volume and RSI momentum confirming direction. Stop goes back inside the range, target is 1.5R.
Mean reversion fade fires when price tags a range extreme, RSI is overbought/oversold, and the close reversal bar closes back inside the range. Stop goes just beyond the extreme, target is the range midpoint. Volume threshold is lower here (0.8× average) because fades naturally happen on lighter volume.
Key things to tune in the backtest:
Max Range Size (default 20pts) — filters out nights where a news event blows the range wide open, making fades dangerous
RSI Overbought/Oversold thresholds — tighten these (e.g. 65/35) for fewer but higher quality fade signals
The small faded circles on the chart show when a fade condition was met but couldn't fire (trade limit reached or position already open) — useful for eyeballing missed setups
Run this on the 5-minute timeframe — the Asian session moves slowly enough that 3-minute adds noise without improving entry timing.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.