EMA_Cross_Bot

MQL5 Indicators Consultation Forex

Specification

//+------------------------------------------------------------------+
//| Expert advisor simples: Cruzamento de EMAs |
//+------------------------------------------------------------------+
input int EMA_Fast = 9;
input int EMA_Slow = 21;
input double LotSize = 0.1;
input int Slippage = 3;

int fast_ema_handle;
int slow_ema_handle;

double fast_ema[], slow_ema[];

int OnInit()
  {
   fast_ema_handle = iMA(_Symbol, _Period, EMA_Fast, 0, MODE_EMA, PRICE_CLOSE);
   slow_ema_handle = iMA(_Symbol, _Period, EMA_Slow, 0, MODE_EMA, PRICE_CLOSE);
   return(INIT_SUCCEEDED);
  }

void OnTick()
  {
   if(CopyBuffer(fast_ema_handle, 0, 0, 2, fast_ema) < 0) return;
   if(CopyBuffer(slow_ema_handle, 0, 0, 2, slow_ema) < 0) return;

   double ema_fast_now = fast_ema[0];
   double ema_fast_prev = fast_ema[1];
   double ema_slow_now = slow_ema[0];
   double ema_slow_prev = slow_ema[1];

   if (ema_fast_prev < ema_slow_prev && ema_fast_now > ema_slow_now)
     {
      if(PositionSelect(_Symbol)) PositionClose(_Symbol); // Fecha se já existe posição
      trade.Buy(LotSize, _Symbol, Ask, Slippage);
     }
   else if (ema_fast_prev > ema_slow_prev && ema_fast_now < ema_slow_now)
     {
      if(PositionSelect(_Symbol)) PositionClose(_Symbol);
      trade.Sell(LotSize, _Symbol, Bid, Slippage);
     }
  }

Responded

1
Developer 1
Rating
(83)
Projects
143
52%
Arbitration
8
13% / 75%
Overdue
22
15%
Free
2
Developer 2
Rating
(611)
Projects
711
33%
Arbitration
45
49% / 42%
Overdue
14
2%
Working
3
Developer 3
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
4
Developer 4
Rating
(153)
Projects
240
34%
Arbitration
20
45% / 30%
Overdue
3
1%
Free
5
Developer 5
Rating
(6)
Projects
8
0%
Arbitration
8
13% / 88%
Overdue
0
Free
6
Developer 6
Rating
(50)
Projects
51
8%
Arbitration
0
Overdue
0
Free
7
Developer 7
Rating
(252)
Projects
462
26%
Arbitration
139
20% / 60%
Overdue
100
22%
Free
8
Developer 8
Rating
(44)
Projects
53
38%
Arbitration
8
13% / 38%
Overdue
8
15%
Free
Similar orders
Hello, I need an Expert Advisor (EA) developed for MetaTrader 5, specifically tailored for the EUR/USD currency pair on the 5-minute (M5) timeframe. The robot should execute trades based on Price Action or Technical Analysis (such as Support/Resistance Breakouts or Moving Average Crossovers - I am open to the programmer's suggestions for proven, consolidated strategies). Mandatory Risk Management Requirements
TENHO UM INDICADOR E EU QUERO QUE TRANSFORME ELE EM ROBÔ OU O ROBÔ FAÇA ENTRADAS COM ELE USANDO OS SINAIS DO INDICADOR. MEU NÚMERO 21969476161 SÓ CHAMAR QUE FALO DETALHADAMENTE
quero que verifique onde o ativo teve o menor valor de mercado, depois cada vez que o ativo estiver com o menor valor de mercado quero que você faça a compra de 0.3 do ativo EURUSD e faça a venda quando atinger o maior valor com base nos ultimos 366 dias

Project information

Budget
30 - 100 USD
Deadline
from 5 to 10 day(s)