작업 종료됨
명시
Specification
I need an Expert Advisor for MetaTrader 4.
It needs to be based on MACD histogram signals for H1 timeframe on
multiple currency pairs.
General Notes
· MACD histogram = MACD – Signal to place a pending order.
. Signal candle - to determine the entry price.
. Bollinger Bands - to determine the level of TP/SL/TS.
· Only one trade is opened at a time for each currency pair.
· Trade signals are only produced at the end of a bar, not “intra-bar”.
· User needs to be able to optimise the Input Parameters (detailed below) using the Strategy Tester.
placing a pending order BuyLimit
. Placing a pending order BUY LIMIT, after the following conditions are fulfilled:
. MACD histogram with higher closure value than the previous one, formed after a series of several (min. Two) decreasing values.it doesn't matter if it's above or below 0.
. The price of a pending order is determined on the basis of 50% of the signal candle(High+Low)/2, corresponding to the signal histogram.
. SL - 50 points below lower band on BB.If the bottom of the signal candle extends below the lower band, the SL is placed 50 points below the bottom of the candle.
. TP - The distance between entry price and SL in points, in a ratio of 1:1.
. TS - The distance between entry price and SL in points /2 (50%)
. Validity of pending order - 59 min.
. If there is an open position from the respective currency pair, regardless of the direction Buy or Sell, a pending order is not placed.
placing a pending order Sell Limit
. Placing a pending order SELL LIMIT, after the following conditions are fulfilled:
. MACD histogram with a lower closing value than the previous one, formed after a series of several (min. Two) incremental values.it doesn't matter if it's above or below 0.
. The price of a pending order is determined on the basis of 50% of the signal candle(High+Low)/2, corresponding to the signal histogram.
. SL - 50 points above upper band on BB.If the top of the signal candle extends above the upper band, the SL is placed 50 points above the top of the candle.
. TP - The distance between entry price and SL in points, in a ratio of 1:1.
. TS - The distance between entry price and SL in points /2 (50%)
. Validity of pending order - 59 min.
. If there is an open position from the respective currency pair, regardless of the direction Buy or Sell, a pending order is not placed.
Closing positions
There are two ways a trade can be closed:
· The
Signal conditions to close a trade are met (detailed below)
· A
“Take Profit” level is hit.
· A “Stop Loss” level is
hit.
. A “Trailing Stop”
level is hit.
Input Parameters
· Money Management: If false
then trade size is in lots. If true then trade size is based on Risk Percentage.
· Take
profit: In points
· Stop loss: In points
· Fast
EMA period: 12 (by default)
· Slow EMA period: 26 (by
default)
· MACD SMA: 9 (by default)
. Bollinger Bands period: 20 (by dafault)
. Time zone 10.00h-16.00h (to be selected by the user).