personal assistant - the next generation
Info
The personal assistant - the next generation is a Expert Advisor for MetaTrader 4 that new functionalities / improvements: allows the user to set pending orders (buy stop, sell stop, buy limit, sell limit) with easy to use, interactive process. allows the user to preset stop loss and/or take profit before the instant order is set with easy to use, interactive process (stop loss and take profit for pending orders are mandatory because of safety reasons).
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 4 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL4/Experts folder via File ? Open Data Folder in MetaTrader 4.
How to Install and Use personal assistant - the next generation
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
new functionalities / improvements: allows the user to set pending orders (buy stop, sell stop, buy limit, sell limit) with easy to use, interactive process.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 4.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 4. Place the file in the MQL4/Experts folder and restart the terminal.
Description & Settings
Related: Order Management Assistant - another powerful expert for MetaTrader 4 traders.
new functionalities / improvements:
allows the user to set pending orders (buy stop, sell stop, buy limit, sell limit) with easy to use, interactive process.
Also recommended: personal assistant - similar expert with strong performance on MetaTrader 4.
allows the user to preset stop loss and/or take profit before the instant order is set with easy to use, interactive process (stop loss and take profit for pending orders are mandatory because of safety reasons).
displays % of capital lost for set stop loss and % of gain for set tp.
profit/loss sum now includes commissions and swaps.
ea is now completely unique for every instance of ea (you can run several
personal assistant the next generation
without interference).
function to abort process of setting order.
fix: stop loss sum and take profit sum weren't calculated accurately, this is now fixed. if you have downloaded pa before and have this problem, please download it once more.
example of setting buy stop order - description of process:
personal assistant the next generation
is attached to chart and chart is in focus (selected).
push key 6 on your keyboard.
select entry price with a click of a left mouse button on chart (example: if you click at price level 1.0901, that will be the entry price).
select stop loss with a click of a left mouse button on chart.
select take profit with a click of a left mouse button on chart.
if entry price, stop loss and take profit were set correctly, an order will be set, if not, then you will see an alert pop-up.
this process is the same for all pending orders and similar for instant orders (depending on your user settings). process can be aborted with a press of key 0 up to the moment when the last price level was selected.
pa ea will also show you instructions on chart, to guide you. instruction is set close to last bar on the chart and last price level. text will update through the process and disappear after it.
example:
image shows display of pa ea on the chart:
personal assistant functions are:
display ea name and id (to separate more than one personal assistant and to easily know which one is attached to the chart);
display symbol and timeframe;
display leverage for account;
display lot volume value currently selected;
display tick value for lot volume value (in deposit currency);
display margin required for new order based on lot value currently selected;
display current spread;
display profit/loss sum for all orders opened by this ea, calculated in deposit currency (
new: commissions and swaps included
);
display number of orders currently active for this ea;
display take profit sum — if opened orders have set tp, then it displays average tp, if tp isn't set, then it displays 0, if tp is set for some orders and not for all, it will calculate average only for positions with tp set (
new: number of orders with tp set and % of potential gain based on account balance
);
display stop loss sum — if opened orders have set sl, then it displays average sl, if sl isn't set, then it displays 0, if sl is set for some orders and not for all, it will calculate average only for positions with sl set (
new: number of orders with sl set and % of potential loss based on account balance
);
open buy position with a press of key number 1 with settings ea is currently set to (
new: option to preset stop loss and take profit, user selectable option
);
open sell position with a press of key number 2 with settings ea is currently set to (
new: option to preset stop loss and take profit, user selectable option
);
close positions opened by this ea with a press of key number 3, alert: if conditions of market change rapidly it may not close all orders, so always check opened orders, or push 3 once more;
increase lot volume value with a press of key number 4 — hold button to quickly increase value (
new: self-adjustable amount for different accounts
);
decrease lot volume value with a press of key number 5 — hold button to quickly decrease value (
new: self-adjustable amount for different accounts
);
new: open buy stop position with a press of key number 6, with user selected price entry, stop loss and take profit;
new: open sell stop position with a press of key number 7, with user selected price entry, stop loss and take profit;
new: open buy limit position with a press of key number 8, with user selected price entry, stop loss and take profit;
new: open sell limit position with a press of key number 9, with user selected price entry, stop loss and take profit;
new: abort process of setting order with a press of key number 0;
new: control if stop loss, entry price and take profit are set correctly for selected action, it doesn't take into account provider enforced rules (example: minimum sl distance from entry price).
user input variables:
id — magic number for your ea and for your orders opened by ea;
new: allows placement of pending orders —
if set false, pending orders can't be set;
new: allows input of stop loss for active orders before execution
— if set true, user will have to set stop loss for every instant order before it's executed;
new: allows input of take profit for active orders before execution
— if set true, user will have to set take profit for every instant order before it's executed;
display_legend — shows legend on the chart for buttons/commands (open long, open short, close orders, increase volume, decrease volume);
lotsize — initial volume value;
slippage — slippage for opening and closing orders;
text_size — size of the text displayed on the chart;
text_color — color of text displayed on the chart;
right_edge_shift — position of text on the chart from the right edge of window in pixels;
upper_edge_shift — position of text on the chart from the upper edge of window in pixels and position of row from the previous row.
attention:
use with caution, it's your own responsibility if by accident you open unwanted orders! make sure that you have the right chart selected when inputting commands.
alert me of potential problems, test it on demo first!
You may also like: grid assistant - excellent alternative for expert users on MetaTrader 4.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.00"
#property strict
#property description "this code is educational. feel free to use, modify and upgrade as you wish. visit robotfx.org for professional trading tools"
input int id=3900;
input bool allow_pen_orders=true; // allows placement of pending orders
input bool set_sl = false; // allows input of stoploss for active orders before execution
input bool set_tp = false; // allows input of takeprofit for active orders before execution
input bool display_legend=false; // allows display of action commands
.......
⚠ 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.