Pending Order
This software component for MetaTrader 4 is built to enhance the capabilities of your trading environment. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Pending Order
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.
Description & Settings
Pending Order is an order that will be executed if the price touches a point that we specify, in other words open pending order means ordering to open a position at a certain price level. So if price hits a predetermined level, then automatically we have an open trading positions.
At EA, there are 6 kinds of order types:
Type 0 = Buy
Type 1 = Sell
Type 2 = Buylimit
Type 3 = Selllimit
Type 4 = Buystop
Type 5 = Sellstop
6 kinds of type of the order, there are four kinds of types of pending orders available. We will discuss the type of pending orders one by one and then we will immediately make the action EA.
1. Buy limit
Buy limit order is an order running whereas under the price, so in order that needs change the structure is a type of order and the price is booked.
Note on buy order below:
No part of the underlined part that must be changed in order Pending such use.
And the part that also must be considered is the
D
istance
between the current prices at the booked price for pending orders
Thus the following:
It could also be written:
2. Sell limit
Sell limit orders are orders above prices are moving.
As in order buy limit essential part is the
type of order and distance
, so please compare the different
It could also be written:
3. Buy stop
Buy stop orders are orders above prices are moving.
Please observe and compare with the previous type
It could also be written:
4. Sell stop
Sell stop order is an order under the ongoing price.
Please observe and compare with the previous type
It could also be written:
As I promised at the beginning, we will try to make EA simple by using all the four pending!
But before we make we have to make an order according to the number of filter its type, I provide a to facilitate the script that is a function to calculate the type of order
How to call
Example:
For Buy limit
Or
For Sell limit
Or
Continue to EA ....
But I've tried to make EA simply to better understand
please observe
The EA runs as follows:
Hopefully useful, please comment
Happy profit, good luck, and have a nice day...