OPEN-SOURCE SCRIPT
Breakout asia USD/CHF

1 — Customizable Parameters
sess1 & sess2: The two time ranges that define the Asian session (e.g., 20:00–23:59 and 00:00–08:00).
Important: format is HHMM-HHMM.
rr: The risk/reward ratio (default = 3.0, meaning TP = 3× risk size).
onePerSess: Toggle to allow only one trade per Asian session or multiple.
bufTicks: Extra margin for the SL beyond the signal candle.
2 — Detecting the Asian Session
The script checks if the candle’s time is inside the first range (sess1) or inside the second range (sess2).
While inside the Asian session, it updates the current high and low.
When the session ends, it locks in these levels as rangeHigh and rangeLow.
3 — Step 1: Detecting the Initial Breakout
Bullish breakout → close above rangeHigh → flag breakoutUp is set to true.
Bearish breakout → close below rangeLow → flag breakoutDown is set to true.
No trade yet — this is just the breakout signal.
4 — Step 2: Waiting for the Retest
If a bullish breakout occurred, wait for the price to return to or slightly below rangeHigh and then close back above it.
If a bearish breakout occurred, wait for the price to return to or slightly above rangeLow and then close back below it.
5 — Entry & Exit
When the retest is confirmed:
strategy.entry() is triggered.
SL = behind the retest confirmation candle (with optional bufTicks margin).
TP = entry price ± RR × risk size.
If onePerSess is enabled, no further trades happen until the next Asian session.
6 — Chart Display
Green line = locked Asian session high.
Red line = locked Asian session low.
Light blue background = active Asian session hours.
Trade entries are shown on the chart when retests occur.
sess1 & sess2: The two time ranges that define the Asian session (e.g., 20:00–23:59 and 00:00–08:00).
Important: format is HHMM-HHMM.
rr: The risk/reward ratio (default = 3.0, meaning TP = 3× risk size).
onePerSess: Toggle to allow only one trade per Asian session or multiple.
bufTicks: Extra margin for the SL beyond the signal candle.
2 — Detecting the Asian Session
The script checks if the candle’s time is inside the first range (sess1) or inside the second range (sess2).
While inside the Asian session, it updates the current high and low.
When the session ends, it locks in these levels as rangeHigh and rangeLow.
3 — Step 1: Detecting the Initial Breakout
Bullish breakout → close above rangeHigh → flag breakoutUp is set to true.
Bearish breakout → close below rangeLow → flag breakoutDown is set to true.
No trade yet — this is just the breakout signal.
4 — Step 2: Waiting for the Retest
If a bullish breakout occurred, wait for the price to return to or slightly below rangeHigh and then close back above it.
If a bearish breakout occurred, wait for the price to return to or slightly above rangeLow and then close back below it.
5 — Entry & Exit
When the retest is confirmed:
strategy.entry() is triggered.
SL = behind the retest confirmation candle (with optional bufTicks margin).
TP = entry price ± RR × risk size.
If onePerSess is enabled, no further trades happen until the next Asian session.
6 — Chart Display
Green line = locked Asian session high.
Red line = locked Asian session low.
Light blue background = active Asian session hours.
Trade entries are shown on the chart when retests occur.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.
Script open-source
In pieno spirito TradingView, il creatore di questo script lo ha reso open-source, in modo che i trader possano esaminarlo e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricorda che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.