작업 종료됨
명시
I need an expert advisor in MQL4 that will trade the NSADAQ only during market open hours - from 09:30 to 16:00 ET (New York USA time zone).
The program will obtain:
- the
previous day's close automatically from either Yahoo Finance or Google Finance or from a parameter. The source of the previous day's close will be specified by a parameter. Any value entered manually will be ignored if
the specified source is not manual entry.
- the high and low values of the opening period.
As
soon as the opening period is finished, the ea will place orders to buy
(go long) N pips above the opening period high and sell (go
short) N pips below the opening period low towards the previous day's close. The number of pips N between the high/low
of the opening period and the order level will be an input parameter. The stop loss level will be
moved when the first target is reached and a percentage of the trade (specified by a parameter) will be closed at that point with the remainder of the trade close when the second target is hit. The first and second targets will be parameters specifying factors of the opening period length, so the number of pips from entry to the targets will be a calculation of the parameter values multiplied by the difference bewteen the opening
period's high and low values. This will apply to both long and short trades.
The ea will optionally take the
opposite trade if the first trade fails depending on the true/false
value of a parameter. The entry point for the reverse trade will be the
same as the stop loss level for the first trade.
The total amount to risk per trade will be a precantage of the account value . This percentage value will be a parameter.
All of the algorithm "bottlenecks" should be exhaustively thought out and accurately processed. There should be a minimum of situations, in which an error can occur:
- The Expert Advisor should be able to restore its normal work after a temporary disconnection, reconnection to the account, or a reset of the client terminal.
- If you can not set the pending or stop orders, they need to be tracked virtually, and when the price of their levels is reached, executed on the market price.
- If you can not open position on the market prices within Y attempts, the maximum
allowable slippage should be increased.
The program needs to be able to run multiple copies with different parameter settings and will log to a journal the details of orders placed (time, entry level, take profit level, stop loss level), teh time at which they are triggered and the details when they are closed (time and reason for close).
When an order is placed the ea will
display on the chart a line at the stop-loss level and another at the
take-profits level.
The ea must check
and correctly process any erros that occur during trading and close any
open trades and delete any pending orders at the close of the market.
The
NASDAQ trades from 9:30 am to 4pm Eastern Time (i.e. New York, U.S.A
time zone) so the proragm will need to allow for the US moving to/from
daylight saving so the NASDAQ market opening hours are not a fixed offset from GMT.