Specifiche

//+------------------------------------------------------------------+
//|                     EA Cruzamento de Médias MT5                  |
//+------------------------------------------------------------------+
#property strict

#include <Trade/Trade.mqh>
CTrade trade;

//---- Inputs
input int FastMAPeriod = 20;
input int SlowMAPeriod = 50;
input double LotSize = 0.01;
input int StopLoss = 300;
input int TakeProfit = 600;

//---- Handles
int fastMAHandle;
int slowMAHandle;

//+------------------------------------------------------------------+
int OnInit()
{
   fastMAHandle = iMA(_Symbol, _Period, FastMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
   slowMAHandle = iMA(_Symbol, _Period, SlowMAPeriod, 0, MODE_EMA, PRICE_CLOSE);
   
   if(fastMAHandle == INVALID_HANDLE || slowMAHandle == INVALID_HANDLE)
   {
      Print("Erro ao criar médias");
      return(INIT_FAILED);
   }
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnTick()
{
   if(PositionSelect(_Symbol))
      return;

   double fastMA[2];
   double slowMA[2];

   CopyBuffer(fastMAHandle, 0, 0, 2, fastMA);
   CopyBuffer(slowMAHandle, 0, 0, 2, slowMA);

   double fastCurrent = fastMA[0];
   double fastPrevious = fastMA[1];
   double slowCurrent = slowMA[0];
   double slowPrevious = slowMA[1];

   // Cruzamento para compra
   if(fastPrevious < slowPrevious && fastCurrent > slowCurrent)
   {
      trade.Buy(LotSize, _Symbol, Ask, StopLoss * _Point, TakeProfit * _Point);
   }

   // Cruzamento para venda
   if(fastPrevious > slowPrevious && fastCurrent < slowCurrent)
   {
      trade.Sell(LotSize, _Symbol, Bid, StopLoss * _Point, TakeProfit * _Point);
   }
}
//+------------------------------------------------------------------+

Con risposta

1
Sviluppatore 1
Valutazioni
(35)
Progetti
61
23%
Arbitraggio
4
50% / 25%
In ritardo
15
25%
Gratuito
2
Sviluppatore 2
Valutazioni
(606)
Progetti
703
33%
Arbitraggio
43
47% / 44%
In ritardo
13
2%
Occupato
3
Sviluppatore 3
Valutazioni
(454)
Progetti
718
34%
Arbitraggio
35
69% / 9%
In ritardo
22
3%
In elaborazione
4
Sviluppatore 4
Valutazioni
(2)
Progetti
3
0%
Arbitraggio
0
In ritardo
2
67%
Gratuito
5
Sviluppatore 5
Valutazioni
(27)
Progetti
33
36%
Arbitraggio
0
In ritardo
2
6%
Gratuito
6
Sviluppatore 6
Valutazioni
(28)
Progetti
39
23%
Arbitraggio
14
0% / 93%
In ritardo
4
10%
Gratuito
7
Sviluppatore 7
Valutazioni
(1)
Progetti
1
0%
Arbitraggio
2
0% / 50%
In ritardo
0
Gratuito
8
Sviluppatore 8
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
9
Sviluppatore 9
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
10
Sviluppatore 10
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
11
Sviluppatore 11
Valutazioni
(50)
Progetti
51
8%
Arbitraggio
0
In ritardo
0
Gratuito
12
Sviluppatore 12
Valutazioni
(1)
Progetti
0
0%
Arbitraggio
5
0% / 80%
In ritardo
0
Gratuito
13
Sviluppatore 13
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
14
Sviluppatore 14
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
15
Sviluppatore 15
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
16
Sviluppatore 16
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
17
Sviluppatore 17
Valutazioni
(6)
Progetti
8
0%
Arbitraggio
8
13% / 88%
In ritardo
0
Gratuito
18
Sviluppatore 18
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
19
Sviluppatore 19
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
20
Sviluppatore 20
Valutazioni
Progetti
0
0%
Arbitraggio
0
In ritardo
0
Gratuito
21
Sviluppatore 21
Valutazioni
(2)
Progetti
2
0%
Arbitraggio
0
In ritardo
0
Gratuito
Pubblicati: 1 codice
Ordini simili
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
I am looking for a Pine Script v6 developer to create a TradingView indicator based on liquidity and Smart Money Concepts. The indicator must detect, mark on the chart, and optionally trigger alerts for the following events: Asian Session Liquidity Mark the Asian Session High and Low. Trigger an alert when price sweeps the Asian Session High or Low. Allow the user to manually configure the Asian session time and
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

Informazioni sul progetto

Budget
30+ USD
Scadenze
da 1 a 39 giorno(i)