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

 

Voy a probar esta función hoy en una cuenta real

en las líneas del indicador FiboPivot_V2

es necesario introducir el nombre corto del indicador - para borrarlo

- si no se borra el indicador - se fijarán las líneas de nuevo y se reabrirá la posición

buscar

Archivos adjuntos:
 

aquí hay un gran indicador https://www.mql5.com/ru/code/26585

Densidad de precios

para mi EA

la horizontal funcionará comprar y los 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
//+------------------------------------------------------------------+

ir a la Lista de Objetos y copiar el nombre. cualquier línea o dígitos

o puede poner estos iconos debajo de COMPRA y PARADA - para no tener que borrar el indicador

IMEI

Price density
Price density
  • www.mql5.com
Работа индикатора идёт с барами, которые видимы в окне графика.  График разбивается на зоны ("Zone") и в каждой зоне пдсчитывается количество попаданий цен. Принцип расчёта: если цена High или Low попадает в зону, считается, что в этой зоне счётчик попаданий...
 
ajustado los sonidos. cuando se abre - cuando se cierra - cuando alcanza el objetivo de equilibrio.
 
input bool     InpOnlyLimit         = false;          // Выставить отложенный ордер
input bool     InpOnlystart         = true;           // Вкл. Buy\Sell

todas las acciones pueden cambiarse aórdenes pendientes de forma conjunta o individual

una orden pendiente sigue el precio como una red de arrastre

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

el nombre del objeto se ha disparado y la orden pendiente se muestra en la imagen siguiente

TintaEURJPYH2_LI

el objeto marcado con un círculo aún no ha sido alcanzado - espera hasta que el precio actual caiga por debajo del objeto

Foto de

ahora si se activa el SELLSTOP - arriba he puesto el nombre del objeto para cerrar elSELL

si no haySELLSTOP y el precio se mueve más alto, el objeto de cierre será eliminado

y la orden pendiente seguirá el precio

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

lo que le falta a este EA es un nombre de arrastre de un objeto .

Tenemos que mejorar esta función

 

Estoy poniendo el sonido en el lugar equivocado aquí.

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

Lo arreglaré y adjuntaré el archivo.

¿Alguien puede decirme dónde ponerlo?

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

Lo tengo.

Aquí 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");
  }
//+------------------------------------------------------------------+
Archivos adjuntos:
 
Aleksandr Klapatyuk:

todas las acciones pueden cambiarse aórdenes pendientes de forma conjunta o individual

una orden pendiente sigue el precio como una red de arrastre

el nombre del objeto se ha disparado y la orden pendiente se muestra en la imagen siguiente

el objeto marcado con un círculo aún no ha sido alcanzado - espera hasta que el precio actual caiga por debajo del objeto

ahora si se activa el SELLSTOP - arriba he puesto el nombre del objeto para cerrar elSELL

si no haySELLSTOP y el precio se mueve más alto, el objeto de cierre será eliminado

y la orden pendiente seguirá el precio

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

lo que le falta a este EA es un nombre de arrastre de un objeto .

esta característica necesita ser mejorada

me puse en posición - ¿qué nos espera?

Foto de

ha movido el objeto nombrado - para cerrar VENDER

Instantánea2

ha movido un objeto con nombre a SELL .

tenemos que establecer esto automáticamente.

No movería el objeto, pero el Asesor Experto movería el objeto nombrado.

Instantánea3

se movió por debajo - del objeto a 118.811 cierre deventa

debajo de

se trasladó más

Instantánea7

Quiero mostrarlo pero no hay manera - lo moví cerca de la línea

Imagen8

mientras se escribe - cerrado en el objeto nombrado

Tiro9

Tiro10


 

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

Muchas gracias!Vladimir Karputov ¡Buena salud para usted y sus seres queridos!

he añadido su función a mi Asesor Experto

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 советника...
Archivos adjuntos:
 

Dos en uno de los servicios públicos

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

Vladimir Karputov:

Mueve dos objetos -líneas horizontales


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...
Archivos adjuntos:
 
Aleksandr Klapatyuk:

Dos en uno de los servicios públicos

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

Vladimir Karputov:

Mueve dos objetos - líneas horizontales


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

También he añadido cuatro líneas horizontales que se pueden utilizar para abrir o cerrar en cualquier dirección - bueno, y arrastrar.

Línea horizontal - para la pesca de arrastre. De lo contrario, puede utilizar cualquier objeto con nombre.

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)
//---
Archivos adjuntos:
 
Aleksandr Klapatyuk:

También he añadido cuatro líneas horizontales que se pueden utilizar para abrir y cerrar en cualquier dirección, y para arrastrar.

La línea horizontal es para la pesca de arrastre. De lo contrario, puede utilizar cualquier objeto con nombre.

actualización - en la página siguiente
Razón de la queja: