Hi all,
Can anyone help me to modify this EA? The problem this EA is due to it repeat open too many pending order. It can open up to 200 pending order which will exceed MT4 total allow order. Can help to combine into big lot size?
Thank in advance.
From: http://www.forexfactory.com/showthread.php?t=109589
EA set up the 3 buy stop orders and the 3 sell stop orders away in equal increments from a middle starting point.
Then when price triggers the level, the EA place pending orders on the rest of the levels but the one is at.
If it is at a buy level, the EA place pending orders only above that buy level is at with the initial lot size and in the 3 sell levels with double lot size.
If the price is at a sell level, the EA place pending orders only below the sell level is at with the initial lot size and in the 3 buy levels with any double lot size.
No matter where the market moves, when one of the top or the bottom targeted prices is hit, profit will be made. in fact the longer it takes to reach such point, the more money it will make!
Clarification:
As best as I can tell, this what this EA does. Let’s call the value of the increment parameter I, and the current price P. With the default parameters, it sets up 3 buystop orders at P+I, P+2I, P+3I, and 3 sellstop orders at P–I, P–2I, P–3I. Each buystop has a SL at P–4I, and a TP at P+4I; each sellstop has a SL at P+4I and a TP at P–4I.
Translating that into understandable figures, given that INCREMENT = 35, it means that the buystop orders are set at +35, +70, +105 pips from the current price, all with TPs at +140 (from the current price, NOT the entry), and SL at –140. Vice versa for sellstops. So the average return per trade = +70 and the average risk = –210, i.e. a 1:3 RR.
Since the orders are buystop/sellstop, we are averaging UP (pyramiding) into trades, as opposed to averaging down. All initial orders are sized at 1 unit.
Now here’s where the fun starts. When the first buystop order is triggered, 3 more sellstop orders are created, with the same entry points as the initial sellstops, and all with the same TP and SL. Here’s the twist: the new sellstops at –35, –70 and –105 (away from the original price) are sized at 1, 2 and 3 units, respectively. Conversely, if a sellstop gets triggered, 3 new buystop orders are created. An additional 3 orders get added every time an order gets triggered. This ‘expansion’ process continues until the account exceeds its available margin, or until the orders hit their TPs or SLs.
As soon as a TP or SL point is reached, obviously all open orders are closed automatically (because they all share the same TP/SL points), and all pending orders are also immediately deleted. At that same point, the cycle repeats itself, i.e. 3 new buystop, and 3 new sellstop orders, based on the current price, are created. Rinse and repeat.
Can anyone help me to modify this EA? The problem this EA is due to it repeat open too many pending order. It can open up to 200 pending order which will exceed MT4 total allow order. Can help to combine into big lot size?
Thank in advance.
From: http://www.forexfactory.com/showthread.php?t=109589
EA set up the 3 buy stop orders and the 3 sell stop orders away in equal increments from a middle starting point.
Then when price triggers the level, the EA place pending orders on the rest of the levels but the one is at.
If it is at a buy level, the EA place pending orders only above that buy level is at with the initial lot size and in the 3 sell levels with double lot size.
If the price is at a sell level, the EA place pending orders only below the sell level is at with the initial lot size and in the 3 buy levels with any double lot size.
No matter where the market moves, when one of the top or the bottom targeted prices is hit, profit will be made. in fact the longer it takes to reach such point, the more money it will make!
Clarification:
As best as I can tell, this what this EA does. Let’s call the value of the increment parameter I, and the current price P. With the default parameters, it sets up 3 buystop orders at P+I, P+2I, P+3I, and 3 sellstop orders at P–I, P–2I, P–3I. Each buystop has a SL at P–4I, and a TP at P+4I; each sellstop has a SL at P+4I and a TP at P–4I.
Translating that into understandable figures, given that INCREMENT = 35, it means that the buystop orders are set at +35, +70, +105 pips from the current price, all with TPs at +140 (from the current price, NOT the entry), and SL at –140. Vice versa for sellstops. So the average return per trade = +70 and the average risk = –210, i.e. a 1:3 RR.
Since the orders are buystop/sellstop, we are averaging UP (pyramiding) into trades, as opposed to averaging down. All initial orders are sized at 1 unit.
Now here’s where the fun starts. When the first buystop order is triggered, 3 more sellstop orders are created, with the same entry points as the initial sellstops, and all with the same TP and SL. Here’s the twist: the new sellstops at –35, –70 and –105 (away from the original price) are sized at 1, 2 and 3 units, respectively. Conversely, if a sellstop gets triggered, 3 new buystop orders are created. An additional 3 orders get added every time an order gets triggered. This ‘expansion’ process continues until the account exceeds its available margin, or until the orders hit their TPs or SLs.
As soon as a TP or SL point is reached, obviously all open orders are closed automatically (because they all share the same TP/SL points), and all pending orders are also immediately deleted. At that same point, the cycle repeats itself, i.e. 3 new buystop, and 3 new sellstop orders, based on the current price, are created. Rinse and repeat.
Attached File(s)
mGRID EA (1).mq4
9 KB
|
222 downloads