Moving average based EA for MT4 using a modified trailing stop

MQL4 전문가

명시

Moving average Ea

·         This ea will use 2 timeframes, 5 ema’s, a Hull moving average, and atr for placing stop losses

·         For now let’s name the 5 ema’s.  Blue=10,  Green= 15,  yellow=30, red =60 ,  purple= 90 (the values should be changeable)

·         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 don’t wait for the close of the candle.  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. If the blue is back below the green ema at the close of the highest timeframe candle we are back in short only conditions.  See Video for clarification. https://youtu.be/Nq9yfNv2FP8 

For long trades we enter on the following conditions

·         Immediately when there is a blue/green ema cross on the higher timeframe. 

           The green ema is below the yellow ema and then the blue ema crosses and closes above the green ema. 

·         When the green is above the yellow and yellow above the red and the following happen  (see video  https://youtu.be/5t4PaJf3HBY)

§   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.  When the body of a candle crosses and closes above the hma

 

Other entries

   . Purple extreme entries with toggles for red as well  (https://youtu.be/cmI9uVLQ8Io)

 .  Extreme reverse stacked entries crossing hma  (https://youtu.be/uCJJH4Nqrvs)

o   Short trades will be exactly the same but opposite conditions with the ema’s 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 pips and then crosses the 50 ema and goes up 2 more pips we enter live because the candle has increased by 10 pips.   (https://youtu.be/VI3vD7KB0tU)

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 and closes below green

                                                2.  Exit a long when the current time frame blue crosses and closes below green

                                                3.  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 Exit 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.  (https://youtu.be/VLCSRjoi2to)

  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

 23.  Enable LIve entry

24.  Purple extreme toggle with yellow over red over purple

25 Purple extreme toggle with just red over purple

26.  Extreme HMA cross toggle on/off

(there may be more variables needed as you see fit.)

I also recommend building the ea with one entry at a time and testing as things can get pretty complicated quickly.  I also recommend building the exit conditions early on because I know that the trailing stop criteria is unique and others have struggle to build it correctly




응답함

1
개발자 1
등급
(27)
프로젝트
27
26%
중재
0
기한 초과
0
무료
2
개발자 2
등급
(58)
프로젝트
82
54%
중재
9
33% / 33%
기한 초과
7
9%
무료
3
개발자 3
등급
(57)
프로젝트
177
71%
중재
4
100% / 0%
기한 초과
1
1%
무료
4
개발자 4
등급
(376)
프로젝트
474
40%
중재
82
37% / 33%
기한 초과
13
3%
작업중
5
개발자 5
등급
프로젝트
0
0%
중재
0
기한 초과
0
무료
비슷한 주문
If you can make my mt4 ea to work as pinescript on tradingview, let me know. Or just build a trade copier that can copy trades from mt4 account directly into tradingview
Hi, I have an indicator from my friend, I want to copy it to my own Traidingview or MT5 can you do that for me. Here is the link
Seconds Chart Creator 150 - 200 USD
I have a code for a seconds chart creater but however the custom rates update does not seem to be copying it to the file and chart does not display all the bars. This problem is especially seen when it wants to convert the history to a 1 second custom chart. The history converted fails to be copied to the customs rate history file. It is able to generate an array of 1 seconds mqlrates but copying that array to the
Hello, I am looking for a programmer to write a universal EA (mql4 file) that works with custom indicators on Renko/RangeBar charts. The description of operation and additional functions that the EA is to have are described in the attached file. If you have any questions, write
I want to convert a small script from mql5 to pinescript of tradingview. The final script must work fine in tradingview, i will test it first if its ok i pay the developper. Script wil be send to developper in private because i cant post it here. If you have question you can ask me. Tnaks
MT4 EA Trade one zigzags 100 - 150 USD
I am looking for a programmer to do EA trader. If you can understand what I want from the video i do and you can do it, contact me because you will be able to do what I want. https://drive.google.com/file/d/1wbHxbUQQqCkdpr0-pHfIh2b288LzYTV2/view?usp=sharing
I need A Ea For Parabolic SAR With Default Settings And That Ea Including Take Profit And Stoploss Levels. Take profit : 50 points Stop loss : 50 points I have been seen that ea in Mql5 Market I tested it but that ea stop loss and take profits not activated that's why I came here I need a demo for testing process if you gave demo 1st and I will set you as a person to create a ea
Modifying an expert advisor written in mql5 and adding new indicators to it. The result must work both on strategy testing and on live, with no compilation errors and no warnings
see trade open on every tick seconde ok forex pair us us30 if is current running at 40170.00 so open 2 trade buy stop and sell stop both in every tick pending order of buy stop will 40171.00 and sell stop pending order will be 40169.00 buy stop will open at 40171.00 and tp will be 40173.00 and SL will be 40169.50 ok if buy stop hit sell stop order automatically will be close now if sell stop order open at 40169.00 so
Hi, I have an indicator from my friend, I want to copy it to MT5 can you do that for me. Here is the link

프로젝트 정보

예산
100+ USD
개발자에게
90 USD
기한
 10 일