Come ho assemblato il mio consulente per tentativi ed errori - pagina 54

 
Alexsandr San:

È stata aggiunta un'altra funzione. Basta controllare in tempo reale nel terminale.

questa versione è così - Nel Tester che gioca

Non è una cattiva funzione, ve lo dico io. Va qua e là, prende i suoi profitti e se ne frega.

Colpo3.PNG

Colpo4

Ma il codice ha bisogno di qualche ritocco, ma funziona bene.

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

Ho provato su un conto reale, volevo un piccolo profitto da due posizioni aperte. Avevo inserito 160 nelle impostazioni, pensavo che avrebbe chiuso la posizione più grande, ma no, ha chiuso

Pensavo che avrebbe chiuso la posizione più grande in perdita, ma non l'ha fatto. Ha chiuso quella che aveva 160 di profitto e ha chiuso entrambe le posizioni e io sono un babbeo. Risulta che devo calcolare dalla prima posizione aperta, aggiungendo il meno uno.


#proprietà versione "1.017"

Ho scoperto come usare correttamente questa funzione solo il quinto giorno. Ora si chiude sul profitto totale su una coppia di tutti i Buy o Sell

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

Una funzione niente male, ve lo dico io. Qua e là, prende i suoi profitti e se ne frega

Devo modificare il codice per farlo funzionare - tutto sembra funzionare bene

Non riesco a creare un codice per questa funzione che funzioni in un terminale. Voglio provarlo su 4 terminali, non so cosa ne verrà fuori

4 nthvbyfkf

4 nthvbyfkf2

 
Alexsandr San:

Non posso creare codice per far funzionare questa funzione in un terminale. Voglio provarlo su 4 terminali, non so cosa ne verrà fuori

Tutti questi 4 terminali - non hanno dato alcun risultato. E in generale, questa funzione di Loss - non posso scrivere il codice.

Ma ho già creato da tempo tale logica di lavoro, solo con linee orizzontali. Resta da pensare a cosa moltiplicherebbe il lotto

Foto di Immagine 1

Abbiamo impostato una linea orizzontale in alto

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:

impostare una linea orizzontale in basso

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:

non appena il prezzo tocca queste linee, la posizione sarà aperta e le linee orizzontali saranno impostate

questi -

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 da queste linee orizzontali aprirà una posizione e metterà le prime linee orizzontali - e così si ripeterà finché il prezzo non sarà in grado di raggiungerle
GBPUSDM5figura 2

Qui è chiuso - impostato nelle impostazioni, il Profit

GBPUSDM52figura 3

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

quando raggiunge un profitto di 200 sulla coppia - chiuderà la posizione

GBPUSDM53figura 4

raggiunto 200 e chiuso tutte le posizioni in acquisto o vendita - perché si può aprire in entrambe le direzioni e ogni lato ha il suo, profitto o perdita

- ora quando raggiunge la linea orizzontale, apre una posizione - ma si può spostare manualmente

GBPUSDM54figura 5

 

La funzione aumenta il lotto, da una perdita .

grazie a quest'uomo https://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...
 

#proprietà versione "1.018"

possibilità aggiunta, per aumentare la dimensione del lotto della perdita in valuta

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

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

molto aumento dell'azione. E 'solo necessario raccogliere un importo nelle impostazioni, 4 livelli - l'ultimo importo, più di 2000 si aprirà lotto 0,08

GBPUSDM5h

nell'immagine da queste linee, posizione aperta, e anche può essere impostato nelle impostazioni trawl queste linee

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)

al posto di 0 set distance= 0;// Obj: Trailing Stop (distanza dal prezzo all'oggetto, in pip)

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

Il trailing stop dovrebbe essere impostato in modo che quando il segnale scatta, la linea salti più lontano dalla barra, altrimenti il segnale scatterà ripetutamente.

Ecco la situazione - quando si traina una linea orizzontale e si rimbalza alla stessa barra quando il comando viene attivato

XAUUSDM5

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

Per la linea orizzontale da non ripetere, impostare 0 = 20;// Obj: passo della griglia, punti("0" -> false)

a zero, eseguirà il comando e sarà cancellato

File:
 
Alexsandr San:

La funzione aumenta il lotto, da una perdita .

grazie a quest'uomo https://www.mql5.com/ru/forum/107406#comment_3018721

2732

Ho testato questa funzione oggi con la linea orizzontale per una perdita (come il prezzo è andato in una direzione sbagliata, incontra una linea orizzontale sulla sua strada, da essa si apre una posizione e la linea salta più lontano, di una data distanza, la perdita aumenta e la prossima volta che colpisce la linea orizzontale, il lotto si apre con un aumento).

Sono sbalordito. - Questa logica, tira tutto verso il lato positivo. Mi chiedo a quanto si possa vendere un tale miracolo!

Istantanea3

----------------------------------------- ecco un altro esempio - il prezzo mi va contro. questa è la prima immagine, mostrerò la seconda come funziona.

USDJPYM5 figura 1

USDJPYM5z Figura 2

Foto di Figura 3

 

Per capire come funziona il tutto

Ci sono dei pulsanti nell'Utility (BUY e SELL), che fanno tutti i comandi che fanno le linee orizzontali - puoi semplicemente guardare nel tester per vedere come funziona.

Configurazione dei pulsanti ----------------

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

Impostazione delle linee orizzontali --------------------

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)

Ecco i comandi che possono essere eseguiti --------------------------------

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

Funzione di profitto

------------ Profit non è comune - BUY ha il proprio profitto SELL ha il proprio profitto (per esempio hai due posizioni aperte una inbuy e un'altra insell nelle impostazioni vuoi guadagnare 100, quindi mentre ognuno di loro non prenderà un 100.) Anche ogni coppia ha un profitto diverso, ognuno deve prendere un 100 (se stai lavorando con più coppie - per ogni coppia, è necessario impostare separatamente l'utilità)

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

Ci sono due perdite sulla coppia - la perdita totale e (comprare e vendere, ognuno di loro ha la sua perdita)

Qui, il calcolo è effettuato nella perdita dicomprare la vostra perdita davendere il vostro

 

Leggera correzione - per far sì che la linea orizzontale reagisca più velocemente al segnale.

C'era una situazione - il prezzo ha toccato, attraversato la linea orizzontale, ma non si è attivato.

non ha funzionato

#proprietà versione "1.019"

File:
 

Provare una nuova funzione. Il calendario dà un segnale, un comando può essere selezionato dal segnale

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

Devo ancora pensare a quali altri comandi sono necessari per il calendario.

Ho già questi.

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

immagine impostare l'utilità, questa è l'immagine 1. il secondo sarà con il comando eseguito (linee orizzontali ad una data distanza)

Istantanea7Immagine 1


Motivazione: