Olá, como fazer com que, em vez de uma ordem pendente, sua vida útil seja constantemente prejudicada por um determinado número de pips em relação ao preço, uma vez a cada minuto?
Primeiro: você precisa executar o texto da pergunta pelo menos no Word - essa ação corrigirá o texto e adicionará sinais de pontuação nos lugares certos...
Versão 1.001 - função LotsOrRisk corrigida
Você pode fazer o download em Return Strategy :
Oi Vladimir,
Obrigado pela correção.
Podemos dizer que a função de lucro total (em pontos) não tem a mesma funcionalidade que o lucro alvo ou o lucro mínimo?
Oi Vladimir,
Obrigado pela correção.
Podemos dizer que a função de lucro total (em pontos) não tem a mesma funcionalidade que o lucro alvo ou o lucro mínimo?
A pergunta não está clara: não há"lucro alvo" e"lucro mínimo" no EA.
Como procurar respostas: pegue o parâmetro de entrada "Total profit (in pips)" (Lucro total (em pips)) e veja qual variável é responsável por ele:
input ushort InpTotalProfit = 100; // Lucro total (em pips)
... procure a primeira ocorrência de "InpTotalProfit".
ExtTotalProfit = InpTotalProfit * m_adjusted_point; ... agora procure a primeira ocorrência de'ExtTotalProfit' ...
//--- if(CalculateTotalProfit()>=ExtTotalProfit) { bln_close_all=true; return; }
... resta estudar a função 'CalculateTotalProfit()' ...
Boa tarde!
Qual pode ser o motivo da mensagem no registro durante o teste? As configurações do Expert Advisor são adotadas por padrão.
2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21783 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21795 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Buy Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Buy Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Buy Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Buy Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Sell Limit (0) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.968 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.968 2021.01.11 10:57:26 #3 Sell Limit (1) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.968 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.968 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.969 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.969 2021.01.11 10:57:26 #3 Sell Limit (2) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.969 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Broker comment: 2021.10.30 10:20:44.969 2021.01.11 10:57:26 CTrade::OrderOpen: Invalid expiration type 2021.10.30 10:20:44.969 2021.01.11 10:57:26 #3 Sell Limit (3) -> false. Result Retcode: 10022, description of result: invalid expiration 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Code of request result: 10022 2021.10.30 10:20:44.969 2021.01.11 10:57:26 code of request result as a string: invalid expiration 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Deal ticket: 0 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Order ticket: 0 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Volume of deal or order: 0.00 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Price, confirmed by broker: 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current bid price: 1.21782 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Current ask price: 1.21794 (the requote): 0.00000 2021.10.30 10:20:44.969 2021.01.11 10:57:26 Broker comment:
Atenciosamente, Vladimir.
Tenho vergonha de perguntar: não é suportado por quem ou por quê?
Saudações, Vladimir.
- Aplicativos de negociação gratuitos
- 8 000+ sinais para cópia
- Notícias econômicas para análise dos mercados financeiros
Você concorda com a política do site e com os termos de uso
Estratégia de retorno:
Trabalhando com ordens pendentes Buy Limit e Sell Limit. Grade de ordens pendentes.
Autor: Vladimir Karputov