e-v trailing by profit expert advisor
Info
The e-v trailing by profit expert advisor is a Script for MetaTrader 4 that e-v trailing by profit expert advisor is designed for virtual trailing of a trader's aggregated position based on its total profit in deposit currency. an aggregated position refers to one or more positions across one or more trading instruments.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Script works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Scripts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use e-v trailing by profit expert advisor
1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.
2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.
3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.
4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."
Frequently Asked Questions
Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.
Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.
Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.
What this tool does
e-v trailing by profit expert advisor is designed for virtual trailing of a trader's aggregated position based on its total profit in deposit currency.
Typical Use Case
This Script excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Script works on MetaTrader 4. Place the file in the MQL4/Scripts folder and restart the terminal.
Description & Settings
Related: e-so trailing expert advisor - another powerful script for MetaTrader 4 traders.
e-v trailing by profit expert advisor is designed for virtual trailing of a trader's aggregated position based on its total profit in deposit currency.Also recommended: e-move slt pby mouse: intuitive stop loss and take profit management - similar script with strong performance on MetaTrader 4.
an aggregated position refers to one or more positions across one or more trading instruments.
please note that the expert advisor does not set real stops. the stop-profit level is maintained internally.
the expert advisor allows filtering of positions by trading instrument name, operation type (buy/sell), and position identifier (magicnumber).
configurable parameters:
numberaccount
=0 - trading account number. this parameter specifies the trading account on which the expert advisor is allowed to operate. it serves as a safeguard against accidental operation on the wrong account.
symbol
= "" - trading instrument name. "" means any instrument, "0" means the current instrument. you can also specify a particular instrument name, e.g., "eurusd". used to filter positions by trading instrument name.
operation
=-1 - operation type identifier. -1 means any operation, 0 means op_buy, 1 means op_sell. used to filter trades, allowing trailing of all operations, only buys, or only sells.
magicnumber
=-1 - position identifier. -1 means any magic number. used to filter positions by magic number.
trailingstart
=0 - trailing start level. this is the profit level at which trailing will begin. this level is specified in deposit currency. both positive and negative values can be used.
trailingstop
=47 - fixed trailing stop in deposit currency.
trailingstep
=1.5 - trailing step in deposit currency.
showcomment
=true - display comments on the current chart.
printenable
=true - enable printing to the journal.
allmessages
=true - log all messages. if set to false, only the first message in a series of identical messages will be logged.
usesound
=false - use sound alerts.
soundsuccess
="ok.wav" - name of the sound file to play upon successful completion of a trading operation.
sounderror
="timeout.wav" - name of the sound file to play in case of an error during a trading operation.
slippage
=2 - price slippage in points.
numberoftry
=3 - number of trading attempts in case of errors during trading operations.
You may also like: close all positions by total profit or loss - excellent alternative for script users on MetaTrader 4.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#define BEGIN_PROFIT -999999999 // Начальный профит
extern string _P_Expert = "---------- Параметры советника";
extern int NumberAccount = 0; // Номер торгового счёта
extern string symbol = ""; // Торговый инструмент
extern int Operation = -1; // Торговая операция:
extern int MagicNumber = -1; // Идентификатор
extern double TrailingStart = 0; // Уровень профита - Стартовый уровень трала
extern double TrailingStop = 47; // Фиксированный размер трала в валюте депозита
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.