Simboli personalizzati. Errori, bug, domande, suggerimenti. - pagina 22

 
Artyom Trishkin :
Meglio scrivere in inglese che sui simboli doganali :)
Sono questi i personaggi personalizzati? E non vengono aggiunte zecche?

Sì. I TAKE TICKS non vengono aggiunti. Non capisco la ragione. Sto controllando l'ora. Era corretto.

 
jaffer wilson:

Sì, i biglietti fiscali non sono stati aggiunti. Non capisco la ragione. Sto controllando l'ora. Era la cosa giusta da fare.

@fxsaber è ben informato su questi argomenti. Non ti sono d'aiuto qui.
Slava sa tutto, ma è un uomo impegnato e non c'è sempre tempo per le sollecitazioni.
 
Artyom Trishkin:
@fxsaber conosce bene queste domande. Non sono il vostro aiutante qui.
Slava sa tutto, ma è un uomo impegnato e non ha sempre tempo per consigliare.

La prima domanda sarà su GetLastError e sui log del terminale e degli esperti

 
Slava:

La prima domanda riguarderà GetLastError e i log del terminale e gli esperti

Continuo a ricevere questo:

TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 03 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 04 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 05 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 06 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 07 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 08 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 30 : 09 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 00 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   5032 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 01 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 02 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 03 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 04 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 05 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 06 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 07 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 08 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 31 : 09 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   0 
TestIndciatorTicks (EURUSD,M1)   2019.02 . 01 23 : 32 : 00 
TestIndciatorTicks (EURUSD,M1)   1 
TestIndciatorTicks (EURUSD,M1)   5032 

Si prega di controllare.

 
jaffer wilson:

Continuo a ricevere questo:

Si prega di controllare.

Da dove viene l'errore 5032?

Dov'è la cancellazione della cronologia personalizzata dopo aver cancellato le zecche?

Dove sono i controlli per aggiungere le zecche? Quante barre della storia si sono formate dopo aver aggiunto i tick a OnInit?

Perché CustomTicksAdd è usato in OnInit invece di CustomTicksReplace?


PS. I tick vengono ricevuti correttamente in MarketWatch, ma non applicati al grafico della storia. Capire cosa fare.

 
Slava:

PS. I tick sono corretti in MarketWatch, ma non si applicano al grafico storico. Capire cosa fare.

Quindi c'è una discreta quantità di bug numerati in questo ramo.

 

Slava:

PS. I tick sono corretti in MarketWatch, ma non si applicano al grafico storico. Capire cosa fare.

Non applicato perché non attuale. In realtà sei mesi di vita

 
Slava :

Non applicato perché non attuale. Sei mesi di vita.

Ho provato il programma con i controlli aggiunti. Ho ancora lo stesso problema.

#property  indicator_chart_window
#property  indicator_buffers  1
#property  indicator_plots  1
#include  <Symbol.mqh>
input  datetime start_date = D'2019.10.7 00:00:00 ' ;
input  int Chops = 10 ;
int data_filled = 0 ;
string symbol_custom = StringFormat("% s_% dsec", _Symbol, Chops);
long chart_id =0 ;
datetime start;
void  OnInit()
  {
   ResetLastError();
// CustomSymbolDelete (symbol_custom);
   start = start_date- 60 ;
   Print("Ticks History Deleted:", CustomTicksDelete(symbol_custom, 0, LONG_MAX));
   data_filled = 0 ;

   const SYMBOL SYMB(symbol_custom);
   SYMB.CloneProperties(_Symbol);
   SYMB.On();
   MqlTick ticks_add [];
   int len = CopyTicksRange(_Symbol, ticks_add, COPY_TICKS_INFO, ulong(start_date) * 1000, ulong(TimeCurrent()) * 1000);
   Print("Ticks:", len);
   start = start - (len * 60);
   Print("Start Date:", start);
   for(int i = 0 ; i <len &&! IsStopped(); i ++)
     {
      if(data_filled% Chops == 0)
        {
         start = start + 60 ;
         start = datetime(TimeToString(start, TIME_DATE) + "" + TimeToString(start, TIME_MINUTES) + ": 00");
        }
      else
        {
         start ++;
        }
      ticks_add [i] .time = start;
      ticks_add [i] .time_msc = long (ticks_add [i] .time) * 1000 ;
      data_filled ++;
     }
   if(SYMB.CloneTicks(ticks_add)<1)
     {
      Print("Ticks cannot be replaced : ",GetLastError());
      if(CustomTicksAdd(symbol_custom, ticks_add)<1)
        {
         Print("Ticks Cannot be added : ",GetLastError());
        }
     }

   chart_id = ChartOpen(symbol_custom, _Period);
   Print(GetLastError());
   ResetLastError();
  }
void  OnDeinit(const  int r)
  {
   if(chart_id!= 0)
     {
      ChartClose(chart_id);
     }
   return ;
  }
// + ----------------------------------------------- ------------------- +
// + --------------------------- --------------------------------------- +
// | 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 [])
  {
   if(rates_total <= 0)
      return  0 ;
   MqlTick ticks [ 1 ];
   CopyTicks(_Symbol, ticks, COPY_TICKS_INFO, ulong(TimeCurrent()) * 1000, 1);
   if(data_filled% Chops == 0)
     {
      start = start + 60 ;
      start = datetime(TimeToString(start, TIME_DATE) + "" + TimeToString(start, TIME_MINUTES) + ": 00");
     }
   else
     {
      start ++;
     }
   Print(start,"  ",rates_total);
   ticks [ 0 ] .time = start;
   ticks [ 0 ] .time_msc = long (start) * 1000 ;
   data_filled ++;

   if(CustomTicksAdd(symbol_custom, ticks)<1)
     {
      Print("Tick not added : ", GetLastError());
     }
   return (rates_total);
  }
//+------------------------------------------------------------------+

TestIndciatorTicks (EURUSD,M1)  Ticks History Deleted:0
TestIndciatorTicks (EURUSD,M1)  Ticks:34877
TestIndciatorTicks (EURUSD,M1)  Start Date:2019.09.19 18:42:00
TestIndciatorTicks (EURUSD,M1)  Ticks cannot be replaced : 0
TestIndciatorTicks (EURUSD,M1)  Ticks Cannot be added : 5310
TestIndciatorTicks (EURUSD,M1)  5310
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:50:07  7468145
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:50:08  7468145
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:50:09  7468145
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:00  7468145
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:01  7468145
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:02  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:03  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:04  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:05  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:06  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:07  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:08  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:51:09  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:00  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:01  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:02  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:03  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:04  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:05  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:06  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:07  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:08  7468146
TestIndciatorTicks (EURUSD,M1)  2019.09.01 23:52:09  7468146

Per favore, fatemi sapere cosa fare.

 

Al momento, non è possibile formare barre degli strumenti personalizzate con tick di un giorno diverso da oggi (ieri, l'altro ieri, l'anno scorso, ecc.).

Ma. Abbiamo fatto una correzione.

Quando si usa CustomTicksReplace (non CustomTicksAdd! non usare CustomTicksAdd per aggiungere zecche in massa), l'ultimo giorno di zecche aggiunte diventa "attuale" se non ci sono state zecche per oggi prima.

Aspettate la prossima build. Poi continueremo gli esperimenti e le discussioni

 
Slava :

Al momento, non è possibile formare barre degli strumenti personalizzate con tick di un giorno diverso da oggi (ieri, l'altro ieri, l'anno scorso, ecc.).

Ma. Abbiamo fatto una correzione.

Quando si usa CustomTicksReplace (non CustomTicksAdd! non usare CustomTicksAdd per aggiungere zecche in blocco), l'ultimo giorno di zecche aggiunto diventa "attuale" se non ci sono state zecche per il giorno corrente prima di quello.

Aspettate la prossima build. Poi continueremo gli esperimenti e le discussioni

Grazie, Slava. Lo aspetterò.