찻주전자의 질문 - 페이지 260

 
zfs :
제로 바 시간을 얻는 방법?

이걸 더해:

 Print (time[ 0 ]);
 
DC2008 :

이걸 더해:

1970을 제공합니다. 이 디자인도.

 datetime Time[ 1 ];
CopyTime ( _Symbol ,_PERIOD_, 0 , 1 ,Time);
 
zfs :

1970을 제공합니다. 이 디자인도.

이대로 1970을주지 않을 것입니다

 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[])
  {
//---
   ArraySetAsSeries (time, true );
   Print (time[ 0 ]);
//--- return value of prev_calculated for next call
   return (rates_total);
  }
 
DC2008 :

이대로 1970을주지 않을 것입니다

rate_total이 끝에 있습니다.
 
zfs :

이 디자인도.

그것은해야한다

   datetime Time[ 1 ];
   CopyTime ( NULL , 0 , 0 , 1 ,Time);
   Print (Time[ 0 ]);
 
DC2008 :

그것은해야한다

똑같지만 여전히 1970년대입니다. 거짓말이 아니라 2번 추론 중인데 그냥 헷갈리네요.)
 
zfs :
똑같지만 여전히 1970년대입니다. 거짓말이 아니라 2번 추론 중인데 그냥 헷갈리네요.)

모든 코드 복사

 #property indicator_chart_window
int OnInit ()
  {
   return ( INIT_SUCCEEDED );
  }
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[])
  {
   ArraySetAsSeries (time, true );
   Print (time[ 0 ]);
   datetime Time[ 1 ];
   CopyTime ( NULL , 0 , 0 , 1 ,Time);
   Print (Time[ 0 ]);
   return (rates_total);
  }

모든 것이 작동합니다!

 
DC2008 :

모든 코드 복사

모든 것이 작동합니다!

네, 네, 죄송합니다. 감사합니다. 여러 변수의 출력이 있고 한 줄이 비어 있어서 혼란스럽습니다.)
 
profit1=profit1+ "\n" ;
문자열을 새 문자열로 변환하여 0을 제공할 수 있습니까?
 
zfs :
문자열을 새 문자열로 변환하여 0을 제공할 수 있습니까?

교환:

   profit1= "\n" +profit1;