Skip to content
All library documents

Buying Price Pullbacks with Profit Targets and Time-Based Recovery Exits

Article TradingView scripts

Summary

This long-only strategy tracks the highest closing price seen and triggers buys when the close falls by a configurable percentage from that peak. Position size is based on a selected share of strategy equity, adjusted by a leverage input. It exits when price reaches a profit target measured from the average entry price. A separate time-conditioned rule waits until a holding period has elapsed and then closes a losing position once price recovers to a specified loss threshold.

The script exposes date, drawdown-recovery, sizing, and leverage settings, and includes an optional monthly performance table. That table records realized trade returns and drawdown statistics, with a note that its closed-equity drawdown can differ from the platform tester’s open-equity measure. The document provides no asset-specific test results or evidence that the chosen thresholds are robust. It also does not specify safeguards such as a stop that caps losses before the recovery condition is met; a prolonged decline could therefore leave capital tied up or create substantial losses. Results would depend on the instrument, chart timeframe, costs, and configuration.

Key ideas

  • The buy trigger compares the current close with the highest close recorded so far.
  • The profit-taking level is a multiple of the average entry price.
  • After a configured holding period, a losing position may be closed after recovering to a loss threshold.
  • Position size depends on strategy equity, a capital percentage, and the leverage setting.
  • The included performance table focuses on realized returns, which may differ from open-equity drawdown measures.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.