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
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuyla, bu komut dosyasının mimarı, yatırımcıların işlevselliğini inceleyip doğrulayabilmesi için onu açık kaynaklı hale getirdi. Yazarı tebrik ederiz! Ücretsiz olarak kullanabilseniz de, kodu yeniden yayınlamanın Topluluk Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, alım satım veya diğer türden tavsiye veya öneriler anlamına gelmez ve teşkil etmez. Kullanım Koşulları bölümünde daha fazlasını okuyun.