OPEN-SOURCE SCRIPT
PSOL 01 Donchian Channels

PSOL 01 DC is a Trend Following strategy designed for VN30F1M (Vietnamese Stock Index Futures), built with Pine Script v5.
📌 Indicators used: Donchian Channel (20 periods) + SMA(200) trend filter (optional)
📐 Entry Rules:
- Long: Close breaks above the upper band of Donchian Channel (20) → entry at next bar open
- Short: Close breaks below the lower band of Donchian Channel (20) → entry at next bar open
🚪 Exit Rules:
- Stop Loss: configurable points from entry (default 10 pts)
- Take Profit: configurable points from entry (default 20 pts) — optional, can be disabled
- Reverse: position flips automatically when the opposite breakout signal fires
- End of Session: all positions closed at the first bar outside the session window
⏰ Time Filter:
Built-in session filter to avoid ATO (8:45–9:00) and ATC (14:30–15:00) periods.
Default session: 9:00 – 14:30. Start and end time are fully configurable via inputs.
🔧 Trend Filter (optional):
SMA(200) slope filter — Long only when SMA is rising (Bull), Short only when SMA is falling (Bear).
When disabled, the system runs as a continuous reversal engine: every Donchian breakout flips the position, with no time out of the market.
📍 Recommended for: VN30F1M intraday traders
🔗 Community: zalo.me/g/jvaykb078
📌 Indicators used: Donchian Channel (20 periods) + SMA(200) trend filter (optional)
📐 Entry Rules:
- Long: Close breaks above the upper band of Donchian Channel (20) → entry at next bar open
- Short: Close breaks below the lower band of Donchian Channel (20) → entry at next bar open
🚪 Exit Rules:
- Stop Loss: configurable points from entry (default 10 pts)
- Take Profit: configurable points from entry (default 20 pts) — optional, can be disabled
- Reverse: position flips automatically when the opposite breakout signal fires
- End of Session: all positions closed at the first bar outside the session window
⏰ Time Filter:
Built-in session filter to avoid ATO (8:45–9:00) and ATC (14:30–15:00) periods.
Default session: 9:00 – 14:30. Start and end time are fully configurable via inputs.
🔧 Trend Filter (optional):
SMA(200) slope filter — Long only when SMA is rising (Bull), Short only when SMA is falling (Bear).
When disabled, the system runs as a continuous reversal engine: every Donchian breakout flips the position, with no time out of the market.
📍 Recommended for: VN30F1M intraday traders
🔗 Community: zalo.me/g/jvaykb078
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.