Tâche terminée
Spécifications
I need an Expert for MT4 based on Heiken Ashi candles and moving average. Here are the requirements:
Trade settings
Lots- This is the lot size for opening trades. If this value is greater than zero, then fixed lots will be used.
RiskPercentage- The percentage of free margin to risk in a trade. The Lots setting must be left as 0 to use this setting instead.
TakeProfit- The fixed take profit value in points. If 0 then no take profit will be set.
MA as trend indicators:
Trend MA is used to determine the trend: it takes CurrentValue and CurrentValue - 1 (previous bar) on D1 frame; if CurrentValue - (CurrentValue - 1) > 0 then the trend is assumed to be bullish (line is rising), if CurrentValue - (CurrentValue - 1) < 0 then the trend is assumed to be bearish (line is lowering).
Trading triggers:
Buy order is set on Heiken Ashi candle close if Trend MA shows bullish trend, the closed Heiken Ashi candle is bullish and the price on close was above 20 EMA (applied on close) on the chart timeframe. The Order is closed after the first bearish Heiken Ashi candle if order is in profit. If after the first bearish Heiken Ashi candle order is not in profit, then opposite order is opened (hedged) and EA is waiting for next buy trigger. When the next position is opened (the third order), the same condition of closing applies – on the first bearish Heiken Ashi candle after the order opening, however all open positions should be closed at once if overall trade is in profit. If not – opposite order (bearish) is opened again and the EA waits for signal once again.
Sell order is set on Heiken Ashi candle close if Trend MA shows bearish trend, the closed Heiken Ashi candle is bearish and the price on close was below 20 EMA (applied on close) on the chart timeframe. The Order is closed after the first bullish Heiken Ashi candle if order is in profit. If after the first bullish Heiken Ashi candle order is not in profit, then opposite order is opened (hedged) and EA is waiting for next sell trigger. When the next position is opened (the third order), the same condition of closing applies – on the first bullish Heiken Ashi candle after the order opening, however all open positions should be closed at once if overall trade is in profit. If not – opposite order (bullish) is opened again and the EA waits for signal once again.
The indicator should work on any timeframe and any currency pair.