Download MetaTrader 5
To add comments, please log in or register
Track all payments in your profile. It is easy!
Macxii
29
Macxii 2014.04.25 14:01 

Hi Guys! Thank you for clicking to this topic!

I need help to create an EA that makes pending orders automatically with a few parameters. The robot is very simple, and I hope it will be just as easy to make! Thank you!


Here is the description togheter with a picture of I how imagine this to be.


Pending Robot graph

Pending robot


Target – A target is placed. This will be the starting point for the robot. The distance from the target and the current price will be the place where the pending orders will be placed. Lets use and example of 200 pips. The target is either above or below the current price of 200 pips.


The robot will then evenly spread as many pending orders as the parameter permits. Each pending order will have its own Take profit. This will be a parameter aswell in the robots settings.


Lets say the parameter is set to 10 ( pending order TP) That means that there will fit 20 pending orders each with a profit target of 10 pips between the Robots Target level and current price range of 200 pips.


But there are some more parameters that can restrict this.


Distance between pending orders

This parameter tells the robot how far inbetween the pending orders are going to be. If this parameter is set to 0, and the TP for each pending order is set to 10. Then the start of each pending order is going to be at the TP of the subsequent next pending order.

But if that parameters is set to lets say 5 pips and TP at 10. Then there will be a distance between the pending orders. A pending order with TP 10 and distance set to 5, will be a total of 15 pips in volume. So in the previous example of 200 pips. The robot will then place 200 / 15 pips pending orders.


Max allowed pending orders at the same time

This tells the robot how many pending orders it can make at the same time. If the Target is lets say 500 pips. The robot will do 500 / 15 pending orders using our previous settings from the last example. But if this parameter is set to maybe 10 then only 10 pending orders will be place from the current price. This is important. So that the pending orders till not be placed from the target. But rather from the current price action. When the Price hits the target level, the robot will stop making new trades.


Max allowed open trades at the same time

This is a parameter that tells how many open trades a currency pair can have at the same time. If the max allowed open trades are reached then no more pending orders will be made, until one or more orders are filled. Making sure that the maximum level is never broken.


Lot size

How big each pending order is


Cancel all pending orders

a separate script you can drag to the currency pair and delete all pending orders.



A Note

A new pending order can only be made as long as all conditions are met and from either the ending or start of a previous order. The distance between pending orders parameter tells the robot where the first order going to take place on the chart. Lets say we enter a target price in the parameter Target, or somehow tell the robot, this is where you are going to end your trading. From there the robot will proceed to current price. And the distance between pending orders will be the first indicator as to when the first pending order takes place. When the script/robot is first dragged to the chart with all the settings in place. It will then make the first pending order at a distance equal to that parameter distance between pending orders. And it will always make new orders at those same distances. This is to prevent having multiple pending orders close together in the same range. Lets say price jumps up and down around 10-18 pips. This will only be one pending order even if the price jumps up and down. Price has to break the parameters of Pending order TP and distance between orders in order to make a new pending order.


The purpose of this EA is to scalp with, but setting up new pending orders along the way torwards the target if the price moves away from the target. If price hits one pending order but does not finish that order, and instead moves back up away from the target, a new pending order will be made if all conditions are met.


I hope the picture and text makes sense. If there are any EAs out there like this, that works with pending orders, please let me know! Or if you can make one for me, please let me know aswell!

My mail is Macxii@gmail.com

Id be happy to explain more and look forward to creating this with you! Much appreciated!

Yasir Masood
5043
Yasir Masood 2014.04.25 17:49  

i have already tried this type of strategy and the results are not that good.it requires more strict parameters.

https://www.mql5.com/en/job/14884 

MQL5 jobs: Pending Orders Based EA
MQL5 jobs: Pending Orders Based EA
  • www.mql5.com
I need an EA which will work on the base of pending buy and sell orders placed above and below the market.There will be 10 pending orders placed at the each side of market all the time.Suppose if market opens the first buy order and remaining orders are 9 , EA will place one more buy stop at the top. first order will at a distance of 20 pips at both sides.First order distance should be editable in the settings. Orders inner distance will be 20 pips.inner distance should be editable in the...
/
To add comments, please log in or register