OPEN-SOURCE SCRIPT

BuyHigh-SellLow Strategy

Updated
Yeah. You read it right. It's not a mistake. It is buy high and sell low strategy.

Main entry condition is to buy when price hits 40 day Donchian channel top. This is combined with my other regular filters which are aligned moving average and new high/low filter and yearly high/low filter.

Exit condition can be based on two things:

  • Donchian channel : Set appropriate DonchianExitLength. Lower line of donchian channel acts as trailing stop.
  • ATR Based trailing stop : Select appropriate ATR multiplier and length.


What a surprise!! You can buy high, sell low and still make money.
Release Notes
Remove calc_on_order_fills to avoid lookahead warning.
buyhighselllowDonchian Channels (DC)Trend AnalysisVolatility

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer