Auftrag beendet
![](https://c.mql5.com/i/avatar/avatar_na2.png)
Spezifikation
In need to develop an EA for multiple pairs. No indicator involved based on following users inputs and conditions:
User inputs:
1. Trading Timeframe: tf
2. Look back how many bars in history: counterbar
3. Starting lotsize: lot
4. Lot increase multiple factor: lotfactor.
5. Take Profit pips: takeProfit
6. Stop open new position when margin level below x%: 400$
7. Maximum Open position per pair: maximumOpenPositionPerPair
8. Trading Pairs:EURUSD, GPBUSD,AUDUSD, etc.
Trading conditions:
1. OnTick, calculate Highprice and Lowprice based last counterbar, if high[0] price > Highprice, Highprice=high[0]. if low[0] <Lowprice, Lowprice=low[0].
2. If Bid > Highprice - (Highprice -Lowprice) *11/12, open sell position if no open sell position exists. If open sell position exist, (Bid -LastOrderPrice) > (Highprice -Lowprice)/2.
3. If Ask < Lowprice + (Highprice -Lowprice) *11/12, open buy position if no open buy position exists. If open buy position exist, (LastOrderPrice - Ask) > (Highprice -Lowprice)/2.
4. Set all open positions Take profit based on average Price + TakeProfit for buy and average Price - TakeProfit for sell.
5. If maximumOpenPositionPerPair reach, no more position open for this pair,
6. if margin level below X%, no more new position can be opened.