Specification
//+------------------------------------------------------------------+
//| SimpleEA.mq5|
//| Copyright 2023, MetaQuotes Software Corp. |
//| https://www.mql5.com|
//+------------------------------------------------------------------+
#property copyright "2023, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
input int FastMAPeriod = 12; // Período da média móvel rápida
input int SlowMAPeriod = 26; // Período da média móvel lenta
input double LotSize = 0.1; // Tamanho do lote
double FastMA, SlowMA;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- initialization of indicators
FastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
SlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
FastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
SlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 0);
double previousFastMA = iMA(NULL, 0, FastMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
double previousSlowMA = iMA(NULL, 0, SlowMAPeriod, 0, MODE_SMA, PRICE_CLOSE, 1);
if (previousFastMA < previousSlowMA && FastMA > SlowMA)
{
if (OrderSelect(0, SELECT_BY_POS, MODE_TRADES) == false)
{
OrderSend(Symbol(), OP_BUY, LotSize, Ask, 2, 0, 0, "Buy Order", 0, 0, clrGreen);
}
}
}
//+------------------------------------------------------------------+
Responded
1
Rating
Projects
55
5%
Arbitration
34
0%
/
94%
Overdue
24
44%
Working
2
Rating
Projects
232
32%
Arbitration
18
39%
/
33%
Overdue
1
0%
Working
3
Rating
Projects
620
33%
Arbitration
36
39%
/
53%
Overdue
11
2%
Loaded
4
Rating
Projects
130
9%
Arbitration
8
25%
/
38%
Overdue
28
22%
Working
5
Rating
Projects
17
59%
Arbitration
2
0%
/
100%
Overdue
2
12%
Free
6
Rating
Projects
1
100%
Arbitration
0
Overdue
0
Free
7
Rating
Projects
49
8%
Arbitration
0
Overdue
0
Free
Similar orders
Construção de um EA baseado em um video
30 - 100 USD
Tenho uma foto e video(não deu para anexar) de um robo trabalhando com buy stop e sell stop com indicadores de força e volatilidade. Gostaria de saber se consegue construir um
Project information
Budget
30+ USD
Deadline
from 15 to 35 day(s)