Job finished
Specification
I need an EA in MQL5 that trades on the basis of inside bars, an inside bar means that a candle does not exceed the limits of the previous candle.
If a candle closes within the previous one, an order is created at its top and below its low. a buy order is created at the top and a sell order at the low. the distance to the candle should be adjustable in the inputs so that the order is not exactly at the borders of the candle, but a distance can be set. (Positive Values will move the Order further away from the Candle)
The SL is then on the opposite side, i.e. the SL of the buy order is where the sell order is and the SL of the sell order is where the buy order is. However, in case that the SL distance is too large, there should be an input where you can set the maximum SL distance and the EA must use this value instead of the opposite side of the candle.
The take profit must be a multiple of the SL distance, also called risk to reward ratio. this should also be adjustable in the inputs.
Furthermore, I need filters for the day of the week and the time, i.e. it must be possible to select on which days of the week new orders may be created and in which period, i.e. from start time to end time.
I also need to be able to switch the time of day filter on and off
Sometimes you receive consecutive inside bars. in this case, the orders of the first inside bar must be deleted and new orders must be created at the current inside bar. The lot size must be adjusted to the new SL distance.
If the input value “Trade Consecutive Inside Bars” is [False], then the EA only has to delete the order and no longer create an order for this signal. After an outside bar continue as normal.
Inputs:
---SL---
Max SL [in Points not Pips]
---Consecutive Inside Bars---
Trade Consecutive Inside Bars [True/False]
---Delete Pending Orders---
Delete Orders after [Minutes]
---Time Filter---
Start Time Hour
Start Time Minute
End Time Hour
End Time Minute
Use Day Time Filter [True/False]
---Day Filter---
Monday [True/False]
Tuesday [True/False]
Wednesday [True/False]
Thursday [True/False]
Friday [True/False]
Saturday [True/False]
Sunday [True/False]