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

 

Oggi testerò questa funzione su un conto reale

sulle linee dell'indicatore FiboPivot_V2

è necessario inserire il nome breve dell'indicatore - per cancellarlo

- se non cancellate l'indicatore - imposterà di nuovo le linee e riaprirà la posizione

andare a prendere

 

Ecco un grande indicatore https://www.mql5.com/ru/code/26585

Densità di prezzo

per il mio EA

l'orizzontale funzionerà comprare e i numeri 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
//+------------------------------------------------------------------+

andare in Elenco degli oggetti e copiare il nome. qualsiasi linea o cifra

oppure potete impostare queste icone sotto BUY e STOP - così non dovrete cancellare l'indicatore

IMEI

Price density
Price density
  • www.mql5.com
Работа индикатора идёт с барами, которые видимы в окне графика.  График разбивается на зоны ("Zone") и в каждой зоне пдсчитывается количество попаданий цен. Принцип расчёта: если цена High или Low попадает в зону, считается, что в этой зоне счётчик попаданий...
 
Ho modificato i suoni. quando si apre - quando si chiude - quando raggiunge l'obiettivo di equilibrio.
 
input bool     InpOnlyLimit         = false;          // Выставить отложенный ордер
input bool     InpOnlystart         = true;           // Вкл. Buy\Sell

tutte le azioni possono essere cambiate inordini pendenti sia congiuntamente che individualmente

un ordine pendente segue il prezzo come una rete a strascico

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

il nome dell'oggetto si è attivato e l'ordine in sospeso è mostrato nell'immagine qui sotto

inchiostratoEURJPYH2_LI

l'oggetto cerchiato non è ancora stato raggiunto - aspetta finché il prezzo corrente non scende sotto l'oggetto

Foto di

ora se il SELLSTOP è attivato - sopra ho impostato il nome dell'oggetto per chiudere ilSELL

se non c'èSELLSTOP e il prezzo si muove più in alto, l'oggetto di chiusura sarà cancellato

e l'ordine pendente seguirà il prezzo

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

Quello che manca a questo EA è un nome Trawl di un oggetto.

Dobbiamo migliorare questa funzione

 

Sto mettendo il suono nel posto sbagliato qui.

//+------------------------------------------------------------------+
//| 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 correggo e allego il file.

Qualcuno può dirmi dove metterlo?

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

Ce l'ho.

Ecco qui.

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

tutte le azioni possono essere cambiate inordini pendenti sia congiuntamente che individualmente

un ordine pendente segue il prezzo come una rete a strascico

il nome dell'oggetto si è attivato e l'ordine in sospeso è mostrato nell'immagine qui sotto

l'oggetto cerchiato non è ancora stato raggiunto - aspetta finché il prezzo corrente non scende sotto l'oggetto

ora se il SELLSTOP è attivato - sopra ho impostato il nome dell'oggetto per chiudere ilSELL

se non c'èSELLSTOP e il prezzo si muove più in alto, l'oggetto di chiusura sarà cancellato

e l'ordine pendente seguirà il prezzo

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

Quello che manca a questo EA è un nome Trawl di un oggetto.

questa funzione ha bisogno di miglioramenti

mi sono messo in posizione - cosa ci aspetta?

Foto di

ha spostato l'oggetto nominato - per chiudere SELL

Istantanea2

ha spostato un oggetto chiamato SELL .

dobbiamo impostarlo automaticamente.

Io non sposterei l'oggetto, ma l'Expert Advisor sposterebbe l'oggetto nominato.

Istantanea3

spostato sotto - l'oggetto a 118,811SELL chiudere

sotto

spostato più

Istantanea7

Voglio mostrarlo ma non c'è modo - l'ho spostato vicino alla linea

Immagine8

durante la digitazione - chiuso sull'oggetto nominato

Colpo9

Colpo10


 

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

Grazie mille!Vladimir Karputov Buona salute a lei e ai suoi cari!

aggiunto la tua funzione al mio Expert Advisor

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

Due in uno dei servizi

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

Vladimir Karputov:

Sposta due oggetti -linee orizzontali


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

Due in uno dei servizi

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

Vladimir Karputov:

Sposta due oggetti - linee orizzontali


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

Ho anche aggiunto quattro linee orizzontali che possono essere usate per aprire o chiudere in qualsiasi direzione - beh, e a strascico.

Linea orizzontale - per la pesca a strascico . altrimenti, puoi usare qualsiasi oggetto con nome.

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

Ho anche aggiunto quattro linee orizzontali che possono essere usate per aprire e chiudere in qualsiasi direzione - e per pescare.

La linea orizzontale è per la pesca a strascico. altrimenti potete usare qualsiasi oggetto con nome.

aggiornamento - nella prossima pagina