Build an EA using 2 Moving Average lines

MQL5 Experts

Job finished

Execution time 3 days
Feedback from customer
You completed very quickly and do what my expectation. Thank you
Feedback from employee
Good job. Recommended user.

Specification

Build an EA using 2 Moving Average lines

Name: MovingAverageEA

Source code: MT4, MT5 included.


SETTING

AssetItem:

- Current chart

MagicNumber:

- Default: 123456789

- User can change this number

MinLot:

- Minimum lot when making an order

- Default: 0.01

MaxLot:

- Maximum lot when making an order

- Default: 50

- Maximum value is 50

AccountCapital

- Default: 100$

- The money amount from the account

StopLoss

- Pip number.
- Default 20

Moving Average setting

MovingAverage_1

- MA1_Period: default = 10

- MA1_Shift:  default = 0

- MA1_Method: default = MODE_SMA

- MA1_Price: default = CLOSE_PRICE

MovingAverage_2

- MA2_Period: default = 1

- MA2_Shift:  default = -1

- MA2_Method: default = MODE_SMA

- MA2_Price: default = CLOSE_PRICE



Flow processing (please look at the picture to understand what I said)

- Only 1 order at the time

- MA2 cross up MA1, make a buy order. Close this order until the MA2 goes down MA1.

- MA2 goes down MA1, make a sell order. Close this order unitl the MA2 goes up MA1.

- Do not make 2 orders at the same time.

- If make a buy order, please close a previous sell order if exists.

- Before making a new order, EA has to re-calculate the volume

- Update stop loss processing: 
- Step 1: Get the maximum low/high price from 3 previous candlesticks to set the stop loss for buy/sell order.
- Step 2: calculate the stop loss number Math.abs(the price when making an order - price from step 1)
- Step 3: compare the value from step 2 with the [StopLoss] setting. use the bigger one
- Update the stop loss for the existing order when it moves to the next bar like the method above


Volume calculation

 - If account balance < [AccountCapital] => use [MinLot]

 - If Lot calculation > [MaxLot] => use [MaxLot] setting value
 
 Lot calculation use this form
 
 100$-200$ => 0.01

 200$-400$ => 0.02

 400$-800$ => 0.04

 800$-1600$ => 0.08

 1.600$-3.200$ => 0.16

 3.200$-6.400$ => 0.32

 6.400$-12.800$ => 0.64

 12.800$-25.600% => 1.28

 25.600$-51.200$ => 2.56

 51.200$-102.400$ => 5.12

 102.400$-204.800$ => 10.24

 204.800$-409.600$ => 20.48

 409.600$-819.200$ => 40.96

 > 819.200 => 50


Explain how to make a buy or sell


Files:

Responded

1
Developer 1
Rating
(39)
Projects
50
18%
Arbitration
5
40% / 40%
Overdue
0
Free
2
Developer 2
Rating
(12)
Projects
16
44%
Arbitration
1
100% / 0%
Overdue
0
Free
3
Developer 3
Rating
(56)
Projects
92
62%
Arbitration
0
Overdue
4
4%
Free
4
Developer 4
Rating
(475)
Projects
504
53%
Arbitration
10
60% / 20%
Overdue
3
1%
Free
5
Developer 5
Rating
(196)
Projects
318
35%
Arbitration
64
13% / 56%
Overdue
82
26%
Free
6
Developer 6
Rating
(8)
Projects
11
0%
Arbitration
11
18% / 73%
Overdue
2
18%
Free
7
Developer 7
Rating
(363)
Projects
389
70%
Arbitration
3
100% / 0%
Overdue
2
1%
Loaded
8
Developer 8
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
9
Developer 9
Rating
(34)
Projects
60
23%
Arbitration
11
73% / 9%
Overdue
3
5%
Free
10
Developer 10
Rating
(10)
Projects
13
8%
Arbitration
3
67% / 33%
Overdue
0
Free
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 - 100 USD
For the developer
45 - 90 USD
Deadline
from 1 to 3 day(s)