MA trending

MQL5 Experts

Job finished

Execution time 4 days
Feedback from customer
Very good programmer. Fast and skilled

Specification

 Please, read everything first and pay attention in every detail before agree.


The purpose of this EA is to work with various time frames with several Moving Average.


The following is the parameters that the EA will set:


-- General Settings -- 

1) Lot (Number greater than 0 with 2 digits, ex: 25.50)

2) Take Profit (Number greater than 0 with 2 digits, ex: 25.50)

3) Stop Loss (Number greater than 0 with 2 digits, ex: 25.50)


-- Break Even settings --

4) Break Even Enable (True or False)

5) Break Even Level (Number greater than 0 with 2 digits, ex: 25.50)

6) Break Even Profit (Number greater than 0 with 2 digits, ex: 25.50)


-- Time allow to trade -- 

7) Start Time (00:00 to 23:59)

8) End Time (00:00 to 23:59)

9) Close Positions (True or False) ** Do not trade with a different time and If there is a trading going, close the position. So if the time is different that was set, independently if the trade is positive or negative profit (gain zone or loss zone), close it.


-- Sending Orders Type and settings -- 

10) Market Price (True or False) ** Send order as market price

11) Pending Order (true or false)

12) Pending order points (Any number with 2 digits, including negative numbers) **This is a number to sum or subtract of the last close price.

      Ex 1: BUY case. If the close price was 103.50 and the number that set was 2.5, so the EA will send a pending order with the price equal to 105.00 (Stop order)

      Ex 2:  BUY case. If the close price was 105.00 and the number that set was -5.00, so the EA will send a pending order with a price equal to 100.00 (Limit order)

13) Reversal Order (True or false) ** Send oposite order 


-- Time Frame 01 -- 

14) Time frame (All Time frame allowed in MT5 like, 1m, 5m, 30m, 1H, etc..)

15) MA 01 Period (Integer number greater than 0)

16) MA 01 Type (Simple, exponential, etc..)

17) MA 02 Period (Integer number greater than 0)

18) MA 02 Type (Simple, exponential, etc..)

19) MA 03 Period (Integer number greater than 0)

20) MA 03 Type (Simple, exponential, etc..)

21) Candle Trend (True or false) ** Will be explained later


-- Time Frame 02 -- 

22) Time frame (All Time frame allowed in MT5 like, 1m, 5m, 30m, 1H, etc..)

22) MA 01 Period (Integer number greater than 0)

24) MA 01 Type (Simple, exponential, etc..)

25) MA 02 Period (Integer number greater than 0)

26) MA 02 Type (Simple, exponential, etc..)

27) MA 03 Period (Integer number greater than 0)

28) MA 03 Type (Simple, exponential, etc..)

29) Candle Trend (True or false) ** Will be explained later


-- Time Frame 03 -- 

30) Enable (True or false)

31) Time frame (All Time frame allowed in MT5 like, 1m, 5m, 30m, 1H, etc..)

32) MA 01 Period (Integer number greater than 0)

33) MA 01 Type (Simple, exponential, etc..)

34) MA 02 Period (Integer number greater than 0)

35) MA 02 Type (Simple, exponential, etc..)

36) MA 03 Period (Integer number greater than 0)

37) MA 03 Type (Simple, exponential, etc..)

38) Candle Trend (True or false) ** Will be explained later


-- Condition to trade -- 

39) BUY Power Trend (Integer number, greater than 0, positive)

40) SELL Power Trend (Integer number, less than 0, negative)


HOW IT WORKS:

The EA will analyse the power of the market trend, basing on several Moving Averages and candle trend at different time frames. Each MA and candle trend of each time frame will generate a number like:

Bear trend = -1

Neutral = 0

Bull Trend = +1

The EA will sum all this number and decide to BUY or SELL.

For example, If the sum of the conditions is greater than 12, EA will Buy. And if the sum of the condition is less than -10, EA will sell.

EA will work only with "Close prices" to decide if send and order or not.


*** Conditions to find the trend number:

  *Candle Trend

    If close price = open price, number is 0

    If the Close price > open price, number is +1

    If the close price < open price, number is -1

   

  *Crossing and trend MA rules (Only for MA 01 and MA 02)

    If MA 01 > MA 02 -> +1

    If MA 01 < MA 02 -> -1

    If MA 01 = MA 02 -> 0


    MA 01 last price [Bar (0)] is greater than MA 01 previous last price [Bar (-1)], AND MA 02 last price [Bar (0)] is greater than MA 02 previous last price [Bar (-1)], AND close price (market price) is greater than MA 01 and MA 02, the number is +1, ELSE, number is 0 

    MA 01 last price [Bar (0)] is less than MA 01 previous last price [Bar (-1)], AND MA 02 last price [Bar (0)] is less than ma 02 previous last price [Bar (-1)], AND close price (market price) is less than MA 01 and MA 02, the number is -1, ELSE, number is 0 

   

   P.S.: So to confirm the bull trend, MA 01 must crossing up MA 02 and the direction of the both moving averange (MA 01 and MA 02) must be higher (up).To confirm bear trend, the conditions will be the oposite.


  *MA 03 rules

    IF the last price (market price) is greater than MA 03 AND MA 03 last price [Bar (0)] is greater than previous last price [Bar (-1)], number is +1, ELSE, numer is 0

    IF the last price (market price) is less than MA 03 AND MA 03 last price [Bar (0)] is less than previous last price [Bar (-1)], number is -1, ELSE, numer is 0

 

If every conditions are bull trend, the maximum number will be 15. If every conditions are bear trend, the minimum number will be -15.


EXAMPLE:


 Time Frame 01 = 2 minutes

  MA 01 and MA 02 crossing = +1

  MA 01 Trend = +1

  MA 02 Trend = 0

  MA 03 Trend = +1

  Candle Trend = -1

 

 Time Frame 02 = 5 minutes

  MA 01 and MA 02 crossing = +1

  MA 01 Trend = +1

  MA 02 Trend = +1

  MA 03 Trend = 0

  Candle Trend = +1

  

 Time Frame 03 = 20 minutes 

  Enable = True

  MA 01 and MA 02 crossing = 0

  MA 01 Trend = +1

  MA 02 Trend = +1

  MA 03 Trend = 0

  Candle Trend = +1

     

         *** SUM = 9.

 

 Suppose that I set -> BUY Power Trend = 8 -> It means that if the sum of the conditions is greater than 8, EA will send a Buy order

 Suppose that I set -> SELL Power Trend = -6 -> It means that if the sum of the conditions is less than -6, EA will send a Sell order

 Neutral will be a value less than 8 and greater than -6. (EA will do nothing)


SO in that example case, EA must to send a buy order, if the other conditions like, time set, are ok.


To help to understand the idea of the EA, I include an indicator that works very similar of what I want, but the indicator just change the colors. 

Red tons means bear. Green and Blue means bull. Yellow means neutral.

Responded

1
Developer 1
Rating
Projects
1393
67%
Arbitration
117
32% / 42%
Overdue
215
15%
Working
2
Developer 2
Rating
Projects
64
42%
Arbitration
5
20% / 60%
Overdue
4
6%
Free
3
Developer 3
Rating
Projects
3462
88%
Arbitration
73
40% / 15%
Overdue
265
8%
Free
4
Developer 4
Rating
Projects
930
46%
Arbitration
31
39% / 29%
Overdue
93
10%
Free
5
Developer 5
Rating
Projects
138
41%
Arbitration
30
7% / 77%
Overdue
17
12%
Free
6
Developer 6
Rating
Projects
120
34%
Arbitration
17
18% / 41%
Overdue
51
43%
Free
Similar orders
Looking for someone to implent the following grid strategy into my existing EA: Overview : I need a skilled developer to implement a grid recovery strategy into my existing Expert Advisor (EA) for MetaTrader 4 (MT4). The strategy involves adding grid trades based on price movement and adjusting lot sizes according to specific rules. It also includes closing trades at breakeven points and full position closure when a
Hey Guys i've a PineScript /Source Code / ( Trading View ) indicator which has Buy and Sell Sign . i wanna make a MT5/4 Robot by it with some features . I need it has a simple panel to shows some details of robot at screen
Hi dear coders, I have an EA and for this EA I want additional code for Risk Management at my code, trade is triggered with this line int TheTicket = OrderSend(_Symbol,TradeType,(double)DoubleToString(TheLots,2),TradeType==OP_BUY?Ask:Bid,10,TheSL,TheTP,TheComment,MagicNumber,0,TradeType==OP_BUY?clrBlue:clrRed); I want you create a code and tutorrial how to change my code. the new code will be Risk Management Inputs
I'm seeking a Forex HFT Scalping EA that operates on live streaming tick data and candlestick patterns, executing a high frequency of trades without balance restrictions. The EA should be compatible with major currency pairs like EUR/USD, GBP/USD, USD/JPY, AUD/USD, GBP/JPY, GBP/AUD, and XAU/USD, as well as US30 indices. Given its HFT nature, it should focus on the 1-minute, 5-minute, 15-minute, and 30-minute
I need a custom MT5 EA that can place trades (Buy & Sell) from two Telegram channels. One telegram channel will give the trend signal (Bullish or Bearish) and the second telegram channel will give buy and sell signals
hello i like to have zigzag added to my EA and set orders when it makes a pullback strategy (Higerlow/Lowerhigh) or break of market structure strategy Higherhigh/Lowerlow break set order entry I want it to be able to do these 2 things but one at a time. -Zigzag makes a pullback into an HigherLow/LowerHigh set order entry -Zigzag breaks structure HigherHigh/LowerLow set order entry - For PULLBACK STRATEGY i just want
Looking for a indicator that can show where the majority of retail stop losses are placed Please can someone advise me how best to achieve this but it needs to be accurate
I have a grid trading bot that needs debugging. its perfect apart from a random stop loss I encountered. It’s supposed to have a stop loss at 99% but it one time closed trades at around 25% loss. Here is a list of potential things causing it to bug out (it’s running on MQL VPS MT5, I also want to retain the ability to close positions manually); - Chart change (symbol or timeframe) - Recompiling the EA - Server
Me gustaría poder crear automaticamente varias ordenes que se queden pendientes pudiendo definir los siguientes parámetros: Tipo de orden (Buy y sell stop, buy y sell limit. Precio de compra / venta. Pudiendo entrarlo manualmente o como un numero de puntos a sumar/restar del precio actual de marcado. Numero de puntos que ocuparan en total las ordenes y numero de ordenes a insertar (Ejemplo: 200 puntos, 4 ordenes, es
tardes desarolladores, quiero hacer un sistema semiatomatico, el deberia abrir las operaciones de venta o compra en un punto donde yo haga el analisis cumpliendo siertos criterios, por ejemplo abrir la operacion despues de que tresvelas del mismo color salga de un punto donde yo deje marcado , abriendo una operación 1/1 tenuendo en cuenta dos lineas que yo dejare marcadas

Project information

Budget
100 - 200 USD
For the developer
90 - 180 USD
Deadline
from 5 to 10 day(s)