OPEN-SOURCE SCRIPT
2% Averaging Buy-Sell Strategy

📘 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.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
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.