Tâche terminée
Spécifications
Hi,
I need MT4 EA with the following specs:
Hits
Once the following two conditions are met, a hit occurs
1. The Close of the previous candle is greater/less than the POINT (determined by user)
2. The current candle moves above/below the high of the previous candle.
- The user can define after how many hits a trade will be executed.
- E.g user places Start trading after hits = 2, so the previous conditions must occur twice and at the third one
a (buy/sell) trade will be executed.
Buying logic
A Buy position will be executed if ALL of the following conditions are met:
1. The Close of the previous candle is greater than the POINT (determined by user)
2. The current candle moves above the high of the previous candle.
3. The points that the candle should move above the High of the previous candle is met.
So if the points = 0, a buy position will be executed once the current candle hits the High of the previous one.
Selling Logic
A Sell position will be executed if ALL of the following conditions are met:
1. The Close of the previous candle is less than the POINT (determined by user)
2. The current candle moves below the Low of the previous candle.
3. The points that the candle should move below the Low of the previous candle is met.
So if the points = 0, a Sell position will be executed once the current candle hits the Low of the previous one.
Exit Logic Long
The strategy will automatically place a take profit (user defined).
However, the stop loss is not determined by points, but rather by a reverse hit, where a the position is closed and
a new position (in the opposite direction is executed).
User Inputs Defaults
POINT = 0
No. of hits to start trading = 0
point away from (High/Low) = 0
Take Profit = 0
Order (1) lots = 0
Order (2) lots = 0
Order (3) lots = 0
Order (4) lots = 0
Order (5) lots = 0
Order (6) lots = 0
Order (7) lots = 0
Order (8) lots = 0
Order (9) lots = 0
Order (10) lots = 0
Order (11) lots = 0
Example
A user defined the expert inputs :
POINT = 130.00
No. of hits to start trading = 0
point away from (High/Low) = 10
Take Profit = 50
Order (1) lots = 0.01
Order (2) lots = 0.02
Order (3) lots = 0.06
Order (4) lots = 0.10
Order (5) lots = 0.50
Order (6) lots = 1.00
Order (7) lots = 2.00
Order (8) lots = 4.00
Order (9) lots = 5.40
Order (10) lots = 6.00
Order (11) lots = 6.30
The market moves above the POINT 130.00 and hits High 130.50 the candle Close @ 130.20. Current candle moves above 130.20 (Close of previous
candle) and hits 130.60 (which is the High of previous + 10 point away from (High/Low) ), a 0.01 buy position @ 130.60 is executed.
Suppose that the tp was not executed and the market moved in the reverse direction. A candle hits 129.50 as low and Close @129.50. The next candle
hits 129.40 (which is low of previous - 10 point away from (High/Low) ). The 0.01 buy position @ 130.60 is closed @ 129.40 and a Order (2) is executed
as a Sell position 0.02 @ 129.40. And the process goes on till the take profit is executed.
Finally, the EA must work on any symbol and any periodicity on MT4.
Regards,