¿Cómo codificar? - página 216

 

Lo siento, me olvidé de cambiar la línea de asunto.

Debería ser "Obtener el S/L original de la orden modificada".

Gracias,

Chris

 

Filtro Combo Coder por favor

Hola a todos,

Cualquiera puede codificar el indicador para mq4, esto es combo bar color filter multi pairs por favor.

EURUSD, "EUR/USD"

EURUSD,GBPUSD,AUDUSD,NZDUSD,~USDJPY,~USDCHF,~USDCAD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPUSD, "GBP/USD"

EURUSD,GBPUSD,AUDUSD,NZDUSD,~USDJPY,~USDCHF,~USDCAD,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

AUDUSD, "AUD/USD"

EURUSD,GBPUSD,AUDUSD,NZDUSD,~USDJPY,~USDCHF,~USDCAD,~EURAUD,~GBPAUD,AUDJPY,AUDNZD,AUDCHF,AUDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

NZDUSD, "NZD/USD"

EURUSD,GBPUSD,AUDUSD,NZDUSD,~USDJPY,~USDCHF,~USDCAD,~EURNZD,~GBPNZD,NZDJPY,~AUDNZD,NZDCHF,NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

USDJPY, "USD/JPY"

~EURUSD,~GBPUSD,~AUDUSD,~NZDUSD,USDJPY,USDCHF,USDCAD,EURJPY,GBPJPY,CHFJPY,CADJPY,AUDJPY,NZDJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

USDCHF, "USD/CHF"

~EURUSD,~GBPUSD,~AUDUSD,~NZDUSD,USDJPY,USDCHF,USDCAD,EURCHF,GBPCHF,~CHFJPY,CADCHF,AUDCHF,NZDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

USDCAD, "USD/CAD"

~EURUSD,~GBPUSD,~AUDUSD,~NZDUSD,USDJPY,USDCHF,USDCAD,EURCAD,GBPCAD,~CADJPY,~CADCHF,AUDCAD,NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURJPY, "EUR/JPY"

EURUSD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,USDJPY,GBPJPY,AUDJPY,NZDJPY,CADJPY,CHFJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURNZD, "EUR/NZD"

EURUSD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,~NZDUSD,GBPNZD,AUDNZD,~NZDJPY,~NZDCHF,~NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPJPY, "GBP/JPY"

GBPUSD,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD,USDJPY,EURJPY,AUDJPY,NZDJPY,CADJPY,CHFJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPNZD, "GBP/NZD"

GBPUSD,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD,~NZDUSD,EURNZD,AUDNZD,~NZDJPY,~NZDCHF,~NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

CADJPY, "CAD/JPY"

~USDCAD,~EURCAD,~GBPCAD,~AUDCAD,~NZDCAD,CADCHF,USDJPY,EURJPY,GBPJPY,AUDJPY,NZDJPY,CADJPY,CHFJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

AUDJPY, "AUD/JPY"

AUDUSD,~EURAUD,~GBPAUD,AUDNZD,AUDCHF,AUDCAD,USDJPY,EURJPY,GBPJPY,AUDJPY,NZDJPY,CADJPY,CHFJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

NZDJPY, "NZD/JPY"

NZDUSD,~EURNZD,~GBPNZD,~AUDNZD,NZDCHF,NZDCAD,USDJPY,EURJPY,GBPJPY,AUDJPY,NZDJPY,CADJPY,CHFJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURGBP, "EUR/GBP"

EURUSD,~GBPUSD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,~GBPAUD,~GBPNZD,~GBPJPY,~GBPCHF,~GBPCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURAUD, "EUR/AUD"

EURUSD,~AUDUSD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,GBPAUD,~AUDJPY,~AUDNZD,~AUDCHF,~AUDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURCHF, "EUR/CHF"

EURUSD,USDCHF,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,GBPCHF,~CHFJPY,CADCHF,AUDCHF,NZDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

EURCAD, "EUR/CAD"

EURUSD,USDCAD,EURGBP,EURAUD,EURNZD,EURJPY,EURCHF,EURCAD,GBPCAD,~CADJPY,~CADCHF,AUDCAD,NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPAUD, "GBP/AUD"

GBPUSD,~AUDUSD,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD,EURAUD,~AUDJPY,~AUDNZD,~AUDCHF,~AUDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPCHF, "GBP/CHF"

GBPUSD,USDCHF,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD,EURCHF,~CHFJPY,CADCHF,AUDCHF,NZDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

GBPCAD, "GBP/CAD"

GBPUSD,USDCAD,~EURGBP,GBPAUD,GBPNZD,GBPJPY,GBPCHF,GBPCAD,EURCAD,~CADJPY,~CADCHF,AUDCAD,NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

CHFJPY, "CHF/JPY"

~USDCHF,USDJPY,~EURCHF,~GBPCHF,~CADCHF,~AUDCHF,~NZDCHF,EURJPY,GBPJPY,CHFJPY,CADJPY,AUDJPY,NZDJPY

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

CADCHF, "CAD/CHF"

~USDCAD,USDCHF,~EURCAD,~GBPCAD,~AUDCAD,~NZDCAD,CADJPY,EURCHF,GBPCHF,~CHFJPY,CADCHF,AUDCHF,NZDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

AUDNZD, "AUD/NZD"

AUDUSD,~NZDUSD,~EURAUD,~GBPAUD,AUDNZD,AUDCHF,AUDCAD,AUDJPY,EURNZD,GBPNZD,~NZDJPY,~NZDCHF,~NZDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

AUDCHF, "AUD/CHF"

AUDUSD,USDCHF,~EURAUD,~GBPAUD,AUDNZD,AUDCHF,AUDCAD,AUDJPY,EURCHF,GBPCHF,~CHFJPY,CADCHF,NZDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

AUDCAD, "AUD/CAD"

AUDUSD,USDCAD,~EURAUD,~GBPAUD,AUDNZD,AUDCHF,AUDCAD,AUDJPY,EURCAD,GBPCAD,~CADJPY,NZDCAD,~CADCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

NZDCAD, "NZD/CAD"

NZDUSD,USDCAD,~EURNZD,~GBPNZD,NZDJPY,~AUDNZD,NZDCHF,NZDCAD,EURCAD,GBPCAD,~CADJPY,~CADCHF,AUDCAD

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

NZDCHF, "NZD/CHF"

NZDUSD,USDCHF,~EURNZD,~GBPNZD,NZDJPY,~AUDNZD,NZDCHF,NZDCAD,EURCHF,GBPCHF,~CHFJPY,CADCHF,AUDCHF

,,,,,,,,,,,,

0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769,0.0769

*USD, "USD"

~EURUSD,~GBPUSD,USDCHF,USDJPY,USDCAD,~AUDUSD,~NZDUSD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*EUR, "EUR"

EURUSD,EURGBP,EURCHF,EURJPY,EURCAD,EURAUD,EURNZD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*GBP, "GBP"

GBPUSD,~EURGBP,GBPCHF,GBPJPY,GBPCAD,GBPAUD,GBPNZD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*CHF, "CHF"

~USDCHF,~EURCHF,~GBPCHF,CHFJPY,~CADCHF,~AUDCHF,~NZDCHF

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*CAD, "CAD"

~USDCAD,~EURCAD,~GBPCAD,CADJPY,CADCHF,~AUDCAD,~NZDCAD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*JPY, "JPY"

~USDJPY,~EURJPY,~GBPJPY,~CHFJPY,~CADJPY,~AUDJPY,~NZDJPY

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*AUD, "AUD"

AUDUSD,~EURAUD,~GBPAUD,AUDJPY,AUDCAD,AUDCHF,AUDNZD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

*NZD, "NZD"

NZDUSD,~EURNZD,~GBPNZD,NZDJPY,~AUDNZD,NZDCHF,NZDCAD

,,,,,,

.175,.175,.175,.175,.1,.1,.1

 

PlaySound y Alerta

Hola, ¿hay alguna forma de que la función Play Sound y la alerta se ejecuten sólo una vez (indicador )? O simplemente puede utilizar ea Sleep (500)

Gracias

 

Indicador de objetivo de beneficio y stop loss o EA

Hola,

Tengo un problema en mi indicador que he notado en el caso de lograr Profit target y stop loss. ¿Cómo modificar el código que el aviso se mostró sólo por un tiempo?

Por ejemplo: cada 10 segundos

Traté de usar la función : Sleep (), por desgracia, sin éxito.

Gracias por su ayuda

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

extern bool Porcentaje = true;

extern bool Reproducir_Sonido = true;

extern double Riesgo = 2.0;

//+------------------------------------------------------------------+

//| función de inicio de experto ||

//+------------------------------------------------------------------+

int inicio()

{

//----

if (Porcentaje == true)

if (Play_Sound == true)

double stop =SaldoDeCuenta()*(-Riesgo)/100;

double beneficio =Saldo de la cuenta()*(Riesgo)/100;

double beneficio_flotante =Beneficio_de_cuenta();

{

if(StrToDouble(floating_profit) <= stop)

{

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Stopp-loss "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundo());

{

if(StrToDouble(floating_profit) >= profit) {

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Beneficio-objetivo "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

return(0);

}
 

Indicador de objetivo de beneficio y Stop loss o EA

Hola,

Tengo un problema en mi indicador que he notado en el caso de lograr el objetivo de beneficio y la pérdida de la parada. ¿Cómo modificar el código que el aviso se mostró sólo por un tiempo?

Por ejemplo: cada 10 segundos

Traté de usar la función : Sleep (), por desgracia, sin éxito.

Gracias por su ayuda

//| función de inicialización del experto |

//+------------------------------------------------------------------+

extern bool Porcentaje = true;

extern bool Reproducir_Sonido = true;

extern double Riesgo = 2.0;

//+------------------------------------------------------------------+

//| función de inicio de expertos ||.

//+------------------------------------------------------------------+

int inicio()

{

//----

if (Porcentaje == true)

if (Play_Sound == true)

double stop =SaldoDeCuenta()*(-Riesgo)/100;

double beneficio =Saldo de la cuenta()*(Riesgo)/100;

double beneficio_flotante =Beneficio_de_cuenta();

{

if(StrToDouble(floating_profit) <= stop)

{

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Stopp-loss "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundo());

{

if(StrToDouble(floating_profit) >= profit) {

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Beneficio-objetivo "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

return(0);

}
 

Función de sonido y alerta

Hola,

Tengo un problema en mi indicador que he notado en el caso de alcanzar el objetivo de ganancias y la pérdida de la parada. ¿Cómo modificar el código que el aviso se mostró sólo por un tiempo?

Por ejemplo: cada 10 segundos

Traté de usar la función : Sleep (), lamentablemente sin éxito.

Gracias por su ayuda

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

extern bool Porcentaje = true;

extern bool Reproducir_Sonido = true;

extern double Riesgo = 2.0;

//+------------------------------------------------------------------+

//| función de inicio de experto ||

//+------------------------------------------------------------------+

int inicio()

{

//----

if (Porcentaje == true)

if (Play_Sound == true)

double stop =SaldoDeCuenta()*(-Riesgo)/100;

double beneficio =Saldo de la cuenta()*(Riesgo)/100;

double beneficio_flotante =Beneficio_de_cuenta();

{

if(StrToDouble(floating_profit) <= stop)

{

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Stopp-loss "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundo());

{

if(StrToDouble(floating_profit) >= profit) {

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Beneficio-objetivo "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

return(0);

}
 

Alerta de SL y PT EA

Hola,

Tengo un problema en mi EA que he notado en el caso de lograr el objetivo de beneficio y la pérdida de la parada. ¿Cómo modificar el código que el aviso se mostró sólo por un tiempo?

Por ejemplo: cada 10 segundos

Traté de usar la función : Sleep (), lamentablemente sin éxito.

Gracias por su ayuda

//+------------------------------------------------------------------+

//| expert initialization function |

//+------------------------------------------------------------------+

extern bool Porcentaje = true;

extern bool Reproducir_Sonido = true;

extern double Riesgo = 2.0;

//+------------------------------------------------------------------+

//| función de inicio de experto ||

//+------------------------------------------------------------------+

int inicio()

{

//----

if (Porcentaje == true)

if (Play_Sound == true)

double stop =SaldoDeCuenta()*(-Riesgo)/100;

double beneficio =Saldo de la cuenta()*(Riesgo)/100;

double beneficio_flotante =Beneficio_de_cuenta();

{

if(StrToDouble(floating_profit) <= stop)

{

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Stopp-loss "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundo());

{

if(StrToDouble(floating_profit) >= profit) {

if(Play_Sound) PlaySound("alert.wav");

Alert("Precio de advertencia: Beneficio-objetivo "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

return(0);

}
 
Archivos adjuntos:
sb.mq4  7 kb
 

¿Alguna ayuda con esto por favor?

Estoy usando un indicador de flechas en un EA, así que cuando activo el EA no obtengo un valor vía icustom hasta que aparece la primera flecha

¿Cuál es el bucle para comprobar en el indicador y encontrar el último valor de la flecha?

 

Hola chicos,

puede alguien codificar esta simple idea ..

si la vela cierra por encima de una media móvil ... dar una alerta ... hasta que la vela cierre por debajo de la misma media móvil .. y también .. dar una alerta