OPEN-SOURCE SCRIPT

Donchian Channels strategy with backtest

已更新
Here's another trading strategy for you. This one is based on the standard Donchian Channels.

This one will - by default - wait for 2 consecutive higher highs (or lower lows) before taking a position. This can be disabled so the script will take a new trade without waiting for the 2nd high or low.
This is useful to avoid getting into a trade when market makers are aiming for a swing-failure pattern (= taking out stop/losses below the last low or above the last high)

For people who don't like to short, there's also the option to exclude shorts.

Enjoy!
發行說明
Code cleanup + change of backtesting with 100% of equity to 10% to meet tradingview house roules.
發行說明
Added buy, sell and close labels. The close label will show up when you don't want to go short.
發行說明
Fixed incorrect opening of the short positions.
Please rerun any backtest you have done, because this fix will affect your previous results.

Many thanks to liuqiba for pointing out this bug ;-)
Donchian Channels (DC)

開源腳本

在真正的TradingView精神中,這個腳本的作者以開源的方式發佈,這樣交易員可以理解和驗證它。請向作者致敬!您可以免費使用它,但在出版物中再次使用這段程式碼將受到網站規則的約束。 您可以收藏它以在圖表上使用。

想在圖表上使用此腳本?


更多:

免責聲明