Trabajo finalizado
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Tarea técnica
I want to have programmed an easy ea which is placing pending orders with TP on an median price (calculated on a channel) in a definated period.
Below is a description, how ea should open orders and how they should be closed.
The Median price should be always calculated and pending entry price should be updated.
How will be calculated the Median Price.
Median price is calculated by an Chanel in a choosing period. calculating in a choosing period high and lows.
EA should be calculating daily, monthly, yearly high and lows in a defeated Period. Example 100 days, 20 Month or 10 Years for example.
In chart of EA I want to see actual calculated average of this high and lows and – Median price of the chosen period
It should be also be possible an x amount of high and lows be not affected in the calculation.
Means I want to choose that in definate Period X highs or X Lows are not be in the calculation
Xhighs- should be not in the calculation always the highest
Xlows- are not be in the calculation always the lowest
Martingal: Activ or inactiv
If an Order is X Pips in minus Differenz there should be placed another Pending order with definate TP. for this order should also work partial Fill.
If origal order is executed this Pending order should be deleted. If there is a new order in the market, System should place a pending on Xpips minus with same lots as orginal and definate TP.
Martingal Orders should be repeted till original order are closed and than new Pendings are placed on new Median price.
Actual Median price should be always in Chart shown and also High and low price from used Chanel.
Placed pending Orders should have always actual calculated median price. On alredy placed Pending order should be always entry price to actual median price.
Parameter
Magic
Period – day, moth-Year
Calculating average high
Calculating average low
Calculating average Median
X hig Candels are not in the calcualtion
Xlow Candels are not in the calculation
Order should be open on Median: active inactive
Order open on definite Price
Lots
Order amounts:
MaxOrders:
Xorders for high – opening on median or defeated price
Xorders low – opening on median or defeated price
Price for opening orders:
TP of order:
Partial fill
X % of amount
On Pips profit
1 X % of amount
1On Pips profit
Martingal: Activ or inactiv
Pips Difference - wer Orders should be opend as Martingal This order should be placed as Pending
Max Martingal orders - For each direction buy and sell should be opend max Martingal orders
Partial Fill function from above - should also work from above