Greg_007

Donchian Channels strategy with backtest

Greg_007 Zaktualizowano   
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!
Informacje o Wersji:
Code cleanup + change of backtesting with 100% of equity to 10% to meet tradingview house roules.
Informacje o Wersji:
Added buy, sell and close labels. The close label will show up when you don't want to go short.
Informacje o Wersji:
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 ;-)

Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?