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

 
Alexsandr San:

Outra função foi acrescentada. Só é preciso verificá-lo em tempo real no terminal.

esta versão é assim - No Jogo do Testador

Não é uma má função, eu lhe digo. Vai aqui e ali, tira seus lucros e não liga para nada.

Shot3.PNG

Tiro4

Mas o código precisa de alguns ajustes. Está funcionando bem.

//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool CloseLotBuy(void)
  {
   bool res=false;
   double level;
   double PROFIT_BUY=0.00;
   PROFIT_BUY=m_position.Commission()+m_position.Swap()+m_position.Profit();
//---
   if(m_position.Symbol()==m_symbol.Name())
     {
      if(m_position.PositionType()==POSITION_TYPE_BUY)
        {
         if(PROFIT_BUY<-TargetStopLoss || PROFIT_BUY>=TargetTakeProfit)
           {
            if(FreezeStopsLevels(level))
               ClosePositions(POSITION_TYPE_BUY,level);
           }
        }
      res=true;
     }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool CloseLotSell(void)
  {
   bool res=false;
   double level;
   double PROFIT_SELL=0.00;
   PROFIT_SELL=m_position.Commission()+m_position.Swap()+m_position.Profit();
//---
   if(m_position.Symbol()==m_symbol.Name())
     {
      if(m_position.PositionType()==POSITION_TYPE_SELL)
        {
         if(PROFIT_SELL<-TargetStopLoss || PROFIT_SELL>=TargetTakeProfit)
           {
            if(FreezeStopsLevels(level))
               ClosePositions(POSITION_TYPE_SELL,level);
           }
        }
      res=true;
     }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool OpenLotBuy(void)
  {
   bool res=false;
   double PROFIT_BUY=0.00;
   CloseTikB=iClose(NULL,Period(),0);
   OpenTikB=iOpen(NULL,Period(),0);
//---
   int total=PositionsTotal(); // количество открытых позиций
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name())
           {
            if(total>0)
              {
               ulong position_ticket=PositionGetTicket(total-1); // тикет позиции
              }
            if(total<limit_total_symbol)// количество открытых позиций
              {
               if(OpenTikB<CloseTikB)
                 {
                  if(m_position.PositionType()==POSITION_TYPE_BUY)
                    {
                     PROFIT_BUY=PROFIT_BUY+m_position.Commission()+m_position.Swap()+m_position.Profit();
                     if(PROFIT_BUY<-TargetOpenLot)
                       {
                        double price=m_symbol.Ask();
                        for(uint y=0; y<maxLimits; y++)
                          {
                           //--- open position
                           if(m_trade.PositionOpen(m_symbol.Name(),ORDER_TYPE_BUY,InpLots,price,0.0,0.0))
                              printf("Position by %s to be opened",m_symbol.Name());
                           else
                             {
                              printf("Error opening BUY position by %s : '%s'",m_symbol.Name(),m_trade.ResultComment());
                              printf("Open parameters : price=%f,TP=%f",price,0.0);
                             }
                           res=true;
                          }
                       }
                    }
                 }
              }
           }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool OpenLotSell(void)
  {
   bool res=false;
   double PROFIT_SELL=0.00;
   CloseTikS=iClose(NULL,Period(),0);
   OpenTikS=iOpen(NULL,Period(),0);
//---
   int total=PositionsTotal(); // количество открытых позиций
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name())
           {
            if(total>0)
              {
               ulong position_ticket=PositionGetTicket(total-1); // тикет позиции
              }
            if(total<limit_total_symbol)// количество открытых позиций
              {
               if(OpenTikS>CloseTikS)
                 {
                  if(m_position.PositionType()==POSITION_TYPE_SELL)
                    {
                     PROFIT_SELL=PROFIT_SELL+m_position.Commission()+m_position.Swap()+m_position.Profit();
                     if(PROFIT_SELL<-TargetOpenLot)
                       {
                        double price0=m_symbol.Bid();
                        for(uint y=0; y<maxLimits; y++)
                          {
                           if(m_trade.PositionOpen(m_symbol.Name(),ORDER_TYPE_SELL,InpLots,price0,0.0,0.0))
                              printf("Position by %s to be opened",m_symbol.Name());
                           else
                             {
                              printf("Error opening SELL position by %s : '%s'",m_symbol.Name(),m_trade.ResultComment());
                              printf("Open parameters : price=%f,TP=%f",price0,0.0);
                             }
                           res=true;
                          }
                       }
                    }
                 }
              }
           }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
 
Alexsandr San:

Eu tentei em uma conta real, eu queria um pequeno lucro de duas posições abertas. Eu tinha entrado 160 nas configurações, pensei que fecharia a maior posição menos, mas não, fechou

Pensei que fecharia a maior posição perdedora, mas não fechou. Fechou a que obteve 160 de lucro e fechou ambas as posições e eu sou um otário. Acontece que eu tenho que calcular a partir da primeira posição aberta, adicionando a posição menos.


#propriedade versão "1.017

Só descobri como utilizar corretamente esta função no quinto dia. Agora fecha sobre o lucro total de um par de todas as compras ou vendas

//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool ProfitOnTick(void)
  {
   bool res=false;
   double PROFIT_BUY=0.00;
   double PROFIT_SELL=0.00;

   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of open positions
     {
      string   position_GetSymbol=PositionGetSymbol(i); // GetSymbol позиции
      if(position_GetSymbol==m_symbol.Name())
        {
         if(m_position.PositionType()==POSITION_TYPE_BUY)
           {
            PROFIT_BUY=PROFIT_BUY+PositionGetDouble(POSITION_PROFIT);
           }
         else
           {
            PROFIT_SELL=PROFIT_SELL+PositionGetDouble(POSITION_PROFIT);
           }
        }
     }
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of current positions
      if(m_position.SelectByIndex(i)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name())
           {
            if(m_position.PositionType()==POSITION_TYPE_BUY)
              {
               if(PROFIT_BUY<-TargetStopLoss || PROFIT_BUY>=TargetTakeProfit) // if the profit
                  ClosePosition(m_position.Symbol()); // close a position by the specified symbo
              }
            res=true;
           }
   for(int u=PositionsTotal()-1; u>=0; u--) // returns the number of current positions
      if(m_position.SelectByIndex(u)) // selects the position by index for further access to its properties
         if(m_position.Symbol()==m_symbol.Name())
           {
            if(m_position.PositionType()==POSITION_TYPE_SELL)
              {
               if(PROFIT_SELL<-TargetStopLoss || PROFIT_SELL>=TargetTakeProfit) // if the profit
                  ClosePosition(m_position.Symbol()); // close a position by the specified symbo
              }
            res=true;
           }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
Arquivos anexados:
 
Alexsandr San:

Não é uma má função, eu lhe digo. Aqui e ali, tira seus lucros e não dá a mínima para isso

Eu tenho um código para resolver - tudo parece funcionar bem assim

Eu não posso criar um código para que esta função funcione em um terminal. Quero experimentar em 4 terminais, não sei o que virá disso.

4 nthvbyfkf

4 nthvbyfkf2

 
Alexsandr San:

Não é possível criar código para fazer esta função funcionar em um único terminal. Quero experimentar em 4 terminais, não sei o que sairá de lá

Todos estes 4 terminais - não deram nenhum resultado. E em geral, esta função de Perda - não posso escrever o código.

Mas há muito tempo criei tal lógica de trabalho, somente com Linhas Horizontais. Resta pensar o que multiplicaria o lote

Foto por Figura 1

Colocamos uma linha Horizontal no topo

input string   t3="----- Trailing Line: 1   -----";              //
input string   InpObjUpName                 = "ZTOP";            // Obj: TOP (Horizontal Line)
input int      InpStep1                     = 25;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = Line2_sells;       // Obj:  command:

estabelecer uma linha horizontal no fundo

input string   t3="----- Trailing Line: 1   -----";              //
input string   InpObjDownName               = "ZLOWER";          // Obj: LOWER (Horizontal Line)
input int      InpStep2                     = 25;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = Line1_buys;        // Obj:  command:

assim que o preço tocar estas linhas, a posição será aberta e as linhas horizontais serão definidas

estes -

input string   t4="----- Trailing Line: 2   -----";              //
input string   InpObjUpNameG                = "POT";             // Obj: TOP (Horizontal Line)
input int      InpStep3                     = 25;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = Line2_sells;       // Obj:  command:
input string   InpObjDownNameG              = "REWOL";           // Obj: LOWER (Horizontal Line)
input int      InpStep4                     = 25;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = Line1_buys;        // Obj:  command:
input ushort   InpObjTrailingStopG          = 0;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepG          = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

e a partir destas Linhas Horizontais abrirá uma posição e colocará as primeiras Linhas Horizontais - e assim se repetirá até que o preço seja capaz de alcançá-las
GBPUSDM5figura 2

Aqui é fechado - definido nas configurações, o Lucro

GBPUSDM52figura 3

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

quando atingir um lucro de 200 sobre o par - fechará a posição

GBPUSDM53figura 4

atingiu 200 e fechou todas as posições na compra ou venda - porque você pode abrir em ambas as direções e cada lado tem seu próprio, lucro ou prejuízo

- agora quando atinge a linha horizontal, abre uma posição - mas você pode movê-los manualmente

GBPUSDM54figura 5

 

A função aumenta o lote, a partir de uma perda .

graças a este homemhttps://www.mql5.com/ru/forum/107406#comment_3018721

2732

Igor Kim

//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool OpenLotBuy(void)
  {
   bool res=false;
//---
   double PROFIT_BUY=0.00;
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of open positions
     {
      string   position_GetSymbol=PositionGetSymbol(i); // GetSymbol позиции
      if(position_GetSymbol==m_symbol.Name())
        {
         if(m_position.PositionType()==POSITION_TYPE_BUY)
           {
            PROFIT_BUY=PROFIT_BUY+PositionGetDouble(POSITION_PROFIT);
           }
        }
     }
   double Lots=InpLots;
   double ab=PROFIT_BUY;
   if(ab<-200 && ab>=-400)
      Lots=0.01;
   if(ab<-400 && ab>=-800)
      Lots=0.02;
   if(ab<-800 && ab>=-1600)
      Lots=0.04;
   if(ab<-1600)
      Lots=0.08;
   double price=m_symbol.Ask();
   for(uint y=0; y<maxLimits; y++)
     {
      //--- open position
      if(m_trade.PositionOpen(m_symbol.Name(),ORDER_TYPE_BUY,Lots,price,0.0,0.0))
         printf("Position by %s to be opened",m_symbol.Name());
      else
        {
         printf("Error opening BUY position by %s : '%s'",m_symbol.Name(),m_trade.ResultComment());
         printf("Open parameters : price=%f,TP=%f",price,0.0);
        }
      res=true;
     }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
//| Check for long position closing                                  |
//+------------------------------------------------------------------+
bool OpenLotSell(void)
  {
   bool res=false;
//---
   double PROFIT_SELL=0.00;
   for(int i=PositionsTotal()-1; i>=0; i--) // returns the number of open positions
     {
      string   position_GetSymbol=PositionGetSymbol(i); // GetSymbol позиции
      if(position_GetSymbol==m_symbol.Name())
        {
         if(m_position.PositionType()==POSITION_TYPE_BUY)
           {
            PROFIT_SELL=PROFIT_SELL+PositionGetDouble(POSITION_PROFIT);
           }
        }
     }
   double Lots=InpLots;
   double ab=PROFIT_SELL;
   if(ab<-200 && ab>=-400)
      Lots=0.01;
   if(ab<-400 && ab>=-800)
      Lots=0.02;
   if(ab<-800 && ab>=-1600)
      Lots=0.04;
   if(ab<-1600)
      Lots=0.08;
   double price0=m_symbol.Bid();
   for(uint y=0; y<maxLimits; y++)
     {
      if(m_trade.PositionOpen(m_symbol.Name(),ORDER_TYPE_SELL,Lots,price0,0.0,0.0))
         printf("Position by %s to be opened",m_symbol.Name());
      else
        {
         printf("Error opening SELL position by %s : '%s'",m_symbol.Name(),m_trade.ResultComment());
         printf("Open parameters : price=%f,TP=%f",price0,0.0);
        }
      res=true;
     }
//--- result
   return(res);
  }
//+------------------------------------------------------------------+
Увеличение размера ЛОТА. ПОМОГИТЕ!!!
Увеличение размера ЛОТА. ПОМОГИТЕ!!!
  • 2008.03.07
  • www.mql5.com
Скажите, можно ли как то увеличить размер лота с каждой сделки....??? К примеру, у меня депозит 100, торгую с лотом 0.50. депозит 200, торую 1...
 

#propriedade versão "1.018

possibilidade adicional, para aumentar o tamanho do lote da perda em moeda

input string   tL="----  Lots Parameters    -----";              //
input uint     maxLimits                    = 1;                 // Кол-во Позиции Открыть в одну сторону
input double   InpLots1                     = 0.01;              // Lots 1
input int      InpLots_01                   = 500;               // До убытка валюте Lots 0.01
input double   InpLots2                     = 0.02;              // Lots 2
input int      InpLots_02                   = 1000;              // До убытка валюте Lots 0.02
input double   InpLots3                     = 0.04;              // Lots 3
input int      InpLots_03                   = 2000;              // До убытка валюте Lots 0.04
input double   InpLots4                     = 0.08;              // Lots 4

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

aumento de lote em ação. Só é necessário pegar uma quantidade em configurações, 4 níveis - a última quantidade, mais de 2000 abrirá o lote 0,08

GBPUSDM5h

na imagem destas linhas, posição aberta, e também pode ser definido nas configurações de arrasto estas linhas

input string   t3="----- Trailing Line: 1   -----";              //
input string   InpObjUpName                 = "ZTOP";            // Obj: TOP (Horizontal Line)
input int      InpStep1                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = Line2_sells;       // Obj:  command:
input string   InpObjDownName               = "ZLOWER";          // Obj: LOWER (Horizontal Line)
input int      InpStep2                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = Line1_buys;        // Obj:  command:
input ushort   InpObjTrailingStop           = 0;                 // 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)
input string   t4="----- Trailing Line: 2   -----";              //
input string   InpObjUpNameG                = "POT";             // Obj: TOP (Horizontal Line)
input int      InpStep3                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = Line2_sells;       // Obj:  command:
input string   InpObjDownNameG              = "REWOL";           // Obj: LOWER (Horizontal Line)
input int      InpStep4                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = Line1_buys;        // Obj:  command:
input ushort   InpObjTrailingStopG          = 0;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepG          = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

no lugar de 0 distância definida= 0;// Objeto: Trailing Stop (distância do preço ao objeto, em pips)

----------------------------ВАЖНО!

Quando o sinal dispara, a linha deve ser afastada mais da barra, caso contrário o sinal será disparado repetidamente.

Aqui está a situação - quando se arrasta uma linha horizontal e salta de volta para a mesma barra quando o comando é acionado

XAUUSDM5

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

Para que a linha Horizontal não seja repetida, ajuste 0 = 20;// Objeto: Passo da grade, pontos("0" -> falso)

a zero, ele executará o comando e será apagado

Arquivos anexados:
 
Alexsandr San:

A função aumenta o lote, a partir de uma perda .

graças a este homemhttps://www.mql5.com/ru/forum/107406#comment_3018721

2732

Testei esta função hoje com a linha horizontal para uma perda (como o preço foi na direção errada, encontra uma linha horizontal em seu caminho, a partir dela abre uma posição e a linha salta mais longe, por uma determinada distância, a perda aumenta e na próxima vez que atingir a linha horizontal, o lote se abrirá com um aumento).

Estou atordoado. - Esta lógica, puxa tudo para o lado positivo. Por quanto se pode vender um milagre desses!

Instantâneo3

----------------------------------------- aqui está outro exemplo - o preço vai contra mim. esta é a primeira foto, vou mostrar a segunda como ela funciona.

USDJPYM5 figura 1

USDJPYM5z Figura 2

Foto por Figura 3

 

Para entender como tudo isso funciona

Existem botões no Utilitário (COMPRA e VENDA), eles fazem todos os comandos que as Linhas Horizontais fazem - você pode apenas olhar para cima no testador para ver como ele funciona .

Configurando os Botões ----------------

input string   t7="----- Button:            -----";              //
input ENUM_TRADE_COMMAND InpTradeCommandBut = Line1_buys;        // Obj(BUY):  command:Button: BUY
input ENUM_TRADE_COMMAND InTradeCommandBut  = Line2_sells;       // Obj(SELL):  command:Button: SELL
input int      TrailingStop_STOP_LEVEL      = 36;                // Button: Trailing Stop LEVEL

Configuração das Linhas Horizontais --------------------

input string   t3="----- Trailing Line: 1   -----";              //
input string   InpObjUpName                 = "ZTOP";            // Obj: TOP (Horizontal Line)
input int      InpStep1                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = Line2_sells;       // Obj:  command:
input string   InpObjDownName               = "ZLOWER";          // Obj: LOWER (Horizontal Line)
input int      InpStep2                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = Line1_buys;        // Obj:  command:
input ushort   InpObjTrailingStop           = 0;                 // 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)
input string   t4="----- Trailing Line: 2   -----";              //
input string   InpObjUpNameG                = "POT";             // Obj: TOP (Horizontal Line)
input int      InpStep3                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = Line2_sells;       // Obj:  command:
input string   InpObjDownNameG              = "REWOL";           // Obj: LOWER (Horizontal Line)
input int      InpStep4                     = 20;                // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = Line1_buys;        // Obj:  command:
input ushort   InpObjTrailingStopG          = 0;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepG          = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

Aqui estão os comandos que podem ser executados --------------------------------

//+------------------------------------------------------------------+
//| ENUM_TRADE_COMMAND                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Turn_Off=0,       // TURN OFF
   Line1_Line1=1,    // Line: LOWER
   Line2_Line2=2,    // Line: TOP
   Line_Line=3,      // Line: LOWER+Line: TOP
   Line1_buys=4,     // Line: LOWER+Buy's
   Line2_sells=5,    // Line: TOP+Sell's
   sells_Line1=6,    // Line: LOWER+Sell's
   buys_Line2=7,     // Line: TOP+Buy's
   close_buys=8,     // Close All Buy's
   close_sells=9,    // Close All Sell's
   close_all=10,     // Close All Buy's and Sell's
   open_buy=11,      // Open Buy
   open_sell=12,     // Open Sell
   close_open_b=13,  // Close Sell+Open Buy
   close_open_s=14,  // Close Buy+Open Sell
   open_buy_sell=15, // Open Buy and Sell
  };
//+------------------------------------------------------------------+

Função lucro

------------ O lucro não é comum - Comprar tem seu próprio lucro Vender tem seu próprio lucro (por exemplo, você tem duas posições abertas uma nacompra e outra navenda nas configurações que você quer ganhar 100, portanto, enquanto cada um deles não vai tirar 100).

input double   TargetTakeProfit             = 1000000;           // Прибыль на паре в валюте
Важно!!! правильно настроить , открытии лота (До убытка валюте)
input string   tL="----  Lots Parameters    -----";              //
input uint     maxLimits                    = 1;                 // Кол-во Позиции Открыть в одну сторону
input double   InpLots1                     = 0.01;              // Lots 1
input int      InpLots_01                   = 500;               // До убытка валюте Lots 0.01
input double   InpLots2                     = 0.02;              // Lots 2
input int      InpLots_02                   = 1000;              // До убытка валюте Lots 0.02
input double   InpLots3                     = 0.04;              // Lots 3
input int      InpLots_03                   = 2000;              // До убытка валюте Lots 0.04
input double   InpLots4                     = 0.08;              // Lots 4

Há duas perdas no par - a perda total e (compra e venda, cada um deles tem sua própria perda)

Aqui, o cálculo é realizado na perda decomprar sua perda davenda de seu

 

Correção leve - para que a linha horizontal reaja mais rapidamente ao sinal.

Houve uma situação - o preço tocado, cruzou a linha horizontal, mas não acionou.

não funcionou

#propriedade versão "1.019

Arquivos anexados:
 

Experimentando uma nova função . O calendário dá um sinal, um comando pode ser selecionado a partir do sinal

input string   t10="---- CalendarValueLast  -----";              //
input bool     Inpndar                      = false;             // Сигнал Календаря Включить
input ENUM_TRADE_COMMAND InpCalendCommandS  = Line_Line;         // Trade command:

Eu ainda preciso pensar sobre quais outros comandos são necessários para o calendário.

Eu já tenho estes.

//+------------------------------------------------------------------+
//| ENUM_TRADE_COMMAND                                                 |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Turn_Off=0,       // TURN OFF
   Line1_Line1=1,    // Line: LOWER
   Line2_Line2=2,    // Line: TOP
   Line_Line=3,      // Line: LOWER+Line: TOP
   Line1_buys=4,     // Line: LOWER+Buy's
   Line2_sells=5,    // Line: TOP+Sell's
   sells_Line1=6,    // Line: LOWER+Sell's
   buys_Line2=7,     // Line: TOP+Buy's
   close_buys=8,     // Close All Buy's
   close_sells=9,    // Close All Sell's
   close_all=10,     // Close All Buy's and Sell's
   open_buy=11,      // Open Buy
   open_sell=12,     // Open Sell
   close_open_b=13,  // Close Sell+Open Buy
   close_open_s=14,  // Close Buy+Open Sell
   open_buy_sell=15, // Open Buy and Sell
  };
//+------------------------------------------------------------------+

imagem definir a Utilidade, esta é a imagem 1. a segunda será com o comando executado (Linhas horizontais a uma determinada distância)

Instantâneo7Figura 1


Razão: