Mira cómo descargar robots gratis
¡Búscanos en Facebook!
Pon "Me gusta" y sigue las noticias
Pon "Me gusta" y sigue las noticias
¿Es interesante este script?
Deje un enlace a él, ¡qué los demás también lo valoren!
Deje un enlace a él, ¡qué los demás también lo valoren!
¿Le ha gustado el script?
Evalúe su trabajo en el terminal MetaTrader 5
Evalúe su trabajo en el terminal MetaTrader 5
- Publicado por:
- Vladimir Karputov
- Visualizaciones:
- 1610
- Ranking:
- Publicado:
- 2017.01.20 12:44
-
¿Necesita un robot o indicador basado en este código? Solicítelo en la bolsa freelance Pasar a la bolsa
Autor de la idea — Gabriel, autor del código mq5 — barabashkakvn.
Funciona sobre la base de los indicadores iMACD, MACD.
Condiciones para comprobar las señales para la apertura de posición:
void OpenBuyOrSell()
{
double mac1,mac2,mac3,mac4,mac5,mac6,mac7,mac8;
mac1 = iMACDGet(MAIN_LINE,0);
mac2 = iMACDGet(MAIN_LINE,1);
mac3 = iMACDGet(MAIN_LINE,2);
mac4 = iMACDGet(MAIN_LINE,3);
mac5 = iMACDGet(SIGNAL_LINE,0);
mac6 = iMACDGet(SIGNAL_LINE,1);
mac7 = iMACDGet(SIGNAL_LINE,2);
mac8 = iMACDGet(SIGNAL_LINE,3);
//--- check for long position (BUY) possibility
if(mac8>mac7 && mac7>mac6 && mac6<mac5 && mac4>mac3 && mac3<mac2 && mac2<mac1 && mac2<-0.00020 && mac4<0 && mac1>0.00020)
{
if(!RefreshRates())
return;
double volume=LotsOptimized();
if(volume==0)
return;
m_trade.Buy(volume,Symbol(),m_symbol.Bid(),0,0,"Expert MACD");
return;
}
//--- check for short position (SELL) possibility
if(mac8<mac7 && mac7<mac6 && mac6>mac5 && mac4<mac3 && mac3>mac2 && mac2>mac1 && mac2>0.00020 && mac4>0 && mac1<-0.00035)
{
if(!RefreshRates())
return;
double volume=LotsOptimized();
if(volume==0)
return;
m_trade.Sell(volume,Symbol(),m_symbol.Ask(),0,0,"Expert MACD");
return;
}
}
{
double mac1,mac2,mac3,mac4,mac5,mac6,mac7,mac8;
mac1 = iMACDGet(MAIN_LINE,0);
mac2 = iMACDGet(MAIN_LINE,1);
mac3 = iMACDGet(MAIN_LINE,2);
mac4 = iMACDGet(MAIN_LINE,3);
mac5 = iMACDGet(SIGNAL_LINE,0);
mac6 = iMACDGet(SIGNAL_LINE,1);
mac7 = iMACDGet(SIGNAL_LINE,2);
mac8 = iMACDGet(SIGNAL_LINE,3);
//--- check for long position (BUY) possibility
if(mac8>mac7 && mac7>mac6 && mac6<mac5 && mac4>mac3 && mac3<mac2 && mac2<mac1 && mac2<-0.00020 && mac4<0 && mac1>0.00020)
{
if(!RefreshRates())
return;
double volume=LotsOptimized();
if(volume==0)
return;
m_trade.Buy(volume,Symbol(),m_symbol.Bid(),0,0,"Expert MACD");
return;
}
//--- check for short position (SELL) possibility
if(mac8<mac7 && mac7<mac6 && mac6>mac5 && mac4<mac3 && mac3>mac2 && mac2>mac1 && mac2>0.00020 && mac4>0 && mac1<-0.00035)
{
if(!RefreshRates())
return;
double volume=LotsOptimized();
if(volume==0)
return;
m_trade.Sell(volume,Symbol(),m_symbol.Ask(),0,0,"Expert MACD");
return;
}
}
Apertura de Buy en el gráfico:
Traducción del ruso realizada por MetaQuotes Ltd
Artículo original: https://www.mql5.com/ru/code/16967

Indicador Fractal_Bands con posibilidad de cambiar el marco temporal del indicador en los parámetros de entrada.

Commodity Channel Index fractal.

Señales de cuatro indicadores iMA, MA, de los precios PRICE_OPEN, PRICE_HIGH, PRICE_LOW, PRICE_CLOSE. Comercio solo en las cuentas con cobertura.

Indicador Fractal_Keltner con posibilidad de cambiar el marco temporal del indicador en los parámetros de entrada.