Auto TPSL and SL Cover
- Utilitários
- Mr Paveen Asawasuebsakul
- Versão: 1.0
- Ativações: 20
Overview
Auto TPSL is a sophisticated MetaTrader 5 Expert Advisor designed to revolutionize how traders manage their risk and protect profits. This powerful tool automatically sets and adjusts Take Profit (TP) and Stop Loss (SL) levels, eliminating emotional decision-making and ensuring disciplined trading practices. The EA operates through two core systems:
Auto TPSL System
The Auto TPSL system automatically calculates and sets appropriate Take Profit and Stop Loss levels when you open new positions. It offers flexibility through two operational modes: - Position Mode (Averaging): In this mode, the EA treats all positions of the same symbol and direction as a single trading unit. It calculates a weighted average entry price across all positions and applies consistent TP/SL levels based on this average. This is ideal for traders who use averaging or scaling strategies, ensuring all related positions are managed cohesively.
- Transaction Mode: This mode handles each position independently, calculating and applying individual TP/SL levels based on each position's specific entry price. This approach is perfect for traders who prefer precise control over each transaction or run multiple strategies simultaneously.
SL Cover System
The SL Cover system is an innovative profit protection mechanism that automatically secures your gains once a position becomes profitable. Here's how it works: - The system continuously monitors your open positions for profitability
- When a position (or group of positions in Position Mode) reaches your specified profit threshold
- The Stop Loss is automatically adjusted to a new level that ensures you retain a portion of your profit
- As the position continues to gain, the SL can be moved further to lock in more profit
Key Features
- Automatic TP/SL Setting: Sets TP and SL levels automatically upon opening new positions
- Position/Transaction Modes: Choose between averaging all positions or setting individual levels
- Percentage or Pips: Calculate TP/SL based on percentage of entry price or fixed pip values
- SL Cover Protection: Automatically moves SL to protect profitable positions
- Multiple Symbol Support: Works with any symbol and multiple positions simultaneously
Parameters Explanation
Auto TPSL Settings
- TP/SL Mode:
- Position Mode (Averaging): Uses weighted average prices for all positions with the same symbol and direction to calculate a single TP/SL level
- Transaction Mode: Calculates and applies individual TP/SL levels for each position independently
- Value Type:
- Percentage: TP/SL are calculated as a percentage of the entry price
- Pips: TP/SL are calculated as a fixed number of pips from the entry price
- Take Profit Value: The distance for Take Profit, in percentage or pips (depending on Value Type)
- Stop Loss Value: The distance for Stop Loss, in percentage or pips (depending on Value Type)
- Apply to Existing Orders on Startup: When enabled, the EA will apply TP/SL settings to all existing positions when first attached to the chart
SL Cover Position Settings
- Enable SL Cover Feature: Activates the SL Cover protection system
- Cover When Profit Reaches (%): The profit percentage threshold at which the EA will move the Stop Loss to protect profits
- Cover SL Value (%): The percentage above (for Buy) or below (for Sell) the entry price where the new Stop Loss will be placed
How It Works
When Opening New Positions
- The EA detects when a new position is opened
- Based on the selected mode, it calculates appropriate TP/SL levels:
- In Position Mode: Uses weighted average entry price of all positions in the same direction and symbol
- In Transaction Mode: Uses the individual entry price of the new position
- The EA applies the calculated TP/SL levels to the position(s)
SL Cover Protection
- The EA continuously monitors open positions
- When a position (or group of positions in Position Mode) reaches the specified profit percentage:
- For buy positions: SL is moved to entry price + Cover SL Value%
- For sell positions: SL is moved to entry price - Cover SL Value%
- The new SL is only applied if it improves the current SL (moves it closer to the current price)
- In Position Mode, all positions in the same symbol/direction group will receive the same SL adjustment
Example Scenarios
Scenario 1: Position Mode with Percentage Values
- Settings: Position Mode, Percentage, TP=2%, SL=1%
- Result: If you have multiple EURUSD Buy positions, all will have the same TP at 2% above the weighted average entry price and SL at 1% below it
Scenario 2: Transaction Mode with Pip Values
- Settings: Transaction Mode, Pips, TP=20, SL=10
- Result: Each new position will have TP set 20 pips from entry price and SL set 10 pips from entry price
Scenario 3: SL Cover Protection
- Settings: Enable SL Cover=true, Cover When Profit=0.5%, Cover Value=0.1%
- Result: When a position reaches 0.5% profit, SL will be moved to entry price + 0.1% (for Buy) or entry price - 0.1% (for Sell)
Best Practices
- Test the EA in a demo account before using it with real money
- For volatile markets, use larger TP/SL values
- Set the Cover SL Value to at least the amount of your commission to ensure you don't exit with a loss
- Regularly check the Experts tab in the Terminal for any error messages
- Adjust settings based on your trading strategy and risk tolerance