Como eu monto meu conselheiro por tentativa e erro - página 20

 

Hoje vou testar esta função em uma conta real

nas linhas indicadoras FiboPivot_V2

é necessário inserir o nome curto do indicador - para eliminá-lo

- se você não apagar o indicador - ele ajustará as linhas novamente e reabrirá a posição

fetch

Arquivos anexados:
 

aqui está um grande indicador https://www.mql5.com/ru/code/26585

Densidade de preços

para minha EA

a horizontal trabalhará compra e os números SL

input string   t8="------ NAME Open ------";          //
input string   InpHLineBUY          = "(- ВНИЗУ -)";  // Name open buy (- ВНИЗУ -)
input string   InpHLineSELL         = "(- ВВЕРХУ -)"; // Name open sell (- ВВЕРХУ -)
input bool     InpReverse01         = false;          // Reverse Open - переворот торгового сигнала
input string   short_name           = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input string   t9="------ NAME Close ------";         //
input string   InpHLineCloseBUY     = "(- ВНИЗУ -)";  // Name Close buy (- ВНИЗУ -)
input string   InpHLineCloseSELL    = "(- ВВЕРХУ -)"; // Name Close sell (- ВВЕРХУ -)
input bool     InpReverse10         = false;          // Reverse Close - переворот торгового сигнала
input string   short_name0          = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input bool     Inpres               = false;          // Delete All Indicators
//+------------------------------------------------------------------+

vá para Lista de Objetos e copie o nome. qualquer linha ou dígito

ou você pode definir estes ícones abaixo BUY e STOP - para que você não tenha que apagar o indicador

IMEI

Price density
Price density
  • www.mql5.com
Работа индикатора идёт с барами, которые видимы в окне графика.  График разбивается на зоны ("Zone") и в каждой зоне пдсчитывается количество попаданий цен. Принцип расчёта: если цена High или Low попадает в зону, считается, что в этой зоне счётчик попаданий...
 
afinou os sons. quando abre - quando fecha - quando alcança o alvo de equilíbrio.
 
input bool     InpOnlyLimit         = false;          // Выставить отложенный ордер
input bool     InpOnlystart         = true;           // Вкл. Buy\Sell

todas as ações podem ser mudadas paraordens pendentes em conjunto ou individualmente

uma ordem pendente segue o preço como uma rede de arrasto

sinput string  t3="------ Варианты ордеров ------";   //
input uint     maxLimits            = 1;              // Кол-во отложенных.ордеров в сетке в одну сторону
input int      InpPenStep           = 25;             // Шаг сетки, пунктов
input string   t4="------ Trailing ордеров ------";   //
input bool     InpStopTrailing      = true;           // ВКЛ.Trailing отлож.ордеров(ВЫКЛ.если больше 1 в сетке)
input ushort   InpTrailingPenStop   = 25;             // Trailing Stop of a Orders. "0" --> off and Trailing Step is not important
input ushort   InpTrailingPenStep   = 5;              // Trailing Step of a Orders
input string   t5="------ в ту же сторону ------";    //
input bool     ReverseOne           = false;          // BUYLIMIT SELLLIMIT
input bool     ReverseOny           = true;           // BUYSTOP SELLSTOP
input string   t6="------ на оборот ------";          //
input bool     ReverseOne1          = false;          // SELLLIMIT BUYLIMIT
input bool     ReverseOny1          = false;          // SELLSTOP BUYSTOP

o nome do objeto foi acionado e a ordem pendente é mostrada na imagem abaixo

InkedEURJPYH2_LI

o objeto circulado ainda não foi alcançado - ele espera até que o preço atual caia abaixo do objeto

Foto por

agora se o SELLSTOP for acionado - acima eu defini o nome do objeto para fechar oSELL

se não houverSELLSTOP e o preço subir, o objeto de fechamento será excluído.

e a ordem pendente seguirá o preço

-------------------------------------------------------------------------------

o que falta neste EA é um nome Arrasto de um objeto .

Precisamos melhorar esta função

 

Estou colocando o som no lugar errado aqui.

//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void CloseAllProfit0()
  {
//---
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(Extposition.SelectByIndex(i)) // selects the position by index for further access to its properties
        {
         if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/
             SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n>InTakeProfit)
            ClosePosition(Extposition.Symbol()); // close a position by the specified symbo
         if(UseSound)
            PlaySound("ok.wav");
        }
  }
//+------------------------------------------------------------------+
//| start function                                                   |
//+------------------------------------------------------------------+
void CloseAllLoss0()
  {
//---
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(Extposition.SelectByIndex(i)) // selects the position by index for further access to its properties
        {
         if((PositionGetDouble(POSITION_PROFIT)/PositionGetDouble(POSITION_VOLUME)/
             SymbolInfoDouble(Symbol(),SYMBOL_TRADE_TICK_VALUE))/n<-InStopLoss)
            ClosePosition(Extposition.Symbol());  // close a position by the specified symbo
         if(UseSound)
            PlaySound("ok.wav");
        }
  }
//+------------------------------------------------------------------+

Vou consertá-lo e anexar o arquivo.

Alguém pode me dizer onde colocá-lo?

         if(UseSound)
            PlaySound("ok.wav");

Consegui.

Aqui está.

//+------------------------------------------------------------------+
//| Close selected position                                          |
//+------------------------------------------------------------------+
void ClosePosition(const string symbol)
  {
   if(InitTrade(symbol))
      ExtTrade.PositionClose(Extposition.Ticket()); // close a position by the specified symbo
   if(UseSound)
      PlaySound("ok.wav");
  }
//+------------------------------------------------------------------+
Arquivos anexados:
 
Aleksandr Klapatyuk:

todas as ações podem ser mudadas paraordens pendentes em conjunto ou individualmente

uma ordem pendente segue o preço como uma rede de arrasto

o nome do objeto foi acionado e a ordem pendente é mostrada na imagem abaixo

o objeto circulado ainda não foi alcançado - ele espera até que o preço atual caia abaixo do objeto

agora se o SELLSTOP for acionado - acima eu defini o nome do objeto para fechar oSELL

se não houverSELLSTOP e o preço subir, o objeto de fechamento será excluído.

e a ordem pendente seguirá o preço

-------------------------------------------------------------------------------

o que falta neste EA é um nome Arrasto de um objeto .

esta característica precisa ser melhorada

eu fiquei em posição - o que nos espera?

Foto por

moveu o objeto nomeado - para fechar a SELL

Instantâneo2

moveu um objeto nomeado para a SELL .

precisamos definir isto automaticamente.

Eu não moveria o objeto, mas o Conselheiro Especialista moveria o objeto nomeado.

Instantâneo3

movido abaixo - o objeto para 118.811SELL fechar

abaixo

moveu mais

Instantâneo7

Eu quero mostrar, mas de jeito nenhum - eu o movi para perto da linha

Foto8

durante a digitação - fechado sobre o objeto nomeado

Tiro9

Tiro10


 

https://www.mql5.com/ru/forum/233860/page43#comment_13219147

Muito obrigado!Vladimir Karputov Boa saúde para você e seus entes queridos!

adicionou sua característica ao meu Consultor Especialista

input string   t8="------ NAME Open ------";          //
input string   InpHLineBUY          = "(- ВНИЗУ -)";  // Name open buy (- ВНИЗУ -)
input string   InpHLineSELL         = "(- ВВЕРХУ -)"; // Name open sell (- ВВЕРХУ -)
input bool     InpReverse01         = false;          // Reverse Open - переворот торгового сигнала
input string   short_name           = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input string   t9="------ NAME Close ------";         //
input string   InpHLineCloseBUY     = "(- ВНИЗУ -)";  // Name Close buy (- ВНИЗУ -)
input string   InpHLineCloseSELL    = "(- ВВЕРХУ -)"; // Name Close sell (- ВВЕРХУ -)
input bool     InpReverse10         = false;          // Reverse Close - переворот торгового сигнала
input string   short_name0          = "INDICATOR";    // INDICATOR_SHORTNAME Delete
input bool     Inpres               = false;          // Delete All Indicators
input string   t10="------ Trailing Obj:Line ------"; //
input string   InpObjDownName       = "(- ВНИЗУ -)";  // Obj: Follows the price up (Horizontal Line)
input string   InpObjUpName         = "(- ВВЕРХУ -)"; // Obj: Follows the price down (Horizontal Line)
input ushort   InpObjTrailingStop   = 15;             // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStep   = 5;              // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
//+------------------------------------------------------------------+
Вечер выходного дня
Вечер выходного дня
  • 2019.09.14
  • www.mql5.com
В этой теме исключительно на выходных принимаются заявки на "быстро забацать MQL5 советника...
Arquivos anexados:
 

Dois em uma das utilidades

https://www.mql5.com/ru/code/26353

Vladimir Karputov:

Movimenta dois objetos -linhas horizontais


https://c.mql5.com/3/291/Trailing_Objects.mq5

input string   t0="------ Obj:Line ------";           //
input string   InpObjDownName0         = "BUY";       // Obj: Follows the price down (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand=close_sells; // Obj:  command: ВВЕРХУ
input string   InpObjUpName0           = "SELL";      // Obj: Follows the price up (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand0=close_buys; // Obj:  command: ВНИЗУ
input string   t1="------ Trailing Obj:Line ------";  //
input string   InpObjUpName            = "BUY";       // Obj: Follows the price down (Horizontal Line)
input string   InpObjDownName          = "SELL";      // Obj: Follows the price up (Horizontal Line)
input ushort   InpObjTrailingFrequency = 10;          // Obj: Trailing, in seconds (< "10" -> only on a new bar)
input ushort   InpObjTrailingStop      = 15;          // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStep      = 5;           // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
//---
Trade command
Trade command
  • www.mql5.com
Советник во входных параметрах имеет шесть команд: Close All Buy's - закрыть все позиции BUY по текущему символу, magic number позиций не учитывается Close All Sell's - закрыть все позиции SELL по текущему символу, magic number позиций не учитывается Close All Buy's and Sell's - закрыть все позиции BUY и SELL по текущему символу, magic number...
Arquivos anexados:
 
Aleksandr Klapatyuk:

Dois em uma das utilidades

https://www.mql5.com/ru/code/26353

Vladimir Karputov:

Movimenta dois objetos - linhas horizontais


https://c.mql5.com/3/291/Trailing_Objects.mq5

Também acrescentei quatro linhas horizontais que podem ser usadas para abrir ou fechar em qualquer direção - bem, e arrasto.

Linha horizontal - para arrasto . caso contrário, você pode usar qualquer objeto nomeado.

input string   t0="------ Obj:Line Open ------";      //
input string   InpObjDownName0         = "TOP";       // Obj: Follows the price down (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand=open_sell;   // Obj:  command: ВВЕРХУ
input string   InpObjUpName0           = "LOWER";     // Obj: Follows the price up (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand0=open_buy;   // Obj:  command: ВНИЗУ
input string   t1="------ Obj:Line Close ------";     //
input string   InpObjDownName02        = "TOP DELL";  // Obj: Follows the price down (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand2=close_sells;// Obj:  command: ВВЕРХУ
input string   InpObjUpName02          = "LOWER DELL";// Obj: Follows the price up (Horizontal Line)
input ENUM_TRADE_COMMAND InpTradeCommand02=close_buys;// Obj:  command: ВНИЗУ
input string   t2="------ Trailing Obj:Line ------";  //
input string   InpObjUpName            = "TOP DELL";  // Obj: Follows the price down (Horizontal Line)
input string   InpObjDownName          = "LOWER DELL";// Obj: Follows the price up (Horizontal Line)
input ushort   InpObjTrailingFrequency = 10;          // Obj: Trailing, in seconds (< "10" -> only on a new bar)
input ushort   InpObjTrailingStop      = 15;          // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStep      = 5;           // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
//---
Arquivos anexados:
 
Aleksandr Klapatyuk:

Também acrescentei quatro linhas horizontais que podem ser usadas para abrir e fechar em qualquer direção - e para arrasto.

A linha horizontal é para arrasto . caso contrário, você pode usar qualquer objeto nomeado.

atualização - na próxima página
Razão: