Spécifications
Moving average Ea
· This ea will use 2 timeframes, 5 ema’s, a Hull moving average, and atr channels for placing stop losses
· For now let’s name the 5 ema’s. Blue=10, Green= 15, yellow=30, red =60 , purple= 90
· We enter a long when on the higher time frame the blue crosses above the green. We enter on the 5 minute chart immediately at the crossover. We are now locked into only long trades for the rest of the higher timeframe candle. To clarify, the moment the blue crosses above the green on the higher timeframe we immediately enter a long and can only be long until at least that candle on the higher timeframe closes, even if the blue green oscillates a few times on that candle. We will then only enter into short positions when the blue crosses below the green on a later higher timeframe candle.
For long trades we enter on the following conditions
· Immediately when there is a blue/green ema cross on the higher timeframe.
· When the green is above the yellow and yellow above the red and the following happen
§ 1. The body of a candle crosses and closes above any of the purple, red or yellow ema’s
§ 2. When the body of a candle crosses and closes above the green ema but only if the HMA is more than “X” pips above the 15 ema
§ 3. The close of any green candle when the blue and green ema’s are above the hma
§ 4. The green ema is below the yellow ema and then the blue ema crosses and closes above the green ema.
§ 5. When the body of a candle crosses and closes above the hma
o Short trades will be exactly the same but opposite and only when the blue crosses below the green on a higher timeframe.
o For all entries we will normally enter at the close of a candle, but I would like an option to enter on a live candle for any of the previously mentioned entry criteria if the candle is more than “X” pips. So for example the live candle pip criteria is set at 10 pips and a candle increases 8 pip and then crosses the 50 ema and goes up 2 more pips we enter live because the candle has increased by 10 pips.
Stop loss: Set stop loss using atr multiplier. I’d like an option to do the atr multiplier plus the spread at the entry of the candle as well. Please allow a toggle to add the spread for short and a separate one to add the spread to longs.
How to exit trades.- I’d like to be able to toggle between three different ways to exit trades
1. Exit a long when the higher time frame blue crosses below green
2. Exit a long when the current time frame blue crosses and closes below green
3. Exit based on a series of trailing stops. Let’s base the profit in terms of multiples of the stop loss in pips. So if the current stop loss is 10 pips and we reach 10 pips profit we are at 1x profit. If we reach 20 pips we are 2x profit. So for the trailing stops we set a profit we much reach for the trail to kick in. Example. Reach 1x profit set trailing stop to 0.8x profit. So if profit reaches 1x profit and turns against me trade closes at 0.2x profit. At the same setting if the price were to go to 1.4x profit and then turn .8x trail would now close it at 0.6x profit. Then the second profit level we need to reach at 2.5x profit will have a ts of 1.5x profit. So any profit gained above 2.5x can only fall by 1.5x profit before closing. Please set it up like this
-Profit #1 need
Profit #1 Trailing stop
Profit #2 needed
Profit #2 Trailing stop ….. do this for 10 trailing stops.
· Please also create a max spread parameter to prevent the entry of trades when the spreads are really high and a minimum stop loss to prevent really small stop losses.
· Create lot size based on percent of account.
· There should only be one current trade at one time, a new long entry can’t close an existing long. But a new short entry should automatically close an existing long and vice versa.
Please have the following parameters in the ea
1. Max spread to allow entries
2. Minimum stop loss
3. Higher timeframe being used
4. Current timeframe being traded
5. Fast Moving average higher timeframe
6. Slow Moving average higher timeframe
7. Current timeframe MA #1-Blue
8. Current timeframe MA #2- Green
9. Current timeframe MA #3- Yellow
10. Current timeframe MA #4- Red
11. Current timeframe MA #5- Purple
12. ATR Period
13. ATR Multiplier
14. Enable add spread for longs
15. Enable add spread for shorts
16. Candle size needed for live entries
17. Hull Moving Average
18. Distance Hull MA needs to be above/below Green ema
19. Exit- Toggle on off for blue crossing green on higher timeframe
20. Exit- Toggle on off for blue crossing green current timeframe
21. Exit- 10 Trailing stops
22. Lot size as percent of risk