Comment j'ai assemblé mon conseiller par essais et erreurs - page 20

 

Je vais tester cette fonction aujourd'hui sur un compte réel.

sur les lignes de l'indicateur FiboPivot_V2

il est nécessaire d'entrer le nom court de l'indicateur - pour le supprimer

- si vous ne supprimez pas l'indicateur, il remettra les lignes en place et rouvrira la position.

aller chercher

Dossiers :
 

Voici un excellent indicateur https://www.mql5.com/ru/code/26585

Densité des prix

pour mon EA

l'horizontale fonctionnera acheter et les numéros 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
//+------------------------------------------------------------------+

allez dans Liste des objets et copiez le nom. n'importe quelle ligne ou chiffre

ou vous pouvez placer ces icônes sous BUY et STOP - ainsi vous n'avez pas à supprimer l'indicateur

IMEI

Price density
Price density
  • www.mql5.com
Работа индикатора идёт с барами, которые видимы в окне графика.  График разбивается на зоны ("Zone") и в каждой зоне пдсчитывается количество попаданий цен. Принцип расчёта: если цена High или Low попадает в зону, считается, что в этой зоне счётчик попаданий...
 
ajusté les sons. quand il s'ouvre - quand il se ferme - quand il atteint l'objectif d'équilibre.
 
input bool     InpOnlyLimit         = false;          // Выставить отложенный ордер
input bool     InpOnlystart         = true;           // Вкл. Buy\Sell

toutes les actions peuvent être transformées enordres en suspens, conjointement ou individuellement

un ordre en suspens suit le prix comme un chalutier

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

le nom de l'objet a déclenché et l'ordre en attente est montré dans l'image ci-dessous

EncréEURJPYH2_LI

l'objet encerclé n'a pas encore été atteint - il attend que le prix actuel tombe en dessous de l'objet

Photo par

maintenant si le SELLSTOP est déclenché - ci-dessus j'ai défini le nom de l'objet pour fermer leSELL

s'il n'y a pas deSELLSTOP et que le prix augmente, l'objet de clôture sera supprimé.

et l'ordre en attente suivra le prix

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

Ce qui manque à cette EA est un nom Trawl d'un objet.

Nous devons améliorer cette fonction

 

Je mets le son au mauvais endroit ici.

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

Je vais le corriger et attacher le fichier.

Quelqu'un peut-il me dire où le mettre ?

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

Je l'ai.

C'est ici.

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

toutes les actions peuvent être transformées enordres en suspens, conjointement ou individuellement

un ordre en suspens suit le prix comme un chalutier

le nom de l'objet a déclenché et l'ordre en attente est montré dans l'image ci-dessous

l'objet encerclé n'a pas encore été atteint - il attend que le prix actuel tombe en dessous de l'objet

maintenant si le SELLSTOP est déclenché - ci-dessus j'ai défini le nom de l'objet pour fermer leSELL

s'il n'y a pas deSELLSTOP et que le prix augmente, l'objet de clôture sera supprimé.

et l'ordre en attente suivra le prix

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

ce qui manque à cet EA est un nom Trawl d'un objet .

cette fonctionnalité doit être améliorée

je me suis mis en position - qu'est-ce qui nous attend ?

Photo par

a déplacé l'objet nommé - pour fermer SELL

Instantané2

a déplacé un objet nommé vers SELL .

nous devons régler cela automatiquement.

Je ne déplacerais pas l'objet, mais le conseiller expert déplacerait l'objet nommé.

Instantané3

a évolué en dessous - l'objet à 118.811SELL clôture

en dessous de

plus en mouvement

Snapshot7

Je veux le montrer mais pas moyen - je l'ai déplacé près de la ligne.

Photo 8

pendant la frappe - fermé sur l'objet nommé

Shot9

Shot10


 

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

Merci beaucoup !Vladimir Karputov Bonne santé à vous et à vos proches !

j'ai ajouté votre fonction à mon conseiller expert

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

Deux dans l'un des services publics

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

Vladimir Karputov:

Déplace deux objets -lignes 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...
Dossiers :
 
Aleksandr Klapatyuk:

Deux dans l'un des services publics

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

Vladimir Karputov:

Déplace deux objets - lignes horizontales


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

J'ai également ajouté quatre lignes horizontales qui peuvent être utilisées pour ouvrir ou fermer dans n'importe quelle direction - enfin, et chaluter.

Ligne horizontale - pour le chalutage . sinon, vous pouvez utiliser n'importe quel objet nommé.

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

J'ai également ajouté quatre lignes horizontales qui peuvent être utilisées pour ouvrir et fermer dans n'importe quelle direction - et pour chaluter.

La ligne horizontale est pour le chalutage . sinon vous pouvez utiliser n'importe quel objet nommé.

mise à jour - sur la page suivante
Raison: