Planned Pending Orders

Planned Pending Orders
Download ALL MT4 scripts (241)
YouTube Video Thumbnail

Similar MetaTrader Tools

Planned Pending Orders

Info

The Planned Pending Orders is a Script for MetaTrader 4 that overviewthe script will open limit pending orders according to named horizontal lines in the chart you have to draw before. When finished drawing you drag and drop the script onto the chart.

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 Planned Pending Orders

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

OverviewThe script will open limit pending orders according to named horizontal lines in the chart you have to draw before.

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: Send Pending Order - another powerful script for MetaTrader 4 traders.

Overview
The script will open limit pending orders according to named horizontal lines in the chart you have to draw before. When finished drawing you drag and drop the script onto the chart. Before the orders get executed you can change the aspired risk. Right before the execution you will get an info dialog with the calculated risk where you get asked if you really want to execute the order.

Also recommended: Delete All Pending Orders in a row - similar script with strong performance on MetaTrader 4.

Drawing lines
The following two horizontal lines are required to let the script execute a trade:

Entry price line, name it like "entry_#" example: entry_1

Stoploss line, name it like "sl_#", example: sl_1The takeprofit line is optional:

Takeprofit line, name it like "tp_#", example: tp_1
You can define lines for up to 4 orders.
Always start with 1 and for following orders increase the number. If you have created lines for more then one order then keep in mind that the entry price or the stoploss will be taken over from the first order if it is not set in the current order. So for example you are able to set the takeprofit only for order 2 because entry and stoploss will be taken over from order 1.
In the example we will let the script execute two sell limit orders with same entry and sloploss but different takeprofit. In the following screenshot you can see the created horizontal line for the entry, named entry_1. To not getting confused with the lines I gave them different colors for the screenshots.
Now we set the stoploss line named sl_1 for order 1:
And takeprofit for order 1:
And takeprofit for order 2 (underneath tp_1):
Start the script
Drag and drop the script on the chart when you are finished with drawing the lines.
Parameter aspired risk
When setting the aspired risk (default value: 0.005 = 0.5%) it is taken as a factor of your account balance if it is set to a value below 0.1. Example: If your account balance is 10000 EUR right now and you want to enter a trade with an aspired risk of 0.01, the aspired risk is 100 EUR in money (1% of the account). If you set the aspired risk to 0.1 or higher it will be taken as money amount. The calculated approximate risk differs from aspired risk according to account size and trade setup. You will see it printed out in a message box where you have to confirm to execute the trade(s).
For the example we set 0.01 which is 1%:
Confirm the trade
After clicking OK in the parameters dialog the following dialog with a short conclusion of the trade is been shown:
When confirming the dialog with OK the orders will be created:
If anything does not work properly please check the Expert tab in the lower Terminal window for any error messages (auto trading need to be allowed).

You may also like: Close Pending Orders. mq4 - excellent alternative for script users on MetaTrader 4.


Leave your opinion, ask a question, share some knowledge

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.
RobotFX does not own any of the code provided on this platform. All tools are freely available on the internet; we simply index and re-offer them for download. We are not responsible for any financial losses that may occur. Trading responsibilities rely solely on the traders downloading and using the displayed Expert Advisors, indicators, and scripts. These tools are provided for educational purposes only and may require modification or optimization to align with a trader's specific strategy or needs.
© ROBOTFX - Best MetaTrader Expert Advisors & Indicators