OPEN-SOURCE SCRIPT
ICT Unicorn Strategy [RoboQuant]

What it detects
Structure: uses pivots (ta.pivothigh/low) to build a mini zigzag (A–B–C–D).
“Unicorn” Pattern:
Bull: bullish direction, C below A (protected swing), with a bullish “BRB” candle at B.
Bear: mirrored version.
FVG: searches for a valid gap between candle i and i+2 inside the BRB candle range and greater than 0.05 × ATR (quality filter).
When an FVG appears, it plots boxes/lines (top/bottom of range, protected swing, FVG box).
How it enters
Bull Trigger: a candle opens inside the FVG and closes above the top of the FVG (mitigation + continuation).
SL = protected swing (firstBl.swing, pivot C).
TP = top + (top - swing) * (reward/risk).
Draws Risk and Reward boxes if showTargets=true.
Bear Trigger: mirror setup (opens inside FVG and closes below bottom).
Management & sizing
Sizing: calculates position size = riskAmount / SL distance, capped by maxPositionSize.
RR configurable with risk and reward (default 1:2).
Trailing optional: adjusts TsL using short pivots (lenS).
Trade closes at SL (break of swing) or TP (target reached).
combine: if false, a bull setup cancels a bear setup (and vice versa). If true, both can coexist.
Key parameters
len: pivot sensitivity (structure).
riskAmount and maxPositionSize: risk control.
trail, lenS: trailing logic.
Box colors/visibility (showTargets, colRisk, colReward).
ICT translation
Seeks impulse → FVG → pullback into FVG → expansion, with a protected swing (implicit BOS/MSS via zigzag) and mitigation of imbalance.
The ATR * 0.05 filter avoids micro-gaps without intent.
How I’d use it (quick checklist)
Mark HTF bias (only take bull or bear setups with the trend).
On LTF, wait for a valid FVG inside the BRB candle.
Enter only if a candle re-enters the FVG and closes breaking its edge.
SL at swing C, TP by RR (default 1:2).
Enable trailing only after 1R is reached (optional, tuned via lenS).
Structure: uses pivots (ta.pivothigh/low) to build a mini zigzag (A–B–C–D).
“Unicorn” Pattern:
Bull: bullish direction, C below A (protected swing), with a bullish “BRB” candle at B.
Bear: mirrored version.
FVG: searches for a valid gap between candle i and i+2 inside the BRB candle range and greater than 0.05 × ATR (quality filter).
When an FVG appears, it plots boxes/lines (top/bottom of range, protected swing, FVG box).
How it enters
Bull Trigger: a candle opens inside the FVG and closes above the top of the FVG (mitigation + continuation).
SL = protected swing (firstBl.swing, pivot C).
TP = top + (top - swing) * (reward/risk).
Draws Risk and Reward boxes if showTargets=true.
Bear Trigger: mirror setup (opens inside FVG and closes below bottom).
Management & sizing
Sizing: calculates position size = riskAmount / SL distance, capped by maxPositionSize.
RR configurable with risk and reward (default 1:2).
Trailing optional: adjusts TsL using short pivots (lenS).
Trade closes at SL (break of swing) or TP (target reached).
combine: if false, a bull setup cancels a bear setup (and vice versa). If true, both can coexist.
Key parameters
len: pivot sensitivity (structure).
riskAmount and maxPositionSize: risk control.
trail, lenS: trailing logic.
Box colors/visibility (showTargets, colRisk, colReward).
ICT translation
Seeks impulse → FVG → pullback into FVG → expansion, with a protected swing (implicit BOS/MSS via zigzag) and mitigation of imbalance.
The ATR * 0.05 filter avoids micro-gaps without intent.
How I’d use it (quick checklist)
Mark HTF bias (only take bull or bear setups with the trend).
On LTF, wait for a valid FVG inside the BRB candle.
Enter only if a candle re-enters the FVG and closes breaking its edge.
SL at swing C, TP by RR (default 1:2).
Enable trailing only after 1R is reached (optional, tuned via lenS).
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.