Trabajo finalizado
Tarea técnica
Hi,
I am in need of an EA that uses the previous candle and uses it as a breakout. Here are the requirements:
1. Highest High/Lowest Low
On the hour (or when the candle closes) the EA looks at the previous highest high and creates a buy stop and at the lowest low it creates a sell stop. If it already passed it it should open a trade immediately.
2. Stop Loss
On the hour (or when the candle closes) the EA looks at the previous highest high and sets a stop loss for the sell stop at point 1 and at the lowest low it sets a stop loss for the buy stop at point 1
3. Lot size formula
I have a formula that looks at the balance and calculates what the lot size needs to be. Is it possible to include this inside the EA?
4. Profit target
When a certain amount has been reached it should close ALL orders including pending orders. This is going to be a percentage of the balance. The percentage must accept decimals (Eg: 0.5% or 3.5%).
5. Only once
The EA must only run once every hour or during 1 candle. If the order has been fulfilled and the profit target has been reached it should not open a new order/pending order until it has reached the end of its cycle (ergo when the candle closed)
6. Close All at certain time
When the candle is reaching it's closing moment (eg 1 minute before the hour) it should close ALL orders including pending orders (assuming that there are orders at the time).
Preferably MT4 but it does not matter if it's MT5
I know I have a lot of requirements and I hope that you can help me with this.
Thanks,
EGAH.