Como eu monto meu conselheiro por tentativa e erro - página 57

 
Alexsandr San:

#propriedade versão "1.026

Além disso, todos os tipos de artifícios.

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

Trabalha com Inteligência Humana - mas pode ser adaptado à Inteligência Artificial com Indicador.

--- Em minha mente, o Indicador é a Inteligência Artificial criada.

#propriedade versão "1.027

Fixados alguns lugares - Eliminação de ordens pendentes quando a meta é atingida.

Arquivos anexados:
 

#propriedade versão "1.028"

encontrou outro caminho.

adicionou um Nome para linhas horizontais para que possam ser definidas em qualquer subjanela

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

Eles não têm comandos - eu preciso de um Nome deles.

mas os comandos podem ser definidos em subwindows - com esta função

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)

mudar estes nomes para o nome indicador

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

por exemplo, este é o nome da linha Horizontal no Indicador (PREÇO).

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

USDCADM30

Arquivos anexados:
 

Você pode pensar que a Utilidade é difícil de entender - mas não é.

estas características que coloquei - mas só uso duas Linhas Horizontais. comprei vendidas

 

Ajustei um pouco o Indicador para mimhttps://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 Индикатор...
Arquivos anexados:
H_A_Lin_S_W.mq5  22 kb
 

#propriedade versão "1.029

Acrescentou a possibilidade desta função

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 esta linha é ativada (preço atual "BAIXO para cima";"BAIXO para baixo";) você pode selecionar, subjanela

EURUSDH2xsubjanela =0EURUSDH2subjanela =1

Linhas Horizontais Cinzentas

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

Somente estas Linhas Horizontais funcionam na subjanela =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 estes também podem ser ativados

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

estes para transferir o nome da linha Horizontal para outra linha Horizontal com o mesmo nome mas com o comando

Arquivos anexados:
 

#propriedade versão "1.030"

5000 linhas - foi isso que eu peguei. Mas! com este utilitário, você pode construir quase qualquer estratégia.

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

Não é necessário usar tudo - em uma conta demo , configure e salve em um conjunto

Arquivos anexados:
 
Vladimir Baskakov:
Talvez eu seja retardado, mas não entendo o que é isso e por quê? Qual é a finalidade?

O propósito de aprender e mostrar aos outros que estão envolvidos nesta arte que você pode construir, eu mesmo um especialista e entender como tudo isso funciona.

(passou pela linha - decidiu repetir Vladimir, por que sou estúpido aqui).

 
Alexsandr San:

#propriedade versão "1.030

5.000 linhas - foi o que eu fiz. Mas! com esta Utilidade, você pode construir quase qualquer estratégia.

Você não precisa usar tudo, basta configurá-lo em uma conta demo e salvá-lo em um conjunto

A estratégia mais fácil, usando esta utilidade .Utility Command.mq5

Se você trabalha com ordens pendentes ou posições em aberto, você pode simplesmente especificar os Lucros e Perdas para hoje

bem ali

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

Isso é tudo, vá se meter na sua própria vida

 
Alexsandr San:

A estratégia mais simples utilizando este Utilitário .Utility Command.mq5

Se você mesmo trabalha com ordens pendentes ou posições abertas, você pode simplesmente definir Lucros e Perdas para hoje

bem ali

Isso é tudo, vá se meter na sua própria vida

Aqui está um exemplo de como abrir uma posição a partir de uma Trendline (linha horizontal) (há várias maneiras de fazer isso, imediatamente ou em um novo bar)

Se houver uma inversão, ela fechará essa posição e abrirá na direção oposta

copiar o nome e colá-lo nas configurações

Aqui nós montamos - o que queremos da linha de tendência (Linha Horizontal)

inserido

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

Aqui no gráfico de um minuto para demonstrar como funciona. Primeiro a barra estava em linha e abriu em Vender, cruzou uma barra mais alta, fechouVender e abriu em Comprar

EURJPYM1

 
Alexsandr San:

Aqui está um exemplo - como a partir da linha Trend (Linha Horizontal) para abrir uma posição (há várias maneiras - imediatamente ou em um novo bar)

esta que defini abrirá em uma nova barra, a linha não será apagada. se houver uma inversão - ela fechará essa posição e abrirá na direção oposta

Aqui nós montamos - o que queremos da linha de tendência (Linha Horizontal)

Seria bom ter uma descrição do guts)))) Tenho seguido isso por muito tempo, mas já esqueci o que está dentro))))

Razão: