仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Hello I want an EA that will trade my simple strategy for me.
Variables:
"T" Timeframe based on mt4 timezone. eg H1
"Candle1" Enter mt4 time candle1 was completely formed or should be formed eg 23/04/2019 10:00:00
"Candle2" Enter mt4 time candle2 was completely formed or should be formed eg 23/04/2019 11:00:00
"MAX" Maximum trades allowable per trading day on selected currency eg 3
"LOT" Lot Size to trade eg 0.01
"SL" Stoploss in pips eg 30
"TP" Takeprofit target in pips eg 60
"CURRENCY" eg GBPUSD
STRATEGY
If Closing price of Candle2 >Opening price of Candle2
Place a buy limit order @ the LOW of Candle1.
If Closing price of Candle2<Opening price of Candle2
Place a sell limit order @ the HIGH of Candle1.
If Closing price of Candle2=Opening price of Candle2:
CREATE Another variable "CandleX" = Candle competely formed or will form after "Candle2" Then
REPEAT:
If Closing price of CandleX >Opening price of CandleX
Place a buy limit order @ the LOW of Candle1.
If Closing price of CandleX<Opening price of CandleX
Place a sell limit order @ the HIGH of Candle1.
NOTE:
1. EA should only trade if all the conditions listed below are met;
a. Spread <= 4pips
b. "MAX" is specified
c. "SL" is specified
d There is no current trade running. Under no circumstance should the EA add another position to an already existing position except the it closes first either in profit or Loss.
e. Market is Opened.
2. All limit orders not triggered should be deleted at 23:59:00 MT4 Timezone
3. EA Should allow manual closing of a triggered position by user.
4. Moving the SL is permitted only in the direction of profit of the position - up for long position and down for short position;
5. If you can not set the SL at the level of the line, it should be set at the minimum allowable distance (but only if it complied with the previous rule of moving in the direction of the profit);
6. Should have a configurable trailing stop feature ie (AllowTrailing = true/false parameter).
Miscellaneous:
- When you run the Expert Advisor, it should attach the used indicators with the specified parameters;
- The information on the opening/closing of positions and of modifications of the SL should be stored in the Journal;
- If there are any errors, it must print a message describing the error.