Build an EA using 2 Moving Average lines

MQL5 Asesores Expertos

Trabajo finalizado

Plazo de ejecución 3 días
Comentario del Cliente
You completed very quickly and do what my expectation. Thank you
Comentario del Ejecutor
Good job. Recommended user.

Tarea técnica

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


Archivos adjuntos:

Han respondido

1
Desarrollador 1
Evaluación
(39)
Proyectos
50
18%
Arbitraje
5
40% / 40%
Caducado
0
Libre
2
Desarrollador 2
Evaluación
(12)
Proyectos
16
44%
Arbitraje
1
100% / 0%
Caducado
0
Libre
3
Desarrollador 3
Evaluación
(56)
Proyectos
92
62%
Arbitraje
0
Caducado
4
4%
Libre
4
Desarrollador 4
Evaluación
(475)
Proyectos
504
53%
Arbitraje
10
60% / 20%
Caducado
3
1%
Libre
5
Desarrollador 5
Evaluación
(196)
Proyectos
318
35%
Arbitraje
64
13% / 56%
Caducado
82
26%
Libre
6
Desarrollador 6
Evaluación
(8)
Proyectos
11
0%
Arbitraje
11
18% / 73%
Caducado
2
18%
Libre
7
Desarrollador 7
Evaluación
(363)
Proyectos
389
70%
Arbitraje
3
100% / 0%
Caducado
2
1%
Trabajando
8
Desarrollador 8
Evaluación
Proyectos
0
0%
Arbitraje
0
Caducado
0
Libre
9
Desarrollador 9
Evaluación
(34)
Proyectos
60
23%
Arbitraje
11
73% / 9%
Caducado
3
5%
Libre
10
Desarrollador 10
Evaluación
(10)
Proyectos
13
8%
Arbitraje
3
67% / 33%
Caducado
0
Libre
Solicitudes similares
Hi, I have an indicator from my friend, I want to copy it to my own MT5 can you do that for me. Here is the link
I'm looking for someone to help me create an arbitrage trading robot that can trade on any decentralized exchange and forex market. I already have some source code to a strategy but would like to enhance it to make it profitable and automated
I installed the E.A. into the Experts folder in MT4. When I double click on it nothing happens. When I right click and "attach to chart" nothing happens. The E.A. is not grayed out, it simply will not attach. Any help would be greatly Appreciated
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

Información sobre el proyecto

Presupuesto
50 - 100 USD
Para el ejecutor
45 - 90 USD
Plazo límite de ejecución
de 1 a 3 día(s)