An MT5 Expert Advisor based on EMA cross S&R line needed

MQL5 Experts

Specification

This MT5 EA will be based on Crossover of a few of Exponential Moving Average to Support and Resistant Line as follow:


TOOLS

1. Exponential Moving Average 5

2. Exponential Moving Average 21

3. Exponential Moving Average 55

How the EMA works?

-        It will be based on crossover. Case study will be provided later


4. S&R Line 

- S&R Line has different VALUE every single day

- Formula calculation for VALUE of the day as per below (a little bit different for each of instruments);

For Forex : 5 decimals

·                     [ (Yesterday High – Yesterday Low) + 3 PIPS ] / 2 = VALUE of the day

·                     For example on EURUSD (High :  1.15867 , Low : 1.15491),

1.15867 - 1.15491 = 37.6 PIPS,

37.6 + 3 = 40.6

40.6 / 2 = 20.3 PIPS, in this case the value of the day will be 21 PIPS.

Here is the explanation. Since the answer is 20.3, we need to round it to next odd number which is 21. If the answer exactly 21, then that will be the value. If the answer is 22.5, then need to round to the next odd number which is 23

 

For GOLD Spot (XAUUSD) : 2 decimals

·                     [ (Yesterday High – Yesterday Low) + 300 PIPS ] / 2 = VALUE of the day

·                     For example, High : 1769.34 , Low : 1750.73

1769.34 - 1750.73 = 1861 PIPS

1861 + 300 PIPS = 2161

2161 / 2 = 1080.5 PIPS, in this case the VALUE of the day will be 1081 PIPS.

Here is the explanation. Since the answer is 1080.5, we need to round it to next odd number which is 1081. If the answer exactly 1081 then that will be the value. If the answer is 1082.4, then need to round to the next odd number which is 1083

 

For WTI Cash, Spot Crude Oil : 3 decimals

·                     [ (Yesterday High – Yesterday Low) + 30 PIPS ] / 2 = VALUE of the day

·                     For example, High : 81.681 , Low : 79.531

81.681 - 79.531 = 215 PIPS

215 + 30 = 245

245 / 2 = 122.5 PIPS, in this case the value of the day will be 123 PIPS.

Here is the explanation. Since the answer is 122.5, we need to round it to next odd number which is 123. If the answer exactly 123 then that will be the value. If the answer is 124.7, then need to round to the next odd number which is 125


For Index or Indices, for example S&P500 : 1 decimals

·                     [ (Yesterday High – Yesterday Low) + 30 pips ] / 2 = VALUE of the day

·                     For example, High : 4416.1 , Low : 4353.6

4416.1 - 4353.6 = 625 PIPS

625 + 30 = 655

655 / 2 = 327.5 PIPS, in this case the value of the day will be 329 PIPS.

Here is the explanation. Since the answer is 327.5, we need to round it to next odd number which is 329. If the answer exactly 329 then that will be the value. If the answer is 328, then need to round to the next odd number which is 329

 

How the S&R Line works?

-          Actually currently I use Fibonacci but I change the levels to suit my needs so it is for the purpose of Line only. Here are example;

Please refer Picture 1.0

On the Levels section, there sequence will be from 0, 0.5, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10



Here are the example during Uptrend;

Please refer Picture 1.1

Please refer Picture 1.2

- When in an Uptrend, Base Line is at Low of that particular day and the range of each line to line will be based on VALUE of the day. Only from Base Line 0 to Resistant Line 1, there is a half (0.5).



Here are example during Downtrend;

Please refer Picture 1.3

Please refer Picture 1.4

- During Uptrend if the price making new low of the day, the Base Line and the Resistant Line will be keep changing as well. And same during Downtrend if price making new high of the day, the Base Line and the next Support Line will be keep changing as well

- So basically for confirmation of entry, EMA 5 need to cross the S&R line at least 2 pips.

- EMA 5 is the only one act as confirmation. The other 2 of the EMA just for purpose of telling the trend




TREND

Uptrend

- EMA 21 above EMA 55


Downtrend

- EMA 21 below EMA 55


Entry

- Entry only made on the new open candlestick

- Once the EMA 5 cross the S&R Line, entry on next candlestick if all other rules are tick


Buy Entry Rules ;

1. Uptrend

2. EMA 5 cross at least (2 pips for fx, 20 pips for gold/indices/commodity) above Resistant Line

3. Price already touch or nearest EMA 21 (max 5 pips for fx, 50 pips for gold/indices/commodity) on that day

4. During the activation, candlestick is not closed in the black zone(between EMA21 & EMA55)

5. During the activation, EMA5 is not in the black zone(between EMA21 & EMA55)

6. During the activation, the range between high of the candlestick to next S&R line is above 7 pips

7. During the execution, the range between open candlestick to next S&R Line is above 20 pips

8. Not the last candlestick of the day (during monday-thursday)

9. Not the two last candlestick of the day (during friday)


Sell Entry Rules ;

1. Downtrend

2. EMA 5 cross at least (2 pips for fx, 20 pips for gold/indices/commodity) below Support Line

3. Price already touch or nearest EMA 21 (max 5 pips for fx, 50 pips for gold/indices/commodity) on that day

4. During the activation, candlestick is not closed in the black zone(between EMA21 & EMA55)

5. During the activation, EMA5 is not in the black zone(between EMA21 & EMA55)

6. During the activation, the range between high of the candlestick to next S&R line is above (7 pips for fx, 70 pips for gold/indices/commodity)

7. During the execution, the range between open candlestick to next S&R Line is above (20 pips for fx, 200 pips for gold/indices/commodity)

8. Not the last candlestick of the day (during monday-thursday)

9. Not the two last candlestick of the day (during friday)


Exit Rules

1. Take Profit

- Take Profit will be set to (5 pips for fx, 50 pips for gold/indices/commodity) before the S&R Line

* When ENTRY is based on crossover 0.5 s&r line, TP at 1.0 s&r line and SL at 0/base line

* When ENTRY is based on crossover 1.0 s&r line, TP at 2.0 s&r line and SL at 0/base line

* When ENTRY is based on crossover 2.0 s&r line, TP at 3.0 s&r line and SL at 1.0 s&r line

* When ENTRY is based on crossover 3.0 s&r line, TP at 4.0 s&r line and SL at 2.0 s&r line

* When ENTRY is based on crossover 4.0 s&r line, TP at 5.0 s&r line and SL at 3.0 s&r line


2. Stop Loss

- Stop Loss will be set (5 pips for fx, 50 pips for gold/indices/commodity) more than the S&R Line


3. Manual Cut Loss

- When in Buy position during uptrend, the s&r line for downtrend(from high of the day) will be keep observe if there is a crossover which means potential changing of direction

- Same as when in Sell position, the s&r line for uptrend(from low of the day) will be keep observe if there is a crossover which means potential changing of direction

- Example will be show in case study


Candlestick Activation = Is when EMA 5 complete cross the S&R Line

Candlestick Execution = Is new candlestick after the candlestick activation (To enter the trade)


Case Study rules

Buy Entry at 0.5 Line – All other rules are tick and correct

Please refer Picture 1.5

Rules;

1. Uptrend – MA21 above MA55

2. EMA5 cross 0.5 s&r line(more than 2 pips)

3. Price already touch MA21 on that day

4. During the activation, candlestick is not closed in the black zone(between EMA21 & EMA55)

5. During the activation, EMA5 is not in the black zone(between EMA21 & EMA55)

6. During the activation, the range between high of the candlestick to next S&R line is above 7 pips

7. During the execution, the range between open candlestick to next S&R Line is above 20 pips

8. Not the last candlestick of the day (during monday-thursday)

9. Not the two last candlestick of the day (during friday)



Case Study rules 2.0

Buy Entry at 1.0 Line – All other rules are tick and correct

Please refer Picture 1.6

Rules;

1. Uptrend – MA21 above MA55

2. EMA5 cross 1.0 s&r line(more than 2 pips)

3. Price already touch MA21 on that day

4. During the activation, candlestick is not closed in the black zone(between EMA21 & EMA55)

5. During the activation, EMA5 is not in the black zone(between EMA21 & EMA55)

6. During the activation, the range between high of the candlestick to next S&R line is above 7 pips

7. During the execution, the range between open candlestick to next S&R Line is above 20 pips

8. Not the last candlestick of the day (during monday-thursday)

9. Not the two last candlestick of the day (during friday)



Case study 1.0

Buy
Entry during crossover 0.5 s&r line

TP at 1.0 s&r line

SL at 0/base line

RESULT = HIT TIP

Please refer Picture 1.7



Case study 2.0

Buy
Entry during crossover 1.0 s&r line

TP at 2.0 s&r line

SL at 0/base line

RESULT = HIT TP

Please refer Picture 1.8




Case study 3.0

SELL
Entry during crossover 2.0 s&r line

TP at 3.0 s&r line

SL at 1.0 s&r line

RESULT = HIT TP

Please refer Picture 1.9



Case study 4.0

SELL
Entry during crossover 1.0 s&r line

TP at 2.0 s&r line

SL at 0/Base line

RESULT = HIT SL

Please refer Picture 2.0





Case study 5.0

SELL
Entry during crossover 1.0 s&r line

TP at 2.0 s&r line

SL at 0/Base line

RESULT = Manual Cut Loss

Please refer Picture 2.1



NOTES FOR MANUAL CLOSE

In Uptrend Situation,

- If candle activation happened at 0.5 s&r line, then it will be cut loss when EMA 5 cross any of s&r downtrend line

- If candle activation happened at 1.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 downtrend line

- If candle activation happened at 2.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 downtrend line

- If candle activation happened at 3.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 downtrend line

- If candle activation happened at 4.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 downtrend line

And continuously


In Downtrend situation,

- If candle activation happened at 0.5 s&r line, then it will be cut loss when EMA 5 cross any of s&r uptrend line

- If candle activation happened at 1.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 uptrend line

- If candle activation happened at 2.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 uptrend line

- If candle activation happened at 3.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 uptrend line

- If candle activation happened at 4.0 s&r line, then it will be cut loss when EMA 5 cross 1.0 uptrend line

And continuously




Please note that;

UPTREND means the 0/Base line is at the LOW price of the day

DOWNTREND means the 0/Base line is at the HIGH price of the day


- IF the position carry forward to next day or the day after, the HIGH or LOW for the 0/Base line is determine on HIGH and LOW price since the day of ENTRY position.


Files:

PNG
1.0.png
9.4 Kb
PNG
1.1.png
84.3 Kb
PNG
1.2.png
42.8 Kb
PNG
1.3.png
77.8 Kb
PNG
1.4.png
42.5 Kb
PNG
1.5.png
480.6 Kb

Responded

1
Developer 1
Rating
(42)
Projects
62
8%
Arbitration
12
58% / 42%
Overdue
1
2%
Free
2
Developer 2
Rating
(71)
Projects
103
20%
Arbitration
6
0% / 83%
Overdue
3
3%
Free
3
Developer 3
Rating
(92)
Projects
132
35%
Arbitration
13
38% / 31%
Overdue
32
24%
Free
4
Developer 4
Rating
(15)
Projects
16
19%
Arbitration
2
0% / 50%
Overdue
1
6%
Free
5
Developer 5
Rating
(568)
Projects
641
41%
Arbitration
21
57% / 29%
Overdue
47
7%
Working
6
Developer 6
Rating
(236)
Projects
418
34%
Arbitration
53
36% / 40%
Overdue
153
37%
Busy
7
Developer 7
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
8
Developer 8
Rating
(203)
Projects
303
35%
Arbitration
56
38% / 38%
Overdue
99
33%
Free
9
Developer 9
Rating
(143)
Projects
255
35%
Arbitration
12
25% / 58%
Overdue
42
16%
Free
10
Developer 10
Rating
(253)
Projects
407
38%
Arbitration
85
42% / 19%
Overdue
70
17%
Loaded
11
Developer 11
Rating
(66)
Projects
143
34%
Arbitration
10
10% / 60%
Overdue
26
18%
Free
12
Developer 12
Rating
(563)
Projects
932
47%
Arbitration
301
59% / 25%
Overdue
124
13%
Working
Similar orders
I have an EA and want to add few new logic to fetch profit taking factors and other values from an external master data and use it in existing EA
Hello Every one, Good day, I want from someone professional to create an EA is working on Mt5, This EA is working by depend on some indicators, and all those indicators must be working on MACD window, not on the chart, for more details please read my attached pdf file carefully. Many Thanks
I'm looking for an expert MQL5 developer that can create an EA that's based on my price action trading strategy with no indicators. The EA must analyze trades based on my price action rules, enter trades based on my price action rules, manage trades based on my price action rules and exit trades based on my price action rules
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
We are looking for an experienced Expert Advisor Developer who can build a customized MT5 Expert Advisor for us. The Expert Advisor would use two built-in indicators as entry/exit signals and our own risk management strategy with customizable inputs. The goal is to create a reliable and efficient trading tool that can automate our trading process on the MT5 platform. Skills required: - Strong understanding of
I need stochastic div (hidden &regular ea) that should perform task in all tf's ..divergence is a repaint stly so i want to use it with candlestick flips .. so bet for it
Hello, I have an indicator from a friend and I'd like to replicate it on my own TradingView or MT5 platform. Could you assist me with that?. Here is the link
so basically I have an EA(mql5), AI script(python), flask server and socket server both on python. Now this is an experimental script as I am trying to learn. However the EA is not entering any trades. How much would it cost for you to troubleshoot this for me? Thank you in advance
NEW FUNCTION 50+ USD
La idea es la siguiente, sería un EA semi automático. Yo como trader opero en zonas. En adelante las vamos a denominar ``zonas calientes´´. El EA debe que necesito debe operar conforme a 4 zonas calientes que yo configure en el mismo. ¿Qué hará el EA en cada una de esas zonas calientes que yo he configurado? En cada una de estas zonas el EA debe realizar hedging (crear un rango en el cual el EA entrara en sell o en
I have the bot just over half made, from another developer who let me down and decided they no longer wished to finish the project, so I have a basic example of the fundamentals of what it could look like, although multiple functions I require do not work, but I can show this to you on request. There are multiple features that I require, so please read the in depth requirement sheet on the attachment. Function: To

Project information

Budget
50+ USD
For the developer
45 USD