OPEN-SOURCE SCRIPT

2% Averaging Buy-Sell Strategy

50
📘 Strategy Description: 2% Averaging Buy-Sell Strategy
This strategy is designed to simulate an averaging-down and scaling-out approach based on percentage-based price movements.

Entry Logic (Buy):

Initial buy of 1 lot is triggered at the start of the strategy.

Every time the price drops by 2% from the last executed buy level, the strategy adds 2 more lots.

Exit Logic (Sell):

When the price rises 2% from the last buy level, the strategy sells 2 lots.

Selling continues in batches of 2 lots as long as the upward movement continues and lots are available.

Core Idea:

This is a dynamic averaging system that increases exposure during drawdowns and reduces it during rallies, aiming to capture mean reversion or trend reversals.

Customizable Inputs:

Initial lot size

Additional lot size

Percentage threshold (default 2%)

⚠️ Note: This strategy is for simulation/backtesting purposes. It does not account for slippage, fees, or real-world order execution conditions.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.