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

 

Maintenant pratique pour le trading manuel.

//+------------------------------------------------------------------+
input string   t0="------ Parameters --------";         //
input datetime HoursFrom               = D'1970.01.01'; // Время старта Эксперта
input datetime HoursTo                 = D'2030.12.31'; // Время закрытия всех позиций
input double   TargetProfit            = 200000.00;     // Целевая прибыль
input double   InpVolumeLotOrRisk      = 0.01;          // The value for "Money management"
input double   InStopLoss              = 250.0;         // Stop Loss
input double   InTakeProfit            = 460.0;         // Take Profit
input string   t1="------ Obj:Line Open ------";        //
input string   InpObjDownName0         = "TOP";         // Obj: TOP (Horizontal Line) ВВЕРХУ
input ENUM_TRADE_COMMAND InpTradeCommand=open_sell;     // Obj:  command:
input string   InpObjUpName0           = "LOWER";       // Obj: LOWER (Horizontal Line) ВНИЗУ
input ENUM_TRADE_COMMAND InpTradeCommand0=open_buy;     // Obj:  command:
input string   t2="------ Obj:Line Close ------";       //
input string   InpObjDownName02        = "TOP DELL";    // Obj: TOP (Horizontal Line) ВВЕРХУ
input ENUM_TRADE_COMMAND InpTradeCommand2=close_sells;  // Obj:  command:
input string   InpObjUpName02          = "LOWER DELL";  // Obj: LOWER (Horizontal Line) ВНИЗУ
input ENUM_TRADE_COMMAND InpTradeCommand02=close_buys;  // Obj:  command:
input string   t3="------ Trailing Obj:Line ------";    //
input string   InpObjUpName            = "TOP DELL";    // Obj: TOP (Horizontal Line) ВВЕРХУ
input string   InpObjDownName          = "LOWER DELL";  // Obj: LOWER (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)
input string   t4="------ Indicator Delete ------";     //
input string   short_name              = "INDICATOR 1"; // INDICATOR_SHORTNAME 1
input string   short_name0             = "INDICATOR 2"; // INDICATOR_SHORTNAME 2
input bool     Inpres                  = false;         // Delete All Indicators
//+------------------------------------------------------------------+
Dossiers :
 
J'ai commencé à utiliser cette méthode pour apprendre la programmation))))
 
Darirunu:
J'ai commencé à utiliser cette méthode pour apprendre la programmation d'abord)))

Comment ça se passe ?

 
Aleksandr Klapatyuk:

Comment ça se passe ?

Il s'agit en fait d'un constructeur. C'est très pratique.

 

J'ai oublié de prévenir -

= 200000.00 ; // Profit cible - doit être supérieur à votre solde dans les paramètres (vous avez un solde de 10000 - vous voulez gagner 500. dans les paramètres = 10500)

= 250.0 ; // Stop Loss - caché et fermé lorsqu'il atteint 0 pips s'il est fermé immédiatement (1=10 pips.) 250=2500 pips

= 460.0 ; // Prise de profit - caché et fermé dès que le pip est atteint - si0, il sera fermé immédiatement(1=10 pip.)

nput string   t0="------ Parameters --------";         //
input datetime HoursFrom               = D'1970.01.01'; // Время старта Эксперта
input datetime HoursTo                 = D'2030.12.31'; // Время закрытия всех позиций
input double   TargetProfit            = 200000.00;     // Целевая прибыль
input double   InpVolumeLotOrRisk      = 0.01;          // The value for "Money management"
input double   InStopLoss              = 250.0;         // Stop Loss
input double   InTakeProfit            = 460.0;         // Take Profit
Общие принципы - Торговые операции - MetaTrader 5
Общие принципы - Торговые операции - MetaTrader 5
  • www.metatrader5.com
Перед тем как приступить к изучению торговых функций платформы, необходимо создать четкое представление об основных терминах: ордер, сделка и позиция. — это распоряжение брокерской компании купить или продать финансовый инструмент. Различают два основных типа ордеров: рыночный и отложенный. Помимо них существуют специальные ордера Тейк Профит...
Dossiers :
 

Je ne sais pas quoi mettre ici. Mais il en a besoin. - when to set = D'1970.01.01' ; // Heure de début d'expertise.

Ensuite, il est visible au travail ou en attente - temps d'allumage.

IL EST TEMPS. il ne s'ouvrira pas - jusqu'à ce que le moment soit venu.

HEURE cela signifie que le conseiller expert est activé et fonctionne.

Date et heure ci-jointes.
Dossiers :
 

Une nouvelle fonctionnalité - ou devrais-je dire correctement.

maintenant de 6 objets - dont deux lignes horizontales - que nous dessinons nous-mêmes et qu'ils chalutent - à partir desquels nous pouvons à la fois fermer et ouvrir.

et 4 objets nommés - également définis manuellement - peuvent également être à la fois fermés et ouverts.

input string   t1="------ Obj:Name 1-2 ------";         //
input string   InpObjDownName0         = "TOP 1";       // Obj: TOP (Name Obj) ВВЕРХУ 1
input ENUM_TRADE_COMMAND InpTradeCommand=open_sell;     // Obj:  command:
input string   InpObjUpName0           = "LOWER 2";     // Obj: LOWER (Name Obj) ВНИЗУ 2
input ENUM_TRADE_COMMAND InpTradeCommand0=open_buy;     // Obj:  command:
input string   t2="------ Obj:Name 3-4 ------";         //
input string   InpObjDownName02        = "TOP 3";       // Obj: TOP (Name Obj) ВВЕРХУ 3
input ENUM_TRADE_COMMAND InpTradeCommand2=open_sell;    // Obj:  command:
input string   InpObjUpName02          = "LOWER 4";     // Obj: LOWER (Name Obj) ВНИЗУ 4
input ENUM_TRADE_COMMAND InpTradeCommand02=open_buy;    // Obj:  command:
input string   t3="------ Trailing Obj:Line 5-6 ----";  //
input string   InpObjUpName            = "TOP 5";       // Obj: TOP (Horizontal Line) ВВЕРХУ 5
input ENUM_TRADE_COMMAND InpTradeCommand3=close_sells;  // Obj:  command:
input string   InpObjDownName          = "LOWER 6";     // Obj: LOWER (Horizontal Line) ВНИЗУ 6
input ENUM_TRADE_COMMAND InpTradeCommand03=close_buys;  // Obj:  command:
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 :
 

L'indicateur déplace 2 objets nommés - qui doivent être définis manuellement.

par l'indicateur =iFractals

//--- входные параметры 
input string   InpFont2              = "TOP";       // Obj: TOP (Obj:Name) ВВЕРХУ
input string   InpFont1              = "LOWER";     // Obj: LOWER (Obj:Name) ВНИЗУ
input int      InpFractal            = 0;           // Obj: Fractal (0-2)
Dossiers :
IgorM.mq5  17 kb
 
Aleksandr Klapatyuk:

L'indicateur déplace 2 objets nommés - qui doivent être définis manuellement.

par l'indicateur =iFractals


À partir de cet indicateur, vous pouvez utiliser n'importe quel indicateur pour vos idées.

changer ici

//---
#resource "\\Indicators\\Examples\\ZigzagColor.ex5"
//---

et ici

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   PlotIndexSetInteger(0,PLOT_ARROW,108);
   PlotIndexSetInteger(1,PLOT_ARROW,108);
//--- indicator buffers mapping
   SetIndexBuffer(0,FractalUpBuffer,INDICATOR_CALCULATIONS);
   SetIndexBuffer(1,FractalDownBuffer,INDICATOR_CALCULATIONS);
//--- create handle of the indicator iFractals
   handle_iFractals=iCustom(Symbol(),Period(),"Examples\\ZigzagColor");
//--- if the handle is not created
   if(handle_iFractals==INVALID_HANDLE)
     {
      //--- tell about the failure and output the error code
      PrintFormat("Failed to create handle of the iFractals indicator for the symbol %s/%s, error code %d",
                  Symbol(),
                  EnumToString(Period()),
                  GetLastError());
      //--- the indicator is stopped early
      return(INIT_FAILED);
     }
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+

le chemin vers les indicateurs du marché

changer ici

//---
#resource "\\Indicators\\Market\\Automatic Trendlines.ex5"
//---

et ici

   handle_iFractals=iCustom(Symbol(),Period(),"Market\\Automatic Trendlines");
Dossiers :
 
Aleksandr Klapatyuk:

quelque chose comme ça - je l'ai piqué dans l'Indicateur.

tout en bas - ligne bleue, franchit le niveau 50


Et qu'est-ce que ça vous dit, quels sont les signaux ?
Raison: