OPEN-SOURCE SCRIPT

Trend Following with Donchian Channels and MACD

Actualizado
This is a trend following system based on the Donchian Channels. Instead of using a simple moving average crossover, this system uses the MACD as the trendfilter:

Long positions:
* Price makes a new 50 day high,
* The MACD-line crosses above or is above the Signal-line.
* Both the MACD and the Signal-lines are above the zero-line.

Short positions:
* Price makes a new 50 day low,
* The MACD-line crosses below or is below the Signal-line.
* Both the MACD and the Signal-lines are below the zero-line.

Stoploss:
The initial and the trailing stoploss are 4 ATRs away from the price.



Notas de prensa
Removed the MACD from the chart.
Changed entrycondition3 = macd and signal >/< hist to 0
Increased the pyramiding amount to 4 from 3
Notas de prensa
-
Notas de prensa
Replaced the multiplier in the position size formula with syminfo.pointvalue in order to get a more accurate position size.
Notas de prensa
-
Notas de prensa
Reverted the pyramiding setting from 4 back to 1 to keep the system simple and the max drawdown low.
Added a visual ATR trailing stop, so you know where to put your stoploss.
Notas de prensa
Adjusted the position size formula.
Improved the stoploss multiplier.
ATRbreakoutbreakoutsignalbreakouttradingcrossoverMoving Average Convergence / Divergence (MACD)Trend AnalysistrendfollowingVolatility

Script de código abierto

Siguiendo fielmente el espíritu de TradingView, el autor de este script lo ha publicado en código abierto, permitiendo que otros traders puedan entenderlo y verificarlo. ¡Olé por el autor! Puede utilizarlo de forma gratuita, pero tenga en cuenta que la reutilización de este código en la publicación se rige por las Normas internas. Puede añadir este script a sus favoritos y usarlo en un gráfico.

¿Quiere utilizar este script en un gráfico?


"Mastering the Market Dance with Elegance and Cunning 🎩📈 | Where the Velvet Glove Conceals the Sharpest Moves ⚔️💰"
También en:

Exención de responsabilidad