Cómo armo mi asesor por ensayo y error - página 54

 
Alexsandr San:

Se ha añadido otra función. Sólo hay que comprobarlo en tiempo real en el terminal.

esta versión es así - En el probador jugando

No es una mala función, te lo aseguro. Va aquí y allá, se lleva sus beneficios y no le importa una mierda.

Toma3.PNG

Tiro4

Pero el código necesita algunos ajustes. Funciona bien.

//+------------------------------------------------------------------+
//| 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:

Lo probé en una cuenta real, quería un pequeño beneficio de dos posiciones abiertas. Había introducido 160 en la configuración, pensé que cerraría la posición más grande de menos, pero no, cerró

Pensé que cerraría la posición más perdedora pero no lo hizo, cerró la que obtuvo 160 de beneficio y cerró las dos posiciones y yo soy un pringado. Resulta que tengo que calcular desde la primera posición abierta, añadiendo el menos uno.


#versión de la propiedad "1.017"

Hasta el quinto día no he descubierto cómo utilizar correctamente esta función. Ahora se cierra sobre el beneficio total en un par de todas las compras o ventas

//+------------------------------------------------------------------+
//| 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);
  }
//+------------------------------------------------------------------+
Archivos adjuntos:
 
Alexsandr San:

No es una mala función, le digo. Aquí y allá, se lleva sus beneficios y le importa un bledo

Tengo que modificar el código para que funcione - todo parece funcionar bien

No puedo crear un código para que esta función funcione en un terminal. Quiero probarlo en 4 terminales, no sé qué saldrá de ello

4 nthvbyfkf

4 nthvbyfkf2

 
Alexsandr San:

No se puede crear un código para que esta función funcione en un terminal. Quiero probarlo en 4 terminales, no sé qué saldrá de ahí

Todos estos 4 terminales - no dieron ningún resultado. Y en general, esta función de Loss - no puedo escribir el código.

Pero hace tiempo que he creado esa lógica de trabajo, sólo con Líneas Horizontales. Queda por pensar qué multiplicaría el lote

Foto de Imagen 1

Fijamos una línea horizontal en la parte superior

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:

establecer una línea horizontal en la parte inferior

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:

en cuanto el precio toque estas líneas, se abrirá la posición y se fijarán las líneas horizontales

estos -

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)

y a partir de estas Líneas Horizontales abrirá una posición y pondrá las primeras Líneas Horizontales - y así se repetirá hasta que el precio sea capaz de alcanzarlas
GBPUSDM5Figura 2

Aquí está cerrado - establecido en la configuración, el Beneficio

GBPUSDM52Figura 3

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

cuando alcance un beneficio de 200 en el par - cerrará la posición

GBPUSDM53Figura 4

alcanzó los 200 y cerró todas las posiciones en compra o venta - porque se puede abrir en ambas direcciones y cada lado tiene su propia, ganancia o pérdida

- ahora cuando llega a la línea Horizontal, abre una posición - pero puede moverlas manualmente

GBPUSDM54Figura 5

 

La función aumenta el lote, de una pérdida .

gracias a este hombrehttps://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...
 

#versión de la propiedad "1.018"

posibilidad añadida, de aumentar el tamaño del lote de la pérdida en moneda

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 la acción. Sólo es necesario recoger una cantidad en ajustes, 4 niveles - la última cantidad, más de 2000 abrirá el lote 0.08

GBPUSDM5h

en la imagen de estas líneas, posición abierta, y también se puede establecer en la configuración de arrastre de estas líneas

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)

en lugar de 0 set distancia= 0;// Obj: Trailing Stop (distancia del precio al objeto, en pips)

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

Cuando se dispara una señal, la línea debe ajustarse para que rebote más allá de la barra, de lo contrario la señal se disparará repetidamente.

Esta es la situación - cuando se arrastra una línea Horizontal y se rebota en la misma barra cuando se dispara el comando

XAUUSDM5

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

Para que la línea horizontal no se repita, establece 0 = 20;// Obj: Paso de la rejilla, puntos("0" -> false)

a cero, se ejecutará el comando y se borrará

Archivos adjuntos:
 
Alexsandr San:

La función aumenta el lote, de una pérdida .

gracias a este hombrehttps://www.mql5.com/ru/forum/107406#comment_3018721

2732

Hoy he probado esta función con la línea horizontal para una pérdida (como el precio fue en una dirección equivocada, se encuentra con una línea horizontal en su camino, de ella se abre una posición y la línea salta más lejos, por una distancia determinada, la pérdida aumenta y la próxima vez que se encuentra con la línea horizontal, el lote se abrirá con un aumento).

Estoy aturdido. - Esta lógica, tira todo hacia el lado positivo. Me pregunto por cuánto se puede vender semejante milagro.

Instantánea3

----------------------------------------- aquí hay otro ejemplo - el precio va en contra de mí. esta es la primera imagen, voy a mostrar el segundo como funciona.

USDJPYM5 Figura 1

USDJPYM5z Figura 2

Foto de Figura 3

 

Para entender cómo funciona todo esto

Hay botones en la Utilidad (COMPRA y VENTA), hacen todos los comandos que hacen las Líneas Horizontales - puedes buscarlo en el probador para ver cómo funciona .

Configuración de los botones ----------------

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

Configuración de líneas horizontales --------------------

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)

Estos son los comandos que se pueden ejecutar --------------------------------

//+------------------------------------------------------------------+
//| 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
  };
//+------------------------------------------------------------------+

Función de beneficios

------------ El beneficio no es común - la COMPRA tiene su propio beneficio la VENTA tiene su propio beneficio (por ejemplo, usted tiene dos posiciones abiertas una en lacompra y otra en laventa en la configuración que desea ganar 100, por lo que mientras que cada uno de ellos no tendrá un 100.) También cada par tiene un beneficio diferente, cada uno debe tomar un 100 (si usted está trabajando con varios pares - para cada par, debe establecer por separado la utilidad)

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

Hay dos pérdidas en el par - la pérdida total y (compra y venta, cada una de ellas tiene su propia pérdida)

Aquí, el cálculo se lleva a cabo en la pérdida decomprar su pérdida devender su

 

Ligera corrección - para que la línea horizontal reaccione más rápido a la señal.

Hubo una situación - el precio tocó, cruzó la línea Horizontal, pero no se disparó.

no funcionó

#versión de la propiedad "1.019"

Archivos adjuntos:
 

Probar una nueva función . El calendario da una señal, se puede seleccionar un comando de la señal

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

Todavía tengo que pensar qué otros comandos son necesarios para el calendario.

Ya tengo estos.

//+------------------------------------------------------------------+
//| 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
  };
//+------------------------------------------------------------------+

en la imagen instalada Utilidad, esta es la figura 1. la segunda será con el comando ejecutado (Líneas horizontales a una distancia determinada)

Instantánea7Imagen 1


Razón de la queja: