Техническое задание
1.) You provide the source code of following EA:
2.) Input Signal is the EURUSD for example
3.) PART A: Moving Average Strategy with 2 MAs and a SLOPE (lookback) / Input Parameters: MA Period 1 (range 1-10, MA Period 2 (range 1-100), SLOPE lookback (range 1-5)
4.) LONG SYNTHETIC MARKET ORDER CONDITION: if symbol value MA1 crosses > MA2 and the slope of the symbol = symbol value now > symbole value now-lookback then SIG=+1
5.) SHORT SYNTHETIC MARKET ORDER CONDITION: if symbol value MA1 crosses < MA2 and the slope of the symbol = symbol value now < symbole value now-lookback then SIG=-1
6.) with every new SYNTHETIC order the past will be closed SIG=0
7.) every order produces a SYNTHETIC open equity stored with each bar in an array synt_open_equity[1....x]
7.1.) BUY: calculation of the synt_open_equity=(symbol_value(now)- symbol_value(one back))*lots*lotsize
7.2.) SELL: calculation of the synt_open_equity=(symbol_value(one_back)- symbol_value(now))*lots*lotsize
8.) synt_open_equity should be showen in a graph window in the symbol chart area
8.) PART B: now the synt_open_equity array is the input signal for the next long and short trades
9.) LONG MARKET ORDER CONDITION: if synt_open_equity value MA1 crosses > MA2 and the slope of the synt_open_equity = synt_open_equity now > synt_open_equity now-lookback then BUY
10.) SHORT MARKET ORDER CONDITION: if synt_open_equity value MA1 crosses < MA2 and the slope of the synt_open_equity = synt_open_equity now < synt_open_equity now-lookback then SELL
11.) trades will start at a given time: for example 09.00am and will close at a given time: 09.00pm ....so no overnight, only trading in the specified timeframe !!!