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

 
Alexsandr San:

#proprietà versione "1.026"

Oltre a questo, tutti i tipi di espedienti.

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

Funziona con l'intelligenza umana - ma può essere adattato all'intelligenza artificiale con Indicatore.

--- Nella mia mente, l'indicatore è l'intelligenza artificiale creata.

#proprietà versione "1.027"

Corretti alcuni posti - Cancellazione degli ordini in sospeso quando si raggiunge l'obiettivo.

File:
 

#proprietà versione "1.028"

ha trovato un altro modo.

aggiunto un Nome per le linee orizzontali in modo che possano essere impostate su qualsiasi sottofinestra

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;                 // номер подокна

Non hanno comandi - ho bisogno di un Nome da loro.

ma i comandi possono essere impostati in sottofinestre - con questa funzione

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)

cambiare questi nomi con il nome dell'indicatore

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

per esempio questo è il nome della linea orizzontale nell'indicatore (PREZZO).

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

USDCADM30

File:
 

Si potrebbe pensare che l'utilità sia difficile da capire - ma non lo è.

queste caratteristiche che ho messo - ma io uso solo due linee orizzontali.

 

Ho regolato un po' l'indicatore per me stessohttps://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 Индикатор...
File:
H_A_Lin_S_W.mq5  22 kb
 

#proprietà versione "1.029"

Aggiunta la possibilità di questa funzione

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)

quando questa linea è attivata (prezzo corrente "LOW Up";"LOW Down";) potete selezionare, sottofinestra

EURUSDH2xsubwindow =0EURUSDH2subwindow =1

linee orizzontali grigie

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

Solo queste linee orizzontali funzionano nella sottofinestra =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:

e questi possono anche essere attivati

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;                 // номер подокна

questi per trasferire il nome della linea orizzontale a un'altra linea orizzontale con lo stesso nome ma con il comando

File:
 

#versione proprietà "1.030"

5000 righe - questo è quello che ho bloccato. Ma! con questa utilità, puoi costruire quasi tutte le strategie.

 //+------------------------------------------------------------------+
//| 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
//+------------------------------------------------------------------+

Non è necessario utilizzare tutto: su un account demo , configurare e salvare su un set

File:
 
Vladimir Baskakov:
Forse sono ritardato, ma non capisco cosa sia e perché? Qual è lo scopo?

Lo scopo di imparare e mostrare agli altri che sono coinvolti in questo mestiere che si può costruire, me stesso un esperto e capire come funziona tutto.

(ha attraversato il thread - ha deciso di ripetere Vladimir, perché sono stupido qui).

 
Alexsandr San:

#proprietà versione "1.030"

5.000 righe - questo è quello che ho fatto. Ma con questa utilità si può costruire quasi qualsiasi strategia.

Non è necessario usare tutto, basta impostarlo su un conto demo e salvarlo su un set

La strategia più semplice, utilizzando questa utility .Comando di utilità.mq5

Se lavorate con ordini pendenti o posizioni aperte, potete semplicemente specificare il profitto e la perdita per oggi

proprio qui

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

Questo è tutto, vai a farti gli affari tuoi

 
Alexsandr San:

La strategia più semplice utilizzando questa utilità.Comando di utilità.mq5

Se lavorate con ordini pendenti o posizioni aperte da soli, potete semplicemente impostare Profit and Loss per oggi

proprio qui

Questo è tutto, vai a farti gli affari tuoi

Ecco un esempio di come aprire una posizione da una Trendline (linea orizzontale) (ci sono diversi modi per farlo, immediatamente o alla nuova barra)

Se c'è un'inversione, chiuderà quella posizione e aprirà nella direzione opposta

copiare il nome e incollarlo nelle impostazioni

Qui abbiamo impostato - ciò che vogliamo dalla linea di tendenza (linea orizzontale)

inserito

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

Qui sul grafico di un minuto per dimostrare come funziona. Prima la barra era sulla linea e ha aperto in Sell, ha attraversato una barra più in alto, ha chiusoSell e ha aperto in Buy

EURJPYM1

 
Alexsandr San:

Ecco un esempio - come dalla linea di tendenza (linea orizzontale) aprire una posizione (ci sono diversi modi - immediatamente o ad una nuova barra)

questo che ho impostato si aprirà su una nuova barra, la linea non sarà cancellata. se c'è un'inversione - chiuderà quella posizione e si aprirà nella direzione opposta

Qui abbiamo impostato - ciò che vogliamo dalla linea di tendenza (linea orizzontale)

Sarebbe bello avere una descrizione delle budella)))) Lo seguo da molto tempo ma ho già dimenticato cosa c'è dentro)))

Motivazione: