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

 

Indicatore - Obj LeM Brain - può essere adattato a ExpertUtility Command.mq5

Foto di

Hai anche bisogno di altri 2 indicatori - LeMan_BrainTrend1Sig - e - LeManTrend Indicator - senza di loro non funziona- Obj LeM Brain -

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

aumentare la distanza delle linee orizzontali, dal punto

Istantanea2

 
Alexsandr San:

Abbiamo bisogno di aggiungere un'altra funzione - quando la linea orizzontale viene attivata, che è presente in molti indicatori, per eliminare non solo la linea ma anche l'indicatore stesso, che disegna la linea orizzontale

 
Alexsandr San:

Un'altra funzione da aggiungere - quando si attiva la linea orizzontale, che è presente in molti indicatori, per cancellare non solo la linea ma anche l'indicatore stesso che disegna la linea orizzontale

Funzione aggiunta

input string   t8="------ Indicator Delete ------";              //
input string   Inpshort_name                = "Obj LeM Brain";   // INDICATOR_SHORTNAME 1
input string   Inpshort_name0               = "Indicator 2";     // INDICATOR_SHORTNAME 2
input bool     Inpres                       = false;             // Delete All Indicators
//---
#property version     "1.002"
File:
 
Alexsandr San:

Indicatore - Obj LeM Brain - può essere adattato a ExpertUtility Command.mq5

per un indicatore hai bisogno di altri 2 indicatori - LeMan_BrainTrend1Sig - e - LeManTrend Indicator - senza di loro non funziona- Obj LeM Brain -

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

aumentare la distanza delle linee orizzontali, dal punto


Gira fuori e meno , cambia le linee orizzontali verso l'interno

Foto di

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

Questo indicatore non ha bisogno di essere scritto in un Expert Advisor - solo le linee orizzontali sono necessarie per questo indicatore. Dovrebbe essere scritto in Expert Advisor per eliminare l'indicatore

non dovete usarlo -

input string   t2="----- 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   t3="----- 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)

e qui - per cancellare l'indicatore - in modo che le linee orizzontali dell'indicatore non ripetano i comandi

input string   t8="------ Indicator Delete ------";              //
input string   Inpshort_name                = "Obj LeM Brain";   // INDICATOR_SHORTNAME 1
input string   Inpshort_name0               = "Indicator 2";     // INDICATOR_SHORTNAME 2
input bool     Inpres                       = false;             // Delete All Indicators
 

un'altra funzione da aggiungere all'Expert, dal segnale per impostare l'indicatore sul grafico

//+------------------------------------------------------------------+
//|                                         AddChartIndicatorAdd.mq5 |
//|                        Copyright 2020, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2020, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property script_show_inputs
//---
input string Inpshort_name  = "Obj LeM Brain"; // INDICATOR_SHORTNAME
input string Inpshort_name0 = "Examples/MACD"; // INDICATOR_SHORTNAME
//---
int indicator_handle=INVALID_HANDLE;
int indicator_handle0=INVALID_HANDLE;
//+------------------------------------------------------------------+
//| Script program start function                                    |
//+------------------------------------------------------------------+
void OnStart()
  {
//---
   AddIndicator();
   AddIndicator0();
  }
//+------------------------------------------------------------------+
//| Функция проверки и добавления индикатора на график               |
//+------------------------------------------------------------------+
bool AddIndicator()
  {
//--- выводимое сообщение
   string message;
//--- проверим на совпадение символ индикатора и символ графика
   if(_Symbol!=_Symbol)
     {
      message="Демонстрация использования функции Demo_ChartIndicatorAdd():";
      message=message+"\r\n";
      message=message+"Нельзя на график добавить индикатор, рассчитанный на другом символе.";
      message=message+"\r\n";
      message=message+"Укажите в свойствах эксперта символ графика - "+_Symbol+".";
      Alert(message);
      //--- досрочный выход, не будем добавлять индикатор на график
      return false;
     }
//--- проверим на совпадение таймфрейм индикатора и таймфрейм графика
   if(_Period!=_Period)
     {
      message="Нельзя на график добавить индикатор, рассчитанный на другом таймфрейме.";
      message=message+"\r\n";
      message=message+"Укажите в свойствах эксперта таймфрейм графика - "+EnumToString(_Period)+".";
      Alert(message);
      //--- досрочный выход, не будем добавлять индикатор на график
      return false;
     }
//--- все проверки прошли, символ и период индикатора соответствуют графику
   if(indicator_handle==INVALID_HANDLE)
     {
      Print(__FUNCTION__,"  Создаем индикатор MACD");
      indicator_handle=iCustom(_Symbol,_Period,Inpshort_name);
      if(indicator_handle==INVALID_HANDLE)
        {
         Print("Не удалось создать индикатор MACD. Код ошибки ",GetLastError());
        }
     }
//--- сбросим код ошибки
   ResetLastError();
//--- накладываем индикатор на график
   Print(__FUNCTION__,"  Добавляем индикатор MACD на график");
   Print("MACD построен на ",_Symbol,"/",EnumToString(_Period));
//--- получим номер нового подокна, в которое добавим индикатор MACD
   int subwindow=(int)ChartGetInteger(0,0);
   PrintFormat("Добавляем индикатор MACD на окно %d графика",subwindow);
   if(!ChartIndicatorAdd(0,subwindow,indicator_handle))
     {
      PrintFormat("Не удалось добавить индикатор MACD на окно %d графика. Код ошибки  %d",
                  subwindow,GetLastError());
     }
//--- добавление индикатора на график прошло успешно
   return(true);
  }
//+------------------------------------------------------------------+
//| Функция проверки и добавления индикатора на график               |
//+------------------------------------------------------------------+
bool AddIndicator0()
  {
//--- выводимое сообщение
   string message;
//--- проверим на совпадение символ индикатора и символ графика
   if(_Symbol!=_Symbol)
     {
      message="Демонстрация использования функции Demo_ChartIndicatorAdd():";
      message=message+"\r\n";
      message=message+"Нельзя на график добавить индикатор, рассчитанный на другом символе.";
      message=message+"\r\n";
      message=message+"Укажите в свойствах эксперта символ графика - "+_Symbol+".";
      Alert(message);
      //--- досрочный выход, не будем добавлять индикатор на график
      return false;
     }
//--- проверим на совпадение таймфрейм индикатора и таймфрейм графика
   if(_Period!=_Period)
     {
      message="Нельзя на график добавить индикатор, рассчитанный на другом таймфрейме.";
      message=message+"\r\n";
      message=message+"Укажите в свойствах эксперта таймфрейм графика - "+EnumToString(_Period)+".";
      Alert(message);
      //--- досрочный выход, не будем добавлять индикатор на график
      return false;
     }
//--- все проверки прошли, символ и период индикатора соответствуют графику
   if(indicator_handle0==INVALID_HANDLE)
     {
      Print(__FUNCTION__,"  Создаем индикатор MACD");
      indicator_handle0=iCustom(_Symbol,_Period,Inpshort_name0);
      if(indicator_handle0==INVALID_HANDLE)
        {
         Print("Не удалось создать индикатор MACD. Код ошибки ",GetLastError());
        }
     }
//--- сбросим код ошибки
   ResetLastError();
//--- накладываем индикатор на график
   Print(__FUNCTION__,"  Добавляем индикатор MACD на график");
   Print("MACD построен на ",_Symbol,"/",EnumToString(_Period));
//--- получим номер нового подокна, в которое добавим индикатор MACD
   int subwindow=(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL);
   PrintFormat("Добавляем индикатор MACD на окно %d графика",subwindow);
   if(!ChartIndicatorAdd(0,subwindow,indicator_handle0))
     {
      PrintFormat("Не удалось добавить индикатор MACD на окно %d графика. Код ошибки  %d",
                  subwindow,GetLastError());
     }
//--- добавление индикатора на график прошло успешно
   return(true);
  }
//+------------------------------------------------------------------+

Colpo4

 

Non riesco a capire cosa mi serve da questa funzione.

Penso di averlo trovato, ma ora devo scrivere nel codice le seguenti azioni, come nell'immagine

Foto di

 
Alexsandr San:

Non riesco a capire cosa mi serve da questa funzione.

Penso di aver trovato un'opzione, ho solo bisogno di scrivere nel codice tali azioni, come nell'immagine

Ho aggiunto questa caratteristica al comando Utility ("Utility Command") #property version "1.004"

in basso, le impostazioni per questa funzione

input string   t1="----- Trailing Line: 2   -----";              //
input string   InpObjUpNameG                = "POT";             // Obj: TOP (Horizontal Line)
input int      InpStep3                     = 0;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InpTradeCommandG   = close_open_b;      // Obj:  command:
input string   InpObjDownNameG              = "REWOL";           // Obj: LOWER (Horizontal Line)
input int      InpStep4                     = 0;                 // Obj: Шаг сетки, пунктов("0" -> false)
input ENUM_TRADE_COMMAND InTradeCommandG    = close_open_s;      // 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 string   t9="------ ChartIndicatorAdd -----";              //
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                 = "Obj LeM Brain";   // INDICATOR_SHORTNAME

nome della linea di tendenza o linea orizzontale - per impostare l'indicatore

input string   InpIndiL                     = "AVERAGE 0";       // Line name (ChartIndicatorAdd)

nome dell'indicatore - quale indicatore si vuole installare sul grafico

input string   InpIndi_name                 = "Obj LeM Brain";   // INDICATOR_SHORTNAME

nome della linea orizzontale o di tendenza dell'indicatore

input string   InpObjUpNameG                = "POT";             // Obj: TOP (Horizontal Line)


input string   InpObjDownNameG              = "REWOL";           // Obj: LOWER (Horizontal Line)

Foto di

-------------------------- il principio di funzionamento dovrebbe essere

GBPUSDM2

----------------------- L'indicatore ha spostato la linea orizzontale (blu) - se sfonda, si aprirà in SELL e rimuoverà l'indicatore e imposterà la linea gialla, che sarà raccolta da un altro indicatore e sposterà la linea al livello viola dell'indicatore - dopo, la linea orizzontale gialla, di nuovo impostare l'indicatore

GBPUSDM2h

File:
 
Lo si fa con il "calibro" e lo si fa con il "calibro".

Il "dito nel cielo" è il tempo nel vento.
 
Alexsandr San:

Quando scarico un deposito, comincio a frugare.

Quindi, state perdendo i depositi prima ancora di iniziare a fare trading.
Quindi si "punzecchia" dall'inizio alla fine.
 
Alexsandr San:

Pensavo che avresti detto qualcosa di intelligente.

Le cose intelligenti si dicono quando c'è un bisogno immediato.
Ora ce n'era bisogno. Ma a quanto pare non è servito a niente.
Motivazione: