カスタムシンボル。エラー、バグ、質問、提案。 - ページ 22

 
Artyom Trishkin :
税関の記号について書くより、英語で書いた方が良いですね :)
これは......カスタムキャラクターということでしょうか?それにダニが加わらない?

TAKE TICKSは追加されません。その理由がわからない。時間を確認しています。その通りでした。

 
jaffer wilson:

はい、TAX TICKETSは追加されていません。その理由がわからない。時間を確認しています。それは正しいことだったのです。

このあたりは@fxsaberが詳しいですね。私はここでは何の役にも立ちません。
スラバは何でも知っていますが、忙しい人なので、いつも催促する時間があるわけではありません。
 
Artyom Trishkin:
これらの疑問は@fxsaberがよく分かっている。私はここであなたの助けにはなりません。
スラバは何でも知っていますが、忙しい人なので、いつもアドバイスする時間があるわけではありません。

一番最初の質問は、端末のGetLastErrorと ログについてと、エキスパート

 
Slava:

一番最初の質問は、GetLastErrorとターミナルログとエキスパートについてです。

これがずっと出るんです。

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 

ご確認ください。

 
jaffer wilson:

これがずっと出るんです。

ご確認ください。

5032エラーはどこから発生したのですか?

ティック削除後のカスタム履歴の削除はどこにあるのでしょうか?

ダニを入れるチェックはどこにあるのか?OnInitにティックを追加した後、何本のヒストリーバーが形成されましたか?

OnInitでCustomTicksReplaceではなくCustomTicksAddを使用して いるのはなぜですか?


PS.MarketWatchではティックを正しく受信しているが、ヒストリーチャートには適用されていない。把握すること。

 
Slava:

PS.MarketWatchではティックが正しく表示されていますが、ヒストリカルチャートには適用されません。把握すること。

だから、このブランチにはナンバリングされたバグがちゃんとあるんです。

 

Slava:

PS.MarketWatchではティックが正しく表示されていますが、ヒストリカルチャートには適用されません。把握すること。

現在とは異なるため、適用外。実は6ヶ月前

 
Slava :

現在とは異なるため、適用外。まったく半年も前の話。

チェックを加えたプログラムを試しました。まだ同じ問題があります。

#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

どうしたらいいか教えてください。

 

現時点では、今日ではない日(昨日、一昨日、昨年など)のティックを使ってカスタムツールバーを形成することはできません。

でも。訂正をいたしました。

CustomTicksReplaceを使用 する場合(CustomTicksAddではありません!CustomTicksAddでティックを一括追加しないでください)、それ以前に今日のティックがない場合、追加したティックの最終日が「現在」になります。

次のビルドを待ってください。その後、実験とディスカッションを続ける

 
Slava :

現時点では、今日ではない日(昨日、一昨日、昨年など)のティックを使ってカスタムツールバーを形成することはできません。

でも。訂正をいたしました。

CustomTicksReplaceを使用する場合(CustomTicksAddではありません!CustomTicksAddで一括してティックを追加しないでください)、それ以前に現在の日のティックがなかった場合、追加したティックの最終日が「現在」となります。

次のビルドを待ってください。その後、実験とディスカッションを続ける

スラバさん、ありがとうございます。待ちます。