Como codificar? - página 216

 

Desculpe, esqueci de mudar de assunto.

Deve ser "Obter S/L original de pedido modificado".

Obrigado,

Chris

 

Filtro Coder Combo, por favor

Olá a todos,

Qualquer pode codificar o indicador para mq4, este é combo bar cor filtro multi pares 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,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,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 e Alerta

Olá, há alguma forma de a função PlaySound e alerta funcionar apenas uma vez (indicador )?... Ou você pode usar apenas a função Sleep (500)

Obrigado

 

Meta de lucro e indicador de stop loss ou EA

Olá,

Tenho um problema no meu indicador que notei no caso de atingir a meta de Lucro e parar as perdas. Como modificar o código que o aviso foi exibido apenas por um tempo?

Por exemplo: a cada 10 segundos

Eu tentei usar a função : Dormir (), infelizmente sem sucesso.

Obrigado por sua ajuda.

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

//| expert initialization function |

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

bool externo Porcentagem = verdadeiro;

Bool Play_Sound externo = verdadeiro;

risco duplo externo = 2,0;

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

//| função de início especializado |

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

int start()

{

//----

se (Porcentagem == verdadeiro)

se (Play_Sound == verdadeiro)

parada dupla =AccountBalance()*(-Risk)/100;

duplo lucro =ContaBalance()*(Risco)/100;

double floating_profit =AccountProfit();

{

if(StrToDouble(floating_profit) <= stop)

{

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Stop-loss "+Symbol()+" "+Hour()+": "+Minute()+": "+Seconds())

{

if(StrToDouble(floating_profit) >= lucro) {

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Objetivo de lucro "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

retorno(0);

}
 

Meta de lucro e indicador de stop loss ou EA

Olá,

Tenho um problema no meu indicador que notei no caso de atingir a meta de Lucro e parar as perdas. Como modificar o código que o aviso foi exibido apenas por um tempo?

Por exemplo: a cada 10 segundos

Eu tentei usar a função : Dormir (), infelizmente sem sucesso.

Obrigado por sua ajuda.

//| função de iniciação de especialista |

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

bool externo Porcentagem = verdadeiro;

Bool Play_Sound externo = verdadeiro;

risco duplo externo = 2,0;

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

//| função de início especializado |

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

int start()

{

//----

se (Porcentagem == verdadeiro)

se (Play_Sound == verdadeiro)

parada dupla =AccountBalance()*(-Risk)/100;

duplo lucro =ContaBalance()*(Risco)/100;

double floating_profit =AccountProfit();

{

if(StrToDouble(floating_profit) <= stop)

{

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Stop-loss "+Symbol()+" "+Hour()+": "+Minute()+": "+Seconds())

{

if(StrToDouble(floating_profit) >= lucro) {

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Objetivo de lucro "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

retorno(0);

}
 

Função de sonorização e alerta

Olá,

Tenho um problema no meu indicador que notei no caso de atingir a meta de Lucro e parar as perdas. Como modificar o código que o aviso foi exibido apenas por um tempo?

Por exemplo: a cada 10 segundos

Eu tentei usar a função : Dormir (), infelizmente sem sucesso.

Obrigado por sua ajuda.

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

//| expert initialization function |

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

bool externo Porcentagem = verdadeiro;

Bool Play_Sound externo = verdadeiro;

risco duplo externo = 2,0;

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

//| função de início especializado |

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

int start()

{

//----

se (Porcentagem == verdadeiro)

se (Play_Sound == verdadeiro)

parada dupla =AccountBalance()*(-Risk)/100;

duplo lucro =ContaBalance()*(Risco)/100;

double floating_profit =AccountProfit();

{

if(StrToDouble(floating_profit) <= stop)

{

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Stop-loss "+Symbol()+" "+Hour()+": "+Minute()+": "+Seconds())

{

if(StrToDouble(floating_profit) >= lucro) {

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Objetivo de lucro "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

retorno(0);

}
 

SL e PT Alert EA

Olá,

Tenho um problema no meu EA que notei no caso de atingir a meta de Lucro e parar as perdas. Como modificar o código que o aviso foi exibido apenas por um tempo?

Por exemplo: a cada 10 segundos

Eu tentei usar a função : Dormir (), infelizmente sem sucesso.

Obrigado por sua ajuda.

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

//| expert initialization function |

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

bool externo Porcentagem = verdadeiro;

Bool Play_Sound externo = verdadeiro;

risco duplo externo = 2,0;

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

//| função de início especializado |

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

int start()

{

//----

se (Porcentagem == verdadeiro)

se (Play_Sound == verdadeiro)

parada dupla =AccountBalance()*(-Risk)/100;

duplo lucro =ContaBalance()*(Risco)/100;

double floating_profit =AccountProfit();

{

if(StrToDouble(floating_profit) <= stop)

{

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Stop-loss "+Symbol()+" "+Hour()+": "+Minute()+": "+Seconds())

{

if(StrToDouble(floating_profit) >= lucro) {

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

Alert("Alerta.wav"); Alerta("Preço de aviso: Objetivo de lucro "+Símbolo()+" "+Hora()+": "+Minuto()+": "+Segundos());

}}}}

//----

retorno(0);

}
 
Arquivos anexados:
sb.mq4  7 kb
 

Alguma ajuda com este, por favor?

Estou usando um indicador de seta em um EA, então quando ativo o EA não recebo um valor via icustom até que a primeira seta apareça

Qual é o laço para verificar novamente no indicador e encontrar o último valor da seta?

 

Oi, pessoal,

alguém pode codificar esta simples idéia ...

se uma vela se fecha acima de uma média móvel... dar um alerta ... untilcandle fecha abaixo da mesma média móvel ... e também ... dar um alerta