OPEN-SOURCE SCRIPT

Donchian Trend V1

מעודכן
The Donchian Trend strategy is a trend-following approach that uses the Donchian Channels indicator to identify potential entry and exit points in a security. The Donchian Channels are formed by taking the highest high and the lowest low prices over a specified period and plotting them as upper and lower channels around the current price. The width of the channels indicates the level of volatility in the market.

In this strategy, the Donchian Channels are used as a trend filter to determine the direction of the market. When the price is above the upper channel, it suggests an uptrend, and when the price is below the lower channel, it indicates a downtrend. The length of the Donchian Channels is a key parameter in the strategy, as it determines the look-back period for identifying the high and low prices.

Additional Logic: To further refine the entry and exit signals, The script uses two moving averages, a fast one (MA5) and a slow one (MA45), to identify trends and generate trading signals. When the fast moving average crosses above the slow moving average, a buy signal is generated, indicating that the market is trending upwards. Conversely, when the fast moving average crosses below the slow moving average, a sell signal is generated, indicating that the market is trending downwards.

Evaluation: The script was backtested on historical price data for the [Insert your chosen trading pair here] pair. The backtest results showed that the script was able to generate a net profit of [Insert your backtest net profit here], with a profit factor of [Insert your backtest profit factor here] and a Sharpe ratio of [Insert your backtest Sharpe ratio here]. The script also includes metrics such as the number of winning and losing trades, the average trade, and the largest winning and losing trades.
The strategy is evaluated based on its net profit, gross profit, gross loss, max run-up, max drawdown, buy & hold return, Sharpe ratio, Sortino ratio, and profit factor. The parameters used in the backtest include a Donchian Channel length of 42, which corresponds to a weekly time with divide of 4h time frame, and a short-term MA of 5 and a long-term MA of 45 for more accurate entry and exit signals.

Disclaimer: This script is for educational and research purposes only and should not be used for trading with real money without further testing and validation. Past performance is not indicative of future results.
הערות שחרור
There are some coding upgrades on the script.
Feel free to use it, thank you in advance guys.
הערות שחרור
In oder to increase the profit % the ema filter was added in strategy, if you have any applicable sugestions to decrease the drawdown feel free to write us guys, thank you in advance.
הערות שחרור
Some minor adjustments was made.
הערות שחרור
Price based trailing stop loss was ( similar to donchian base line ) added on the strategy in order to increase profitability and decrease the dragdown.
Hope you are enjoying the results guys :D There are lots of thing needs to be improved we are aware of it and we appreciate if you write us your comments, thank you in advance.
הערות שחרור
Some codes was updated and macd was added as a trend filter too , look for results ...
הערות שחרור
Hello guys,
The strategy is refined for visual understanding we also added a three limited take profit sections.
Hop you enjoy it and dont forget to like & share , we are also appreciate if you buy us a coffe or beer either way we dont say no to donations :D
Bands and ChannelsdonchianchanneleducationalMoving Averagestrendpattern

סקריפט קוד פתוח

ברוח TradingView אמיתית, מחבר הסקריפט הזה פרסם אותו בקוד פתוח, כך שסוחרים יוכלו להבין ולאמת אותו. כל הכבוד למחבר! אתה יכול להשתמש בו בחינם, אבל השימוש החוזר בקוד זה בפרסום כפוף לכללי הבית. אתה יכול להכניס אותו למועדפים כדי להשתמש בו בגרף.

רוצה להשתמש בסקריפ זה בגרף?

כתב ויתור