Lavoro terminato
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Specifiche
Hi, this should take very little of your time. price is negotiable depending on the finish of the EA
I would like to add the following 2 function to the EA.
1. the partial open/close
2. Limiting the number of open order
For your reference, following is the logic and how the current EA work. (refer to source code attached)
Long
open
- long when the low(1) is below the long-break-out line and low(0) is above the
long-break-out line (the order is executed a the next bar or executed at the
current bar if high(0) is apart from the break-out line for a certain distance
close
-take profit at certain pips
-close at short-break-out line
Short
Open
-Short when low(1) is above the short-break-out line and current price(bid)
cross below the short-break-out line
close
-take profit at certain pips
-close at long-break-out line
Alert function
Email/Alert notification for error/open order.
The break out line/ take profit pips are being manually input as Extern
variables
The problem I am having now is that the program seems to open multiples orders
despite me trying to limit the number of open order to 1 or 2 at times per
currency pair/chart.
The current EA seems to work fine with the system tester (only sending one order at time ) but once I attach it to the live trading chart, it starts sending multiple orders until the margin become in sufficient.
Followings are how I wish the EA to be modified into
Requirements
1. Limiting the open order function
2. Partial close/ open function as described (refer to illus)
3. Can be used by multiple charts ( same currency-pair /same or different time
frames)
Long
open (open whenever the
condition is fuldilled and the number of open order is less than the
predetermined number)
long when the low(1) is below the long-break-out line and low(0) is above the
long-break-out line (the order is executed a the next bar or executed at the
current bar if high(0) is apart from the break-out line for a certain distance
close condition 1 (close 1/3)
take profit at certain pips (lets say 20 pips)
close condition 2 (close 1/3)
take profit at certain pips (lets say 40 pips)
close condition 3 (close all)
close with the same condition as Short (crossing the short-break-out line)
Short
Open(open whenever the condition is fuldilled and the number of
open order is less than the predetermined number)
Short when low(1) is above the short-break-out line and current price(bid)
cross below the short-break-out line
close condition 1 (close 1/3)
take profit at certain pips (lets say 20 pips)
close condition 2 (close 1/3)
take profit at certain pips (lets say 40 pips)
close condition 3 (close all)
close with the same condition as Long (crossing the short-break-out line)
Alert function will also continue to work
example (refer to illustration)
Long order opened for 3 lots
closed with condition 1 for 1 lot
closed with condition 2 for 1 lot
closed with condition 3 for the rest