仕事が完了した
指定
Create an Expert Advisor (EA) to work on Meta Trader 4 (MT4) and use to trade Forex markets. The EA will run on one chart only with a chosen timeframe. The EA will monitor three indicators: Average True Range (ATR); and two Simple Moving Averages. The EA will open long or short trades based upon the crossing of MA lines. When the short term MA crosses above the long term MA, go long. When the shorter term MA crosses below the longer term MA, go short.
Only take one trade at a time and
each trade should be closed out with a take profit or stop loss before starting
the next trade. Once a trade has been opened, the EA will decide stop loss and
take profit positions based upon a percentage of the Average True Range (ATR)
indicator.
Specifications:
Please code the following input variables.
|
Variables |
Units |
Description |
1 |
Sample Size |
|
Number of trade outcomes (e.g. 20 outcomes). |
3 |
Higher Moving Average |
|
Higher Indicator (e.g. 13 M15). – Simple MA |
4 |
Lower Moving Average |
|
Lower Indicator (e.g. 5 M15). Simple MA. Enter long or short trades when lower indicator crosses higher one. e.g. When lower indicator is above higher indicator, long trades and vice versa. |
5 |
Total Lots |
|
All lot sizes – Standard, Mini, Micro (e.g. 0.3 lots) |
6 |
Take Profit 1 |
% |
Choose percentage of Average True Range (ATR) e.g. 30% |
7 |
Take Profit 1 Lots |
|
Number of lots to close at Take Profit 1 (e.g. 1 lot) |
8 |
Take Profit 2 |
% |
Choose percentage of Average True Range (ATR) e.g. 60% |
9 |
Take Profit 2 Lots |
|
Number of lots to close at Take Profit 2 (e.g. 1 lot) |
10 |
Take Profit 3 |
% |
Choose percentage of Average True Range (ATR) e.g. 90% |
11 |
Take Profit 3 Lots |
|
Number of lots to close at Take Profit 3 (e.g. 1 lot) |
12 |
Stop Loss 1 |
% |
Choose percentage of Average True Range (ATR) e.g. -90% |
13 |
Stop Loss 1 Lots |
|
Number of lots sold at Stop Loss 1 (e.g. 3 lots) |
14 |
Stop Loss 2 |
|
Only activated once Take Profit 2 has been reached. Stop Loss 2 is set to close the trade when any point is reached under the starting point (based upon real time trade, not close of candle). When activated, Stop Loss 2 closes all remaining lots immediately.
|
15 |
Stop Loss 2 Lots |
|
Number of lots sold at Stop Loss 2 (e.g. remaining number of lots) |
Q: Can EA calculate brokerage fees?