Symboles personnalisés. Erreurs, bogues, questions, suggestions. - page 22

 
Artyom Trishkin :
Il est préférable d'écrire en anglais plutôt que sur les symboles douaniers :)
S'agit-il de caractères personnalisés ? Et aucune tique n'y est ajoutée ?

Oui. Les TAKE TICKS ne sont pas ajoutés. Je ne comprends pas la raison. Je vérifie l'heure. C'était correct.

 
jaffer wilson:

Oui. Les BILLETS DE TAXE n'ont pas été ajoutés. Je ne comprends pas la raison. Je vérifie l'heure. C'était la bonne chose à faire.

@fxsaber est très au fait de ces questions. Je ne suis d'aucune aide pour vous ici.
Slava sait tout, mais c'est un homme occupé et il n'a pas toujours le temps d'être prompt.
 
Artyom Trishkin:
@fxsaber connaît bien ces questions. Je ne suis pas votre aide ici.
Slava sait tout, mais c'est un homme occupé et il n'a pas toujours le temps de conseiller.

La toute première question portera sur GetLastError et les journaux du terminal et des experts.

 
Slava:

La toute première question portera sur GetLastError, les journaux du terminal et les experts.

Je n'arrête pas d'avoir ça :

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 

Veuillez vérifier.

 
jaffer wilson:

Je n'arrête pas d'avoir ça :

Veuillez vérifier.

D'où vient l'erreur 5032 ?

Où se trouve la suppression de l'historique personnalisé après la suppression des ticks ?

Où sont les contrôles pour l'ajout de tiques ? Combien de barres d'historique se sont formées après avoir ajouté des ticks à OnInit ?

Pourquoi CustomTicksAdd est-il utilisé dans OnInit au lieu de CustomTicksReplace ?


PS. Les ticks sont correctement reçus dans MarketWatch, mais ne sont pas appliqués au graphique historique. J'ai compris.

 
Slava:

PS. Les ticks sont corrects dans MarketWatch, mais ne s'appliquent pas au graphique historique. J'ai compris.

Il y a donc une quantité décente de bogues numérotés dans cette branche.

 

Slava:

PS. Les ticks sont corrects dans MarketWatch, mais ne s'appliquent pas au graphique historique. J'ai compris.

Non appliqué car pas d'actualité. En fait, il a six mois

 
Slava :

Non appliqué car pas d'actualité. Six mois tout au plus.

J'ai essayé le programme avec les contrôles ajoutés. J'ai toujours le même problème.

#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

Faites-moi savoir ce qu'il faut faire.

 

Pour l'instant, il n'est pas possible de former des barres d'outils personnalisées avec des ticks d'un jour autre qu'aujourd'hui (hier, avant-hier, l'année dernière, etc.).

Mais. Nous avons fait une correction.

Lorsque vous utilisez CustomTicksReplace (et non CustomTicksAdd ! n'utilisez pas CustomTicksAdd pour ajouter des ticks en masse), le dernier jour des ticks ajoutés devient "actuel" s'il n'y avait pas de ticks pour aujourd'hui avant cela.

Attendez la prochaine version. Ensuite, nous continuerons les expériences et les discussions

 
Slava :

Pour l'instant, il n'est pas possible de former des barres d'outils personnalisées avec des ticks d'un jour autre qu'aujourd'hui (hier, avant-hier, l'année dernière, etc.).

Mais. Nous avons fait une correction.

Lorsque vous utilisez CustomTicksReplace (et non CustomTicksAdd ! n'utilisez pas CustomTicksAdd pour ajouter des ticks en masse), le dernier jour des ticks ajoutés devient "actuel" s'il n'y avait pas de ticks pour le jour actuel avant cela.

Attendez la prochaine version. Ensuite, nous continuerons les expériences et les discussions

Merci, Slava. Je vais l'attendre.

Raison: