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
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。