Cómo armo mi asesor por ensayo y error - página 57

 
Alexsandr San:

#versión de la propiedad "1.026"

Además de eso, todo tipo de trucos .

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

Funciona con la Inteligencia Humana - pero se puede adaptar a la Inteligencia Artificial con el Indicador.

--- En mi opinión, el Indicador es la Inteligencia Artificial creada.

#versión de la propiedad "1.027"

Corregidos algunos puntos - Eliminación de órdenes pendientes cuando se alcanza el objetivo.

Archivos adjuntos:
 

#versión de la propiedad "1.028"

encontró otra manera.

se ha añadido un nombre para las líneas horizontales, de modo que puedan establecerse en cualquier subventana

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

No tienen comandos - necesito un Nombre de ellos.

pero los comandos se pueden establecer en subventanas - con esta función

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)

cambiar estos nombres por el nombre del indicador

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

por ejemplo, este es el nombre de la línea horizontal en el indicador (PRECIO).

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

USDCADM30

Archivos adjuntos:
 

Puede pensar que la Utilidad es difícil de entender, pero no lo es.

estas características que he puesto - pero sólo uso dos Líneas Horizontales. compradas vendidas

 

Ajusté el indicador un poco para míhttps://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 Индикатор...
Archivos adjuntos:
H_A_Lin_S_W.mq5  22 kb
 

#versión de la propiedad "1.029"

Se ha añadido la posibilidad de esta función

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)

cuando se activa esta línea (precio actual "LOW Up";"LOW Down";) puede seleccionar, subventana

EURUSDH2xsubventana =0EURUSDH2subventana =1

Líneas horizontales grises

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

Sólo estas líneas horizontales funcionan en la subventana =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:

y estos también pueden ser activados

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

estos para transferir el nombre de la línea Horizontal a otra línea Horizontal con el mismo nombre pero con el comando

Archivos adjuntos:
 

#versión de propiedad "1.030"

5000 líneas - eso es lo que me quedé. ¡Pero! con esta Utilidad, puedes construir casi cualquier estrategia.

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

No es necesario usar todo: en una cuenta de demostración , configure y guarde en un conjunto

Archivos adjuntos:
 
Vladimir Baskakov:
Tal vez sea retrasado, pero no entiendo qué es y por qué. ¿Cuál es el objetivo?

El propósito es aprender y mostrar a otros que se dedican a este oficio que se puede construir, yo mismo un experto y entender cómo funciona todo.

(revisó el hilo - decidió repetir Vladimir, por qué soy estúpido aquí).

 
Alexsandr San:

#versión de la propiedad "1.030"

5.000 líneas: eso es lo que he hecho. Pero! Con esta Utilidad, puedes construir casi cualquier estrategia.

No es necesario que lo utilices todo, simplemente configúralo en una cuenta demo y guárdalo en un conjunto

La estrategia más sencilla, utilizando esta utilidad .Comando de utilidad.mq5

Si trabaja con órdenes pendientes o posiciones abiertas, puede simplemente especificar el Beneficio y la Pérdida para hoy

aquí

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

Eso es todo, ve a ocuparte de tus propios asuntos

 
Alexsandr San:

La estrategia más sencilla utilizando esta Utilidad .Comando de utilidad.mq5

Si trabaja con órdenes pendientes o posiciones abiertas por usted mismo, puede simplemente establecer Ganancias y Pérdidas para hoy

aquí

Eso es todo, ve a ocuparte de tus propios asuntos

Este es un ejemplo de cómo abrir una posición desde una línea de tendencia (línea horizontal) (hay varias formas de hacerlo, inmediatamente o en una nueva barra)

Si hay una inversión, cerrará esa posición y abrirá en la dirección opuesta

copiar el nombre y pegarlo en la configuración

Aquí establecemos - lo que queremos de la línea de tendencia (Línea horizontal)

insertado

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

Aquí en el gráfico de un minuto para demostrar cómo funciona. Primero la barra estuvo en la línea y abrió en Venta, cruzó una barra más arriba, cerró enVenta y abrió en Compra

EURJPYM1

 
Alexsandr San:

Aquí está un ejemplo - cómo desde la línea de tendencia (línea horizontal) para abrir una posición (hay varias maneras - inmediatamente o en una nueva barra)

esta que he puesto se abrirá en una nueva barra, la línea no se borrará. si hay una inversión - cerrará esa posición y abrirá en la dirección opuesta

Aquí establecemos - lo que queremos de la línea de tendencia (Línea horizontal)

Sería bueno tener una descripción de las tripas)))) Lo sigo desde hace tiempo pero ya se me ha olvidado lo que hay dentro)))

Razón de la queja: