HeWhoMustNotBeNamed

BuyTheDip - Ultimate

This is the ultimate and final version of BuyTheDip strategy. Any further updates done to this strategy will be updated in this script. Since, this is the version I personally use for my trades, I decided to make it subscription based. Please contact me if you are interested in supporting me for enhanced strategy.

Concept here is to identify deep pullbacks of an up-trending instruments and get into it. Multiple standard deviation Bollinger bands or Keltner Channel are used to achieve this. Difference between adjacent lines of multi-bands create state. States below Bollinger band middle are considered as negative states whereas the ones above are considered as positive states.

Stop limit orders are placed whenever price goes into state less than MinStateDip. If price keeps moving down, stop limit orders get updated with lesser target - thus acts as trailing buy order.

Enhancements on top of free version include:

  • Advanced trailing based on steps (Using delayed trailing mechanism)
  • Use of secure security to avoid repainting on higher time-frame conditions
  • Added option of using Keltner Channel along with Bollinger Bands
  • Added ability to trigger signals even above SMA by setting MinStateDip(State 0)
  • Ability to use custom standard deviation/atr for Bands by using parameters Std Dev/ATR Start and Std Dev/ATR Step

Input parameters are explained as below:

Bollinger Band /Keltener Channel Parameters

  • Std Dev/ATR Start and Std Dev/ATR Step - Used for deriving 7 Std deviations/ATR for creating of multi band.
  • BB/KC Periods - Periods for calculation of bands
  • Channel Type - Select either Bollinger band or Keltner Channel. Strategy so far is optimized to use Bollinger Bands . Keltner Channel can be used to generate more entry signals with lesser Periods.

Entry Parameters
  • MinStateDip - Defines how much drop is considered as dip. Default value of 0 is optimal for most of the cases.
  • ConsiderYearlyHighLow - Past year highs and lows are considered in making decision whether to buy on pullback. If price is trading below previous year high and if there is no clear trend from past years, signals will be ignored.
  • ConsiderNewLongTermHighsLows - Checks if price is making new highs every now and then.
  • ConsiderMAAlignment - Checks if moving averages of type MAType are aligned in past LoopbackPeriod bars signifying drop from significant uptrend. Disabled by default as part of optimization.

Strategy may still generate soft signals on the chart if entry criteria based on above conditions fail (These are shown in gray/ silver as buy and stop targets). But, these are lower probability trades.

* Example of soft signal look like this:

Trailing Stop/ATR parameters
  • PvtLen - At present pivot high lows based on pivot length are plotted but not used in the strategy. We may include this for trailing stops in future if found to be enhancing the strategy.
  • AtrLength and AtrMult are used for calculating trailing stop. AtrMultTarget is used for calculating target state for delayed stops. Delayed stop is used only when TrailAfterTarget is checked.
  • TrailAfterBars is used for delaying the trail. Once buy order is triggered, stop loss will not be trailing for this number of bars.

Exit Signal Parameters
  • If ExitOnFailureSignal is checked, exit signals are generated when price drops by TargetStopStateDiff from its maximum state based on the multi-bands. This helps in exiting from stagnating instruments after a strong trend.

Display Parameters
  • ShowTargetLevels is checked by default. Displays buy targets and stops
  • ShowPreviousTargets is used for displaying historical signals. Enabling this may show lots of overlapping signals as new signals are generated on every bar during deep pullbacks.
  • HideBands if you want the chart to look clear.

Free version of the strategy can be found here:

Please note: Success of trading strategy also depends on initial screening and selection of right instruments as no shirt fit all size. This strategy is intended for long term trend following. Before requesting for subscription, I strongly recommend using free versions of the strategy and make sure if this suits your trading style. Trade well. Trade with proper risk management :)
Phát hành các Ghi chú: Update option to enter custom BB Moving Average type.
Phát hành các Ghi chú: Resolve lookahead errors
Phát hành các Ghi chú: calc_on_order_fills set to false for resolving repainting issues
Phát hành các Ghi chú: Added optional moving average supertrend condition - which has positive impact on reducing draw-downs.

Please PM me if you need access to any invite only scripts.

Join tradingview: https://www.tradingview.com/gopro/?share_your_love=sudh
Tập lệnh chỉ hiển thị cho người được mời

Quyền truy cập vào tập lệnh này bị hạn chế đối với người dùng được tác giả ủy quyền và thường yêu cầu thanh toán. Bạn có thể thêm nó vào mục yêu thích của mình, nhưng bạn sẽ chỉ có thể sử dụng nó sau khi yêu cầu sự cho phép từ tác giả. Liên hệ HeWhoMustNotBeNamed để thêm thông tin, hoặc làm theo hướng dẫn của tác giả bên dưới.

TradingView không đề xuất trả tiền cho một tập lệnh và sử dụng cho đến khi bạn hoàn toàn tin tưởng tác giả và hiểu cách thức hoạt động của tập lệnh. Trong nhiều trường hợp, bạn có thể tìm thấy một giải pháp thay thế nguồn mở miễn phí trong Thư viện Công cộng của chúng tôi.

Hướng dẫn của tác giả

Please PM me if you would like to get access to this script

Bạn muốn sử dụng tập lệnh này trên biểu đồ?

Cảnh báo: vui lòng đọc trước khi yêu cầu quyền truy cập.