工作已完成
指定
Hi,
I'm looking for a tallented programmist who can create EA according below conditions:
Assumptions:
EA will work on the DAX index, timeframe M5.
Task:
Build EA that will open positions by the following terms and conditions.
Global variables (extern):
N - the number of positions to be opened
X - the size of opened positions in one attampt in lots
D - divider to determine the ratio between p1 and p2
K - the size of the body in pips
TS - value for calculating the average TenkanSen
TS_p1 - distance in pips between TS a and p1
OP - opened positions with magic number
SELL
Conditions for OPEN SELL:
Open the N positions with value X of lots, at the open of candle op when the follow conditions will be fulfilled:
a) Candle p2 is decreasing and,
b) Body of p2 > K and
c) The body of the candle p1 is D-times smaller than the body of the candle p2
(body p1 <= body p2 / D) and,
c) Value of average TS calculated at the first second of candle op <= value of average TS for p1 and
d) Value of candle p1 at the start (open) <= value of TS_p1 (TS_p1 = MathAbs(Open p1 – value of TS for p1)) and
e) Value of opening candle op <TS
f) The value of body of the candle p1 <= K
Conditions for CLOSE SELL:
For 1 to N
Positions 1 N, close at the last second of candle n1
Positions 2 N, close at the last second of candle n2
Positions 3 N, close at the last second of candle n3
Positions 4 N, close at the last second of candle n4
Positions 5 N, close at the last second of candle n5
BUY
Conditions for OPEN BUY:
Open the N positions with value X of lots, at the open of candle op when the follow conditions will be fulfilled:
a) Candle p2 is increasing and
b) Body of p2 > K and
c) The body of the candle p1 is D-times smaller than the body of the candle p2
(body p1 <= body p2 / D) and,
d) Value of candle p1 at the start (open) = >value of TS_p1 (TS_p1 = MathAbs(Open p1 – value of TS for p1)) and
e) Value of candle p1 at the start <= value of TS_p1 and
f) Value of opening candle op => Value of average TS
Conditions for CLOSE BUY:
For 1 to N
Positions 1 N, close at the last second of candle n1
Positions 2 N, close at the last second of candle n2
Positions 3 N, close at the last second of candle n3
Positions 4 N, close at the last second of candle n4
Positions 5 N, close at the last second of candle n5