Good evening. The EA will be set up on a 1 MIN chart and will be triggered by the a combination of EMAs slope % and candles. The chart will have only one indicator, an Exponential Moving Average (EMA) of a defined number of periods.
The EA will have the below input areas that will define the key values for the bot to trigger the positions:
1. Stake size (1 lot standard)
2. Take profit number of pips (20 pips standard)
3. Stop Loss number of pips (20 pips standard)
4. Move “Stop Loss” to break even when the position is in profit "x" number of pips (standard will be 10 pips). It means that once a position is 10 pips in profit its original “Stop Loss” will move to break even (SL= 0)
5. Time Frame in minutes (standard will be set up at 2 minute candles)
6. EMA period (13 periods standard)
7. EMAs slope angle percentage (it will be the same value for upward and downward trends. Standard setup will be 40 degrees upwards / -40 degrees downwards)
8. Max number of open positions (standard will be 3 open positions). Please note that in order for the second, third... positions to be opened, the previous ones have to have the Stop Loss at break even, SP=0)
9. Total profit pips for the day (once that is reached the bot will stop for the day)
10. Total loss pips for the day (once that is reached the bot will stop for the day)
11. Time of the day for the bot to start running (for example 9:30am)
12. Time of the day for the bot to stop running (for example 16:30pm)
The bot will trigger a new position when all these things happen:
A. The defined EMA has more degrees slope angle (up or down) than the defined value when looking at the last two periods (or candles).
B. There are at least two same color candles before the current candle.
C. The current candle closes with the opposite color as the two previous candles.
D. If the Input "Max number of open positions" is more than 1, all other open positions have the “Stop Loss” at break even, SL=0).
E. We have not reached the defined “Maximum number of open positions” (point number 8.)
F. The time of the day is within the set parameters.
G. The total profit / loss number of pips for the day has not been reached.
Buy positions will be triggered when all the above happens and the EMAs trend is upwards. Similarly, Sell positions when the EMAs trend is downwards. In the image attached, there is a two minute chart with an EMA 13 (green line) and the grey lines show the 40 degree angle. As the EMA 13 has a higher degree angle downwards than the defined 40 degrees, and there has been at least two red candles before the blue one, a sell position was opened when the blue candle closed. If the position gets into 10 pips profit, the “Stop Loss” will move to breakeven, SL=0.
The EA will be loaded in a standard 1 MIN Chart, but the EA needs to work on non-standard time-frames, in other words, it needs to be able to calculate 2 minute, 3 minute... candles even if the EA is launched in a standard 1 MIN Chart.