Domande dai principianti MQL5 MT5 MetaTrader 5 - pagina 276

 
aleks557:

ciao principiante e avanzato aiutare a risolvere un problema di matematica 5 ° grado:)

...
Prima di tutto, pubblica qui il codice che hai scritto, rendilo buggato, ti aiuteremo. ora sembra "fammi questo e quello".
 
aleks557:
Cosa sto facendo di sbagliato? Dov'è il codice? L'ho inserito.
Oggi nel forum c'è un bug. Non tutto viene visualizzato come dovrebbe. Aspetta quando lo aggiustano.
 
paladin800:
C'è qualcosa di buggato nel forum oggi. Non tutto viene visualizzato come dovrebbe. Aspettate che lo aggiustino.

Controllo dell'inserimento del codice:

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void OnInit(void)
  {
//--- drawing settings
   SetIndexStyle(0,DRAW_NONE);
   SetIndexStyle(1,DRAW_HISTOGRAM);
   SetIndexStyle(2,DRAW_HISTOGRAM);
   IndicatorDigits(Digits+1);
   SetIndexDrawBegin(0,DATA_LIMIT);
   SetIndexDrawBegin(1,DATA_LIMIT);
   SetIndexDrawBegin(2,DATA_LIMIT);
 
//+------------------------------------------------------------------+
//|Il mio primo indicatore.mq5 |
//| Copyright 2014, MetaQuotes Software Corp. ||
//|http://www.mql5.com |
//+------------------------------------------------------------------+
#property version "1.00"
#property indicator_chart_window
input string Symbol0 = "EURUSD";//1 simbolo
input bool Trade0 = true; // on/off
input string Symb1 = "USDCHF";//2-simbolo
input bool Trade1 = true; // on/off
stringa di inputSymb2 = "USDJPY";//3 simbolo
input boolTrade2 = true; // on/off
stringa di inputSymb3 = "USDCAD";//4-simbolo
input boolTrade3 = true; // on/off
stringa di input Symb4 = "AUDUSD";//5-simbolo
input bool Trade4 = true; // on/off
input string Symb5 = "AUDNZD";//6symbol
input bool Trade5 = true; // on/off
input stringSymb6 = "USDCAD";//4-simbolo
input boolTrade6 = true; // on/off
stringa di inputSymb7 = "AUDUSD";//5-simbolo
ingresso boolTrade7 = true; // on/off
stringa di input Symb8 = "AUDNZD";/ /6-symbol
input bool Trade8 = true; //on/off
//+------------------------------------------------------------------+
//|Funzione di inizializzazione dell'indicatore personalizzata |
//+------------------------------------------------------------------+
Symbol0= a;



//--- mappatura dei buffer degli indicatori

//---

//+------------------------------------------------------------------+
//| Funzione di iterazione degli indicatori personalizzata|
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//---

//--- restituisce il valore di prev_calculated per la prossima chiamata
return(rates_total);
}
//+------------------------------------------------------------------+
 
//+------------------------------------------------------------------+
//|                                         мой первый индикатор.mq5 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property version   "1.00"
#property indicator_chart_window
input string            Symbol0 = "EURUSD";//1символ
input  bool            Trade0 = true; // вкл/выкл
input string            Symb1 = "USDCHF";//2символ
input  bool            Trade1 = true; // вкл/выкл
input string            Symb2 = "USDJPY";//3символ
input  bool            Trade2 = true; // вкл/выкл
input string            Symb3 = "USDCAD";//4символ
input  bool            Trade3 = true; // вкл/выкл
input string            Symb4 = "AUDUSD";//5символ
input  bool            Trade4 = true; // вкл/выкл
input string            Symb5 = "AUDNZD";//6символ
input  bool            Trade5 = true; // вкл/выкл
input string            Symb6 = "USDCAD";//4символ
input  bool            Trade6 = true; // вкл/выкл
input string            Symb7 = "AUDUSD";//5символ
input  bool            Trade7 = true; // вкл/выкл
input string            Symb8 = "AUDNZD";//6символ
input  bool            Trade8 = true; // вкл/выкл
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
 Symbol0= a;
 
 
  
//--- indicator buffers mapping
   
//---
 
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
 
aleks557:
Beh, fammi provare di nuovo :.................................................... no ragazzi non funziona! Proverò domani!

quale browser?

quale versione?

dettagli a servicedesk

 
usato le funzioni: inserire testo, immagini, tabelle, codice, video!
 

domanda

какой браузер?

versione del software?

la risposta è

usato la funzione: incolla testo, immagini, tabelle, codice, video!


nessun'altra domanda.

Siete invitati a continuare a lamentarvi.

 
sergeev:

Domanda

la risposta è


Niente più domande.

Sentitevi liberi di continuare a lamentarvi.

Chissà che versione è, ... la versione normale è quella che è stata venduta, e il browser con i pulsanti colorati ! Sto facendo una ricerca "Yandex" invano.

Tengo la mia stampante rigorosa e la mia tastiera sacra, e se il mouse è tentato, lo taglio!

Leggo Control+Alt+Delit:)))

Ho capito che MQl5 legge riga per riga. Grazie per la prima lezione!

 
//+------------------------------------------------------------------+
//|                                         мой первый индикатор.mq5 |
//|                        Copyright 2014, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+
#property version   "1.00"
#property indicator_chart_window
input string            Symb0 = "EURUSD";//1символ
input  bool            Trade0 = true; // вкл/выкл
input string            Symb1 = "USDCHF";//2символ
input  bool            Trade1 = true; // вкл/выкл
input string            Symb2 = "USDJPY";//3символ
input  bool            Trade2 = true; // вкл/выкл
input string            Symb3 = "USDCAD";//4символ
input  bool            Trade3 = true; // вкл/выкл
input string            Symb4 = "AUDUSD";//5символ
input  bool            Trade4 = true; // вкл/выкл
input string            Symb5 = "AUDNZD";//6символ
input  bool            Trade5 = true; // вкл/выкл
input string            Symb6 = "USDCAD";//4символ
input  bool            Trade6 = true; // вкл/выкл
input string            Symb7 = "AUDUSD";//5символ
input  bool            Trade7 = true; // вкл/выкл
input string            Symb8 = "AUDNZD";//6символ
input  bool            Trade8 = true; // вкл/выкл
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
 Symbol0= a;
 
 
  
//--- indicator buffers mapping
   
//---
 
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
задачку поставил для себя . найти среднее арифметическое валют и вывести в линии индикатора для начала . а сегодня идея пришла : Данный график выводится 
и расчет нового значения  выполняется каждый раз при получении информации о 
сделке по инструменту, входящему его состав, по следующей формуле:
V = Vпред. + Wист. * (EMAист. - EMAист.пред.), где:
 V – новое значение символа;
 Vпред. – предыдущее значение символа (начальное значение = 0);
 Wист. – вес источника (влияние изменений данного инструмента на символ, может 
принимать отрицательные значения);
 EMAист. – текущее значение экспоненциальной средней цены инструмента;
 EMAист.пред. - предыдущее значение экспоненциальной средней цены инструмента.
Значение EMAист. рассчитывается по следующей формуле:
EMAист. = Wн.з. * Pист. / step + (1 - Wн.з.) * EMAпред., где:
 Wн.з. – вес нового значения при усреднении (когда Wн.з. = 1 усреднения не происходит);
 Pист. – цена в сделке по данному инструменту;
 step – шаг цены инструмент в 
общем формула заимствована  от торгового привода Qscalp поводырь
а пока не знаю как описать среднее арифметическое валют и вывести в линии индикатора  растолкуйте пожалуйста чайнику