EMA_Cross_Bot

MQL5 Indicateurs Consultation Forex

Spécifications

//+------------------------------------------------------------------+
//| 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);
     }
  }

Répondu

1
Développeur 1
Évaluation
(83)
Projets
143
52%
Arbitrage
8
13% / 75%
En retard
22
15%
Gratuit
2
Développeur 2
Évaluation
(558)
Projets
645
33%
Arbitrage
41
41% / 46%
En retard
11
2%
Occupé
3
Développeur 3
Évaluation
Projets
0
0%
Arbitrage
0
En retard
0
Gratuit
4
Développeur 4
Évaluation
(153)
Projets
237
33%
Arbitrage
20
45% / 30%
En retard
2
1%
Travail
5
Développeur 5
Évaluation
(6)
Projets
8
0%
Arbitrage
8
13% / 88%
En retard
0
Gratuit
6
Développeur 6
Évaluation
(48)
Projets
49
8%
Arbitrage
0
En retard
0
Gratuit
7
Développeur 7
Évaluation
(250)
Projets
460
26%
Arbitrage
140
20% / 59%
En retard
100
22%
Travail
8
Développeur 8
Évaluation
(44)
Projets
53
38%
Arbitrage
8
13% / 38%
En retard
8
15%
Travail
Commandes similaires
Robo estilo NeuroMint 30 - 200 USD
Alguem poderia desenvolver um rob estilo o Neuromint? De mini entradas e stops em um unico candle no tempo grafico de 5min? Seria para o XAUUSD e USDJPY de preferencia
✅ Estrutura original preservada ✅ Painel original ✅ Lógica original ✅ Arquitetura original ✅ Sem parâmetros alterados ✅ TF dinâmico ✅3 timeframes : H1 / H4 / D1 Time frame Dinamicos podendo mudar para M1/M30/H1 ou D1/W1/MN Quero que fique como está a imagem abaixo e adicionar extra time frame nas entradas

Informations sur le projet

Budget
30 - 100 USD
Délais
de 5 à 10 jour(s)