Many thanks to all the contributors who keep this great thread going. I hope it is OK to post this request here, I have not seen anything exactly like this and I do think it will add value to the forum.
I would like an EA for MT4 that will open a trade at a specified candle open time based on certain conditions. In the pic example below, the EA should open a buy trade at the open of the 1700 candle based on the closing price at 1659. The stoploss would be 1 point below the low at 1621. The conditions are:
Long trade:
50 EMA (applied to close) above 200 EMA (applied to close) on current bar and previous 10 bars
Symphonie Trendline (cciPeriod 63 atrPeriod 18) is above 50 EMA on current bar and previous 10 bars
Closing price is above 200 EMA
Stoploss is 1 point below most recent fractal below the entry candle and 3 prior candles
Take profit is 1:2 RR
Closing price is not within 2% of the high of the total range of the last 225 bars
Close at user definable time if SL or TP has not been realized
Fractal is Bill Williams fractal indicator native to MT4
Need a minimum value for the stoploss, for example must be at least 10 pips from entry price. So if the first fractal does not meet this requirement look back on the chart for the first fractal that does meet the minimum and use that. If no fractal in the last 225 bars meets this minimum there is no trade.
Short trade is opposite of the above conditions
All of the above variables I would like to be user changeable in the inputs fields, i.e. I could change the RR, use a different EMA value, etc.
I have a breakeven requirement (set to BE halfway to 1:1) but I do not think that can be coded on a timeframe chart such as the 1 minute in this case. Some candles may have a range including both the halfway mark and the BE point so you wouldn't know if it broke even before continuing. I will just manually check those, I mainly want this EA for testing purposes not for live trading. I need it to take a trade every day that these conditions are met.
If any of these instructions are unclear I will be happy to answer any questions. Thanks in advance.
I would like an EA for MT4 that will open a trade at a specified candle open time based on certain conditions. In the pic example below, the EA should open a buy trade at the open of the 1700 candle based on the closing price at 1659. The stoploss would be 1 point below the low at 1621. The conditions are:
Long trade:
50 EMA (applied to close) above 200 EMA (applied to close) on current bar and previous 10 bars
Symphonie Trendline (cciPeriod 63 atrPeriod 18) is above 50 EMA on current bar and previous 10 bars
Closing price is above 200 EMA
Stoploss is 1 point below most recent fractal below the entry candle and 3 prior candles
Take profit is 1:2 RR
Closing price is not within 2% of the high of the total range of the last 225 bars
Close at user definable time if SL or TP has not been realized
Fractal is Bill Williams fractal indicator native to MT4
Need a minimum value for the stoploss, for example must be at least 10 pips from entry price. So if the first fractal does not meet this requirement look back on the chart for the first fractal that does meet the minimum and use that. If no fractal in the last 225 bars meets this minimum there is no trade.
Short trade is opposite of the above conditions
All of the above variables I would like to be user changeable in the inputs fields, i.e. I could change the RR, use a different EMA value, etc.
I have a breakeven requirement (set to BE halfway to 1:1) but I do not think that can be coded on a timeframe chart such as the 1 minute in this case. Some candles may have a range including both the halfway mark and the BE point so you wouldn't know if it broke even before continuing. I will just manually check those, I mainly want this EA for testing purposes not for live trading. I need it to take a trade every day that these conditions are met.
If any of these instructions are unclear I will be happy to answer any questions. Thanks in advance.
Attached File(s)