This little EA is designed to protect your account from unexpected drawdowns and/or lock in profits.
Example Information Panel
The parameters should be self-explanatory, but for clarification:
Magic Number to Monitor for
Date of opening balance
The date and time that EA is to calculate the initial balance from.
How often the EA checks the equity (in seconds).
The profit point at which the EA will be triggered (e.g. 10% profit or $100 profit, depending on the Close Basis).
If set to zero, the EA will not check for a profit amount, and will never close while the account is in profit.
The loss point at which the EA will be triggered (e.g. 5% loss or $100 loss, depending on the Close Basis).
If set to zero, the EA will not check for a loss amount, and will never close while the account is in loss. THIS IS NOT RECOMMENDED!
Whether or not to include commission ans swap fees when calculating the current profit amount.
Close based on date/time?
Whether or not to close all trades (regardless of profit or loss) at a specific date and time.
Date and time to close
Close pending orders?
Whether or not to close pending orders when the close is triggered.
When set to true, the EA will disable AutoTrading when triggered.
Enable trailing profit?
Whether or not to enable the trailing profit feature.
Trailing profit trigger level
The point (in either percentage of opening balance or a specific amount – see Close values parameter) at which the trailing profit is triggered.
Trail profit by
The distance behind the current profit the trailing profit should be kept at.
Trailing profit step
The amount by which the trailing profit is to be moved each time.