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

 
Aleksandr Klapatyuk:

ouvrir le méta-aide-mémoire

ouvrir la ligne supérieure (fichiers), il y a (ouvrir le répertoire de données)

это адрес C:\Users\---------\AppData\Roaming\MetaQuotes\Terminal\36A64B8C79A6163D85E6173B54096685

vous devez vous rendre à

et supprimer ce dossier MetaQuotes.

avertissement ! !!--- tous les indicateurs que vous avez installés et les experts seront supprimés.

ceci fonctionnera - vous devez redémarrer le terminal

 

#property version "1.03"

Je ne changerai rien - laversion "1.03" est la version normale

J'ai ajouté une fonction superflue à laversion "1.04".

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

si quelqu'un est intéressé, voici une version entièrement fonctionnelle https://c.mql5.com/3/297/Horse_move__4.mq5

1.03

 

La facilité avec laquelle on apprend à gérer -

Placez un objet avec un nom sur le graphique (par exemple, une ligne horizontale). Cette ligne a un nom - copiez-la.

ouvrez les paramètres du conseiller expert et remplissez-les - si la ligne est au-dessus du prix actuel, vous devez la mettre où ( TOP ) si elle est en dessous du prix actuel, alors ( LOWER )

nous choisissons ensuite une commande - ce que nous voulons que ces lignes fassent (

//+------------------------------------------------------------------+
//| Enum TRADE_COMMAND                                               |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   close_buys=0,     // Close All Buy's
   close_sells=1,    // Close All Sell's
   close_all=2,      // Close All Buy's and Sell's
   open_buy=3,       // Open Buy
   open_sell=4,      // Open Sell
   open_buy_sell=5,  // Open Buy and Sell
  };

)

 
Aleksandr Klapatyuk:

#property version "1.03"

Je ne changerai rien - laversion "1.03" est la version normale

J'ai ajouté une fonction superflue à laversion "1.04".

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

si quelqu'un est intéressé, voici une version entièrement fonctionnelle https://c.mql5.com/3/297/Horse_move__4.mq5

Bonjour Alexander, la version 1.03 est celle que vous avez citée sur le lien https://c.mql5.com/3/297/Horse_move__4.mq5 dans le code de votre Expert Advisor.

C'est donc la troisième version ou tu as juste oublié de la changer pour la 1.04 ?

Sincèrement, Vladimir.

 
MrBrooklin:

Bonjour Alexander, le lien que vous avez fourni https://c.mql5.com/3/297/Horse_move__4.mq5 montre la version 1.03 dans le code de l'Expert Advisor.

C'est donc la troisième version ou tu as juste oublié de la changer pour la 1.04 ?

Salutations, Vladimir.

Il s'agit de la troisième version.

en l'état, la quatrième version fonctionne également - la fonction que j'ai ajoutée n'est pas nécessaire. Elle n'empêche pas le conseiller expert de fonctionner, mais elle n'est d'aucune utilité.

 

Si vous appuyez sur la touche quatre (V) ou la touche russe (M) de votre ordinateur, trois lignes horizontales apparaîtront.

Ne saisissez pas de noms dans Expert Advisor de ces lignes horizontales.

Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
При создании графического объекта функцией ObjectCreate() необходимо указать тип создаваемого объекта, который может принимать одно из значений перечисления ENUM_OBJECT. Дальнейшие уточнения свойств созданного объекта возможно с помощью функций по работе с графическими объектами.
 

Je vais maintenant vous dire comment utiliser une variante, d'une ligne déclenchée à l'ouverture, une autre ligne à une distance différente .

input string   t3="------ Obj:Name 1-2-3-4 ------";     // Имя Объекта
input string   InpObjUpNameZ           = "TOP 1";       // Obj: TOP (Name Obj) ВВЕРХУ 1
input string   InpObjDownNameZ         = "LOWER 2";     // Obj: LOWER (Name Obj) ВНИЗУ 2
input int      Step                    = 15;            // Obj: Шаг сетки, пунктов(0 = false)
input string   InpObjDownName0         = "TOP 3";       // Obj: TOP (Name Obj) ВВЕРХУ 3
input ENUM_TRADE_COMMAND InpTradeCommand=open_sell;     // Obj:  command:
input string   InpObjUpName0           = "LOWER 4";     // Obj: LOWER (Name Obj) ВНИЗУ 4
input ENUM_TRADE_COMMAND InpTradeCommand0=open_buy;     // Obj:  command:

1,2 - c'est le nom pour ces objets qui vont - non pas ouvrir des positions, mais ouvrir un autre objet à une distance donnée ( Step=15;// Obj : Step de la grille, points(0 = false))

ouvrira 3,4 - à partir de ces objets - vous définissez une commande (=open_buy ;// Obj : commande :)

Совершение сделок - Торговые операции - Справка по MetaTrader 5
Совершение сделок - Торговые операции - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
 

il existe une autre option

input string   t5="- 2_Obj:Trailing Line 7-8-9-10 --- ";// Trailing Obj:Line
input string   InpObjUpNameZx          = "TOP 7";       // Obj: TOP (Name Obj) ВВЕРХУ 7
input string   InpObjDownNameZx        = "LOWER 8";     // Obj: LOWER (Name Obj) ВНИЗУ 8
input int      StepZx                  = 15;            // Obj: Шаг сетки, пунктов(0 = false)
input string   InpObjUpNameX           = "TOP 9";       // Obj: TOP (Horizontal Line) ВВЕРХУ 9
input ENUM_TRADE_COMMAND InpTradeCommandX=open_buy;     // Obj:  command:
input string   InpObjDownNameX         = "LOWER 10";    // Obj: LOWER (Horizontal Line) ВНИЗУ 10
input ENUM_TRADE_COMMAND InpTradeCommand0X=open_sell;   // Obj:  command:
input ushort   InpObjTrailingStopX     = 15;            // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepX     = 5;             // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

c'est la même chose que l'autre option - seulement ces objets peuvent aussi fonctionner comme un chalut

 

également si vous êtes sortis - deux objets

est réglé avec le

input int      Step                    = 15;            // Obj: Шаг сетки, пунктов(0 = false)


input int      StepZx                  = 15;            // Obj: Шаг сетки, пунктов(0 = false)
0 - rien ne s'affiche
 
Aleksandr Klapatyuk:

il existe une autre option

c'est la même chose que cette variante - seulement ces objets peuvent aussi fonctionner comme chalut

input string   InpObjUpNameX           = "TOP 9";       // Obj: TOP (Horizontal Line) ВВЕРХУ 9
input ENUM_TRADE_COMMAND InpTradeCommandX=open_buy;     // Obj:  command:
input string   InpObjDownNameX         = "LOWER 10";    // Obj: LOWER (Horizontal Line) ВНИЗУ 10
input ENUM_TRADE_COMMAND InpTradeCommand0X=open_sell;   // Obj:  command:
input ushort   InpObjTrailingStopX     = 15;            // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepX     = 5;             // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)

seulTOP (ligne horizontale)LOWER (ligne horizontale) convient pour les noms de sentiers.

Important ! !! Lignes horizontales

input string   t5="- 2_Obj:Trailing Line 7-8-9-10 --- ";// Trailing Obj:Line
input string   InpObjUpNameZx          = "TOP 7";       // Obj: TOP (Name Obj) ВВЕРХУ 7
input string   InpObjDownNameZx        = "LOWER 8";     // Obj: LOWER (Name Obj) ВНИЗУ 8
cela n'a pas d'importance - tant que le nom de l'objetObj est saisi: TOP (Name Obj) UP 7
Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
Документация по MQL5: Константы, перечисления и структуры / Константы объектов / Типы объектов
  • www.mql5.com
При создании графического объекта функцией ObjectCreate() необходимо указать тип создаваемого объекта, который может принимать одно из значений перечисления ENUM_OBJECT. Дальнейшие уточнения свойств созданного объекта возможно с помощью функций по работе с графическими объектами.
Raison: