仕事が完了した
![](https://c.mql5.com/i/avatar/avatar_na2.png)
![](https://c.mql5.com/i/avatar/avatar_na2.png)
指定
Hello,
I need to develop the following EA. I hope the description will be clear enough. If not do not hesitate to ask questions.
SOURCE CODE IS NEEDED.
Indicators:
Heiken Ashi Price
EMA 20
MACD 12,26,9 EMA
ATR 14
EA Description:
The robot will start from "start hour" and will stop and exit all positions at the end of the day. Intraday trading only.
No open position allowed at night.
Open hours and Closed hours MUST BE CONFIGURABLE. (Intraday only)
Price per point or Lot MUST BE CONFIGURABLE
Symbol MUST BE CONFIGURABLE (e.g. DAX30, CAC40...etc)
Period MUST BE CONFIGURABLE (e.g. H1, M15, M5...etc)
Parameter of EMA MUST BE CONFIGURABLE ( EMA 20, EMA 10...etc)
Parameters of MACD MUST BE CONFIGURABLE ( Fast EMA Period, slow EMA Period, Signal MA period, Applied MA Method, Applied Price)
The values of MACD, MACD Histogram and Signal within the MACD indicator will be used in the strategy.
Parameters of the ATR MUST BE CONFIGURABLE.(current 14...could be 20...etc)
The EA must be able to identify if the Heiken Ashi Candle has a flat top or a flat bottom. THIS IS MANDATORY.
Trading rules:
RULE 1:
If current Heiken Ashi has a flat bottom AND EMA 20 is going up (greater value than previous one) AND MACD Histogram value is greater than the previous one AND MACD is going up (greater value than previous one) then BUY order at Open Price of the following candle. Important to wait for the end of current flat bottom candle to take position.
Put STOP LOSS at bottom of candle before the flat bottom candle mentioned previously. IMPORTANT: if the size of the Stop loss is above 40 points, reduced the stop loss position to 40 points maximum.
TRAILING STOP: At the end of each new candle: check if the candle has an Heiken Ashi flat bottom. If yes than move STOP Loss 2 points below flat bottom of the new flat bottom Heiken ashi candle. If not, do not move the STOP. Repeat this operation at the end of each new period candle.
TAKE PROFIT: there is no Take Profit rules. Only the STOP rule above applies.
RULE 2:
If current Heiken Ashi has a flat top AND EMA 20 is going down (smaller value than previous one) AND MACD Histogram value is smaller than the previous one AND MACD is going down (smaller value than previous one) then SELL order at Open Price of the following candle. Important to wait for the end of current flat top candle to take position.
Put STOP LOSS at top of candle before the flat top candle mentioned previously. IMPORTANT: if the size of the Stop loss is above 40 points, reduced the stop loss position to 40 points maximum.
TRAILING STOP: At the end of each new candle: check if the candle has an Heiken Ashi flat top. If yes than move STOP Loss 2 points above flat top of the new flat top Heiken ashi candle. If not, do not move the STOP. Repeat this operation at the end of each new period candle.
TAKE PROFIT: there is no Take Profit rules. Only the STOP rule above applies.
ADDITIONAL RULE:
I need a calculator that compiles the results of all trades results within a day. When there is a total loss reached at minus 100 points in the day, we need to close all open positions and close the robot for the day. No more trades allowed during this day. Counter start at 0 back again the day after.
There is only one trade at a time.
REPORT INFORMATION:
I need to be able to generate a complete report that will give for each trade the following informations:
Date and time of the ENTRY
Price at the Entry
EMA Value at the Entry
MACD value at the Entry
MACD Histogram value at the Entry
ATR Value at the Entry
Value of the Spread
Same for the EXIT
then Amount of win or loss points for the trade
Amount of win or loss money for the trade.
ADDITIONAL FEATURE:
I would like to see on the Heiken Ashi Candle Graph:
An icon for each Entry and an icon for each exit.
I would also like to see or have confirmation that the Stop is moving correctly according to the rules above. Feel free to propose any visual method.
I hope this is understandable. :-) If you have any questions, do not hesitate.
Thanks to confirm you price expectations as well.
Best Regards,
Patrice.