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

 
Alexsandr San:

#propriété version "1.026"

En plus de cela, toutes sortes de gadgets .

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

Fonctionne avec l'intelligence humaine - mais peut être adapté à l'intelligence artificielle avec un indicateur.

--- Dans mon esprit, l'Indicateur est l'Intelligence Artificielle créée.

#propriété version "1.027"

Correction de certains endroits - Suppression des ordres en attente lorsque l'objectif est atteint.

Dossiers :
 

#propriété version "1.028"

a trouvé un autre moyen.

ajout d'un nom pour les lignes horizontales afin qu'elles puissent être définies sur n'importe quelle sous-fenêtre

input string   v15="---- XXX:Line name:XXX  -----";              //
input string   InpdarBuy                    = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input double   InpStep8                     = 60;                // Obj: Шаг сетки, пунктов("0" -> false)
input string   InpdarSell                   = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input double   InpStep9                     = 60;                // Obj: Шаг сетки, пунктов("0" -> false)
input int      InpChart1                    = 0;                 // номер подокна

Ils n'ont pas de commandes - j'ai besoin d'un nom de leur part.

mais les commandes peuvent être définies dans des sous-fenêtres - avec cette fonction

input string   t2="----- Price Line:        -----";              //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:
input double   InpObjTrail                  = 1.0001;            // Obj: Trailing Stop MACD ("0" -> Off)
input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD
input bool     InpDub                       = false;             // "0.0":Price=false(Trail->Off) "LOW":Price=true(Trail->ON)
input bool     InpDubll                     = false;             // Duplicate "BUY""SELL" (ObjTrailStep)
input ushort   InpObjTrailingStopCS         = 0;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepCS         = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input bool     InpOnTimer                   = false;             // On(Вкл.) "LOW Up" "LOW Down"
input ushort   InpIndentUp                  = 50;                // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 100;               // Indent down, in pips (1.00045-1.00055=1 pips)

remplacer ces noms par le nom de l'indicateur

input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL

par exemple, c'est le nom de la ligne horizontale dans l'indicateur. (PRIX).

input string   InpFont2                     = "SU2";          // Obj: Name Price Line BUY
input string   InpFont3                     = "SU2";        // Obj: Name Price Line SELL

USDCADM30

Dossiers :
 

Vous pourriez penser que l'Utilité est difficile à comprendre - mais elle ne l'est pas.

ces fonctionnalités que j'ai mises en place - mais je n'utilise que deux lignes horizontales. acheté vendu

 

J'ai ajusté un peu l'Indicateur pour moi-mêmehttps://www.mql5.com/ru/code/29321

EURUSDM1

Heiken Ashi Separate Window
Heiken Ashi Separate Window
  • www.mql5.com
N-_Candles_v9 Советник ищет N одинаковых свечей подряд. На бычьих свечах идет покупка, на медвежьих - продажа. Учитывается тип торгового счета: неттинг или хеджинг. RSI Arrow Out of Zone iMA Trend Индикатор...
Dossiers :
H_A_Lin_S_W.mq5  22 kb
 

#propriété version "1.029"

Ajout de la possibilité de cette fonction

input string   t2="----- Price Line:        -----";              //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:
input double   InpObjTrail                  = 1.0001;            // Obj: Trailing Stop MACD ("0" -> Off)
input double   InpObjTrailStep              = 1.0001;            // Obj: Trailing Step MACD
input bool     InpDub                       = false;             // "0.0":Price=false(Trail->Off) "LOW":Price=true(Trail->ON)
input bool     InpDubll                     = false;             // Duplicate "BUY""SELL" (ObjTrailStep)
input ushort   InpObjTrailingStopCS         = 0;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort   InpObjTrailingStepCS         = 5;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string   InpFont2                     = "LOW Up";          // Obj: Name Price Line BUY
input string   InpFont3                     = "LOW Down";        // Obj: Name Price Line SELL
input bool     InpOnTimer                   = false;             // On(Вкл.) "LOW Up" "LOW Down"
input int      InpChart2                    = 0;                 // номер подокна "LOW Up" "LOW Down"
input ushort   InpIndentUp                  = 50;                // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort   InpIndentDown                = 100;               // Indent down, in pips (1.00045-1.00055=1 pips)

lorsque cette ligne est activée (prix actuel "LOW Up";"LOW Down";) vous pouvez sélectionner, en sous-fenêtre

EURUSDH2xsous-fenêtre =0EURUSDH2sous-fenêtre =1

Lignes horizontales grises

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

Seules ces Lignes Horizontales fonctionnent dans la sous-fenêtre =1

input string   t2="----- Price Line:        -----";              //
input string   InpFont0                     = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;      // Obj:  command:
input string   InpFont1                     = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;      // Obj:  command:

et ceux-ci peuvent également être activés

input string   v15="---- XXX:Line name:XXX  -----";              //
input string   InpdarBuy                    = "BUY";             // Obj: BUY (Obj:Name) ВЕРХУ
input double   InpStep8                     = 60;                // Obj: Шаг сетки, пунктов("0" -> false)
input string   InpdarSell                   = "SELL";            // Obj: SELL (Obj:Name) ВНИЗУ
input double   InpStep9                     = 60;                // Obj: Шаг сетки, пунктов("0" -> false)
input int      InpChart1                    = 0;                 // номер подокна

ceux-ci pour transférer le nom de la ligne horizontale à une autre ligne horizontale portant le même nom mais avec la commande

Dossiers :
 

#version de propriété "1.030"

5000 lignes - c'est ce que j'ai coincé. Mais! avec cet utilitaire, vous pouvez construire presque n'importe quelle stratégie.

 //+------------------------------------------------------------------+
//| ENUM_TRADE_COMMAND                                               |
//+------------------------------------------------------------------+
enum ENUM_TRADE_COMMAND
  {
   Turn_Off= 0 ,       // TURN  OFF
   Line1_Line1= 1 ,     // Line: LOWER
   Line2_Line2= 2 ,     // Line: TOP
   Line_Line= 3 ,       // Line: LOWER + Line: TOP
   Line1_buys= 4 ,     // Line: LOWER + Buy's
   Line2_sells= 5 ,     // Line: TOP + Sell's
   sells_Line1= 6 ,     // Line: LOWER + Sell's
   buys_Line2= 7 ,     // Line: TOP + Buy's
   close_buys= 8 ,     // Close All Buy's
   close_sells= 9 ,     // Close All Sell's
   close_all= 10 ,     // Close All Buy's and Sell's
   open_buy= 11 ,       // Open  Buy
   open_sell= 12 ,     // Open  Sell
   close_open_b= 13 ,   // Close Sell + Open Buy
   close_open_s= 14 ,   // Close Buy + Open Sell
   open_buy_sell= 15 , // Open  Buy and Sell
  };
//+------------------------------------------------------------------+
input string    t= "-----   Balans Parameters -----" ;               //
input string    Template                     = "ADX" ;             // Имя шаблона(without '.tpl')
input bool      Inpwithout                   = false ;             // Сменить только шаблон (true)
input datetime InpMonday_2                  = D'1970.01.01' ;     // Dell (00::00 -> off)
input double    TargetProfit                 = 999999.99 ;         // Баланс + Прибыль(прибавить к балансу)
input double    TargetLoss                   = 0 ;                 // Баланс - Убыток(отнять от баланса)
input string    t0= "-----  Lots Parameters   -----" ;               //
input uint      maxLimits                    = 1 ;                 // Кол-во Позиции Открыть в одну сторону
input double    InpLots1                     = 0.01 ;               // : Lots 1
input int       InpLots_01                   = 200 ;               // Exchange Lots >< Point Lots
input double    InpLots2                     = 0.02 ;               // : Lots 2
input int       InpLots_02                   = 400 ;               // Exchange Lots >< Point Lots
input double    InpLots3                     = 0.04 ;               // : Lots 3
input int       InpLots_03                   = 800 ;               // Exchange Lots >< Point Lots
input double    InpLots4                     = 0.08 ;               // : Lots 4
input string    t1= "-----  TP SL             -----" ;               //
input int       InpTakeProfit                = 90 ;                 // Take Profit("0"-No.5<100)(1.00045-1.00055=1 pips)
input double    InpTProfit                   = 1000 ;               // Exchange TP >< Point TP
input double    InpStopLoss                  = 1000000 ;           // Exchange SL >< Point SL
input string    t2= "----- Exchange><Point TP SL---" ;               //
input bool      InpExcPoi                    = false ;             // Exchange= false; Point= true;
input string    t3= "----- Price Line:        -----" ;               //
input string    InpFont0                     = "BUY" ;             // Obj: BUY (Obj:Name) ВЕРХУ
input ENUM_TRADE_COMMAND InpCSCommand       = close_open_b;       // Obj:  command:
input string    InpFont1                     = "SELL" ;             // Obj: SELL (Obj:Name) ВНИЗУ
input ENUM_TRADE_COMMAND InCSCommand        = close_open_s;       // Obj:  command:
input double    InpObjTrail                  = 1.0001 ;             // Obj: Trailing Stop MACD ("0" -> Off)
input double    InpObjTrailStep              = 1.0001 ;             // Obj: Trailing Step MACD
input bool      InpDub                       = false ;             // "0.0":Price=false(Trail->Off) "LOW":Price=true(Trail->ON)
input bool      InpDubll                     = false ;             // Duplicate "BUY""SELL" (ObjTrailStep)
input ushort    InpObjTrailingStopCS         = 0 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStepCS         = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input string    InpFont2                     = "LOW Up" ;           // Obj: Name Price Line BUY
input string    InpFont3                     = "LOW Down" ;         // Obj: Name Price Line SELL
input bool      InpOnTimer                   = false ;             // On(Вкл.) "LOW Up" "LOW Down"
input int       InpChart2                    = 0 ;                 // Window numbe "LOW Up" "LOW Down"
input ushort    InpIndentUp                  = 5 ;                 // Indent up, in pips (1.00045-1.00055=1 pips)
input ushort    InpIndentDown                = 10 ;                 // Indent down, in pips (1.00045-1.00055=1 pips)
input string    t4= "----- Indicators: SELL   -----" ;               //
input string    short_name                   = "LeMan_BrainTrend1Sig" ; // Name Indicators "SELL"
input bool      InpIndicators                = false ;             // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY   = open_sell;         // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU   = close_sells;       // Trade command: (SellBuffer Indicators)
input string    t5= "----- Indicators: BUY    -----" ;               //
input string    short_name1                  = "LeMan_BrainTrend1Sig" ; // Name Indicators "BUY"
input bool      InpIndicators1               = false ;             // Indicators: Start (true)
input ENUM_TRADE_COMMAND InpTradeCommandY1  = close_buys;         // Trade command: (BuyBuffer Indicators)
input ENUM_TRADE_COMMAND InpTradeCommandU1  = open_buy;           // Trade command: (SellBuffer Indicators)
input string    t6= "----- Trailing Line: 1   -----" ;               //
input string    InpObjUpName                 = "ZTOP" ;             // Obj: TOP (Horizontal Line)
input int       InpStep1                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommand    = Line2_sells;       // Obj:  command:
input string    InpObjDownName               = "ZLOWER" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep2                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommand     = Line1_buys;         // Obj:  command:
input ushort    InpObjTrailingStop           = 0 ;                 // 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 bool      InpTurn_Off                  = false ;             // Obj:  command: Off
input string    t7= "----- Trailing Line: 2   -----" ;               //
input string    InpObjUpNameG                = "POT" ;             // Obj: TOP (Horizontal Line)
input int       InpStep3                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = Line2_sells;       // Obj:  command:
input string    InpObjDownNameG              = "REWOL" ;           // Obj: LOWER (Horizontal Line)
input int       InpStep4                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = Line1_buys;         // Obj:  command:
input ushort    InpObjTrailingStopG          = 0 ;                 // Obj: Trailing Stop (distance from price to object, in pips)
input ushort    InpObjTrailingStepG          = 5 ;                 // Obj: Trailing Step, in pips (1.00045-1.00055=1 pips)
input bool      InpTurn_Off_1                = false ;             // Obj:  command: Off
input string    t8= "----- ChartIndicatorAdd  -----" ;               // : Работа с Trailing Line: 2
input bool      InpChartInd                  = false ;             // Avto Line Chart Indicators
input string    InpIndiL                     = "AVERAGE 0" ;       // Line name (ChartIndicatorAdd)
input int       InpStep5                     = 15 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input string    InpIndi_name                 = "Имя Индикатора" ;   // Installation Indicator Name
input int       InpChart                     = 0 ;                 // Window numbe
input datetime InpMonday_1                  = D'1970.01.01' ;     // Installation Indicator (00::00->off)
input string    t9= "----- Indicator Delete   -----" ;               //
input string    Inpshort_name                = "Имя Индикатора" ;   // Delete Indicator Name
input string    Inpshort_name_1              = "Имя Индикатора" ;   // Delete Indicator Name
input bool      Inpres                       = false ;             // Delete All Indicators
input string    t10= "---- CalendarValueLast 1-----" ;               //
input datetime HoursFrom                    = D'1970.01.01' ;     // 1 Время старт Сигнал Календаря
input datetime HoursTo                      = D'1970.01.01' ;     // Время стоп Сигнал Календаря
input string    t11= "---- CalendarValueLast 2-----" ;               //
input datetime HoursFrom1                   = D'1970.01.01' ;     // 2 Время старт Сигнал Календаря
input datetime HoursTo1                     = D'1970.01.01' ;     // Время стоп Сигнал Календаря
input string    t12= "---- CalendarValueLast 3-----" ;               //
input datetime HoursFrom2                   = D'1970.01.01' ;     // 3 Время старт Сигнал Календаря
input datetime HoursTo2                     = D'1970.01.01' ;     // Время стоп Сигнал Календаря
input bool      InpCalend                    = true ;               // Double (Horizontal Line or Trend Line)
input string    InpSelldar                   = "Buydar" ;           // Line name (Horizontal Line or Trend Line)
input int       InpStep7                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpCalendCommandS  = open_sell;         // Trade command:
input string    InpBuydar                    = "Selldar" ;         // Line name (Horizontal Line or Trend Line)
input int       InpStep6                     = 30 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpCalendCommandB  = open_buy;           // Trade command:InpdarBuy
input string    t13= "---- Trade Line Name 1  -----" ;               //
input string    InpNameR                     = "LineR" ;           // Line name (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpTradeCommandR   = open_buy;           // Trade command:
input string    t14= "---- Trade Line Name 2  -----" ;               //
input string    InpNameS                     = "LineS" ;           // Line name (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpTradeCommandS   = open_sell;         // Trade command:
input string    t15= "---- Trade Line Name 3  -----" ;               //
input ENUM_TRADE_COMMAND InpAverage0_0      = open_buy;           // Trade command: BUY
input string    InpNameAverage0              = "TOP" ;             // Line Name TOP (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpAverage0        = open_sell;         // Trade command: SELL
input bool      InpDelLine_0                 = false ;             // Delete (Horizontal Line or Trend Line)
input string    t16= "---- Trade Line Name 4  -----" ;               //
input ENUM_TRADE_COMMAND InpAverage_x       = open_buy;           // Trade command: BUY
input string    InpNameAverage               = "AVERAGE" ;         // Line Name AVERAGE (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpAverage         = open_sell;         // Trade command: SELL
input bool      InpDelLine                   = false ;             // Delete (Horizontal Line or Trend Line)
input string    t17= "---- Trade Line Name 5  -----" ;               //
input ENUM_TRADE_COMMAND InpAverage1_1      = open_buy;           // Trade command: BUY
input string    InpNameAverage1              = "LOWER" ;           // Line Name LOWER (Horizontal Line or Trend Line)
input ENUM_TRADE_COMMAND InpAverage1        = open_sell;         // Trade command: SELL
input bool      InpDelLine_1                 = false ;             // Delete (Horizontal Line or Trend Line)
input string    t18= "---- XXX:Line name:XXX  -----" ;               //
input string    InpdarBuy                    = "BUY" ;             // Obj: BUY (Obj:Name) ВЕРХУ
input double    InpStep8                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input string    InpdarSell                   = "SELL" ;             // Obj: SELL (Obj:Name) ВНИЗУ
input double    InpStep9                     = 0 ;                 // Obj: Шаг сетки, пунктов("0" -> false)
input int       InpChart1                    = 0 ;                 // Window numbe
input string    t19= "----- Button:           -----" ;               //
input ENUM_TRADE_COMMAND InpTradeCommandBut = Line2_Line2;       // Obj(BUY):  command:Button: BUY
input ENUM_TRADE_COMMAND InTradeCommandBut  = Line1_Line1;       // Obj(SELL):  command:Button: SELL
input int       TrailingStop_STOP_LEVEL      = 36 ;                 // Button: Trailing Stop LEVEL
input string    t20= "---- Revers Buy><Sell   -----" ;               //
input bool      ObjRevers                    = false ;             // Revers
//+------------------------------------------------------------------+

Il n'est pas nécessaire de tout utiliser - sur un compte de démonstration , configurez et enregistrez dans un ensemble

Dossiers :
 
Vladimir Baskakov:
Je suis peut-être attardé, mais je ne comprends pas ce que c'est et pourquoi ? Quel est le but ?

Le but est d'apprendre et de montrer aux autres qui sont impliqués dans ce métier que vous pouvez construire, moi-même un expert et comprendre comment tout cela fonctionne.

(j'ai parcouru le fil - j'ai décidé de répéter Vladimir, pourquoi je suis stupide ici).

 
Alexsandr San:

#propriété version "1.030"

5 000 lignes - c'est ce que j'ai fait. Mais ! Avec cet utilitaire, vous pouvez construire presque n'importe quelle stratégie.

Il n'est pas nécessaire de tout utiliser, il suffit de le configurer sur un compte de démonstration et de l'enregistrer dans un ensemble de données.

La stratégie la plus simple consiste à utiliser cet utilitaire.Commande utilitaire.mq5

Si vous travaillez avec des ordres en suspens ou des positions ouvertes, vous pouvez simplement spécifier les profits et les pertes pour aujourd'hui.

ici même

input double   TargetProfit                 = 999999.99;         // Баланс + Прибыль(прибавить к балансу)
input double   TargetLoss                   = 0;                 // Баланс - Убыток(отнять от баланса)

C'est tout, va t'occuper de tes affaires.

 
Alexsandr San:

La stratégie la plus simple utilisant cet utilitaire .Commande utilitaire.mq5

Si vous travaillez vous-même avec des ordres en attente ou des positions ouvertes, vous pouvez simplement définir des profits et des pertes pour aujourd'hui.

ici même

C'est tout, va t'occuper de tes affaires.

Voici un exemple de la façon d'ouvrir une position à partir d'une ligne de tendance (ligne horizontale) (il y a plusieurs façons de le faire, immédiatement ou à la nouvelle barre).

S'il y a un renversement, il fermera cette position et ouvrira dans la direction opposée.

copier le nom et le coller dans les paramètres

Ici nous mettons en place - ce que nous voulons de la ligne de tendance (ligne horizontale)

inséré

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

Voici le graphique d'une minute pour montrer comment cela fonctionne. D'abord, la barre était sur la ligne et s'est ouverte à la vente, puis elle a traversé une barre plus haut,s' est fermée àla vente et s'est ouverte à l'achat.

EURJPYM1

 
Alexsandr San:

Voici un exemple - comment à partir de la ligne de tendance (ligne horizontale) ouvrir une position (il y a plusieurs façons - immédiatement ou à une nouvelle barre)

celui que j'ai défini s'ouvrira sur une nouvelle barre, la ligne ne sera pas supprimée. S'il y a un retournement, il fermera cette position et s'ouvrira dans la direction opposée.

Ici nous mettons en place - ce que nous voulons de la ligne de tendance (ligne horizontale)

Il serait bien d'avoir une description des boyaux)))) Je le suis depuis longtemps mais j'ai déjà oublié ce qu'il y a dedans))).

Raison: