초보자의 질문 MQL5 MT5 MetaTrader 5 - 페이지 777

 
Aleksey Vyazmikin :

OpenCL용 커널 을 작성할 수 있습니까? EA가 실행되는 동안 즉석 최적화를 위해 OpenCL을 사용한다고 주장하는 사람은 단 한 명뿐입니다. 다른 예는 모르겠습니다.

나는 나 자신을보고 싶습니다. 이 주제에 대한 기사를 요청하기도 했지만 행정부에서는 이를 실제 거래에 적용하는 방법을 모릅니다.

놀랍습니다. opencl 지원은 이미 5년이 지났지만 거래 및 기사에 대한 구체적인 작업 예제가 없습니다. 글쎄, 개발자 자신이 적용하는 방법을 모르기 때문에 클라우드 최적화에 집중할 것입니다.
[삭제]  
ax237b :
굉장합니다. opencl 지원은 이미 5년이 지났지만 거래 및 기사에 대한 구체적인 작동 예는 없습니다. 글쎄, 개발자 자신이 적용하는 방법을 모르기 때문에 클라우드 최적화에 집중할 것입니다.
놀라운 점은 무엇입니까? 단말은 충분한 속도로 작동하며 브로커의 응답이 지연됩니다. 따라서 opencl은 현재 쉬고 있습니다. 다음에 일어날 일 - 보자
 

도와주세요!

표시기를 다시 만들고 있습니다. 그리기 코드는 다음과 같습니다.

 #property indicator_separate_window
#property indicator_buffers 3
#property indicator_plots    3
//--- plot Label1
#property indicator_label1   "High" ;
#property indicator_type1   DRAW_LINE ;
#property indicator_color1   clrRed ;
#property indicator_style1   STYLE_DOT ;
#property indicator_width1   1 ;
//--- plot Label2
#property indicator_label2   "Low" ;
#property indicator_type2   DRAW_LINE ;
#property indicator_color2   clrRed ;
#property indicator_style2   STYLE_DOT ;
#property indicator_width2   1 ;
//--- plot Label3
#property indicator_label3   "Close" ;
#property indicator_type3   DRAW_LINE ;
#property indicator_color3   clrAquamarine ;
#property indicator_style3   STYLE_SOLID ;
#property indicator_width3   1 ;


//--- input parameters
input int InpChannelPeriod= 48 ; // Period
//--- indicator buffers
double ExtHighBuffer[];
double ExtLowBuffer[];
double ExtCloseBuffer[];
//---
int i,limit,start;
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit ()
  {
//--- indicator buffers mapping
   SetIndexBuffer ( 0 ,ExtHighBuffer, INDICATOR_DATA );
   SetIndexBuffer ( 1 ,ExtLowBuffer, INDICATOR_DATA );
   SetIndexBuffer ( 2 ,ExtCloseBuffer, INDICATOR_DATA );   
//--- set accuracy
   IndicatorSetInteger ( INDICATOR_DIGITS , _Digits );
//--- set first bar from what index will be drawn
   PlotIndexSetInteger ( 0 , PLOT_DRAW_BEGIN ,InpChannelPeriod);
   PlotIndexSetInteger ( 1 , PLOT_DRAW_BEGIN ,InpChannelPeriod);
   PlotIndexSetInteger ( 2 , PLOT_DRAW_BEGIN ,InpChannelPeriod);   
//---
   return ( 0 );
  }

//+------------------------------------------------------------------+ //| 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[]) { //--- check for rates if(rates_total<InpChannelPeriod) return(0); //--- preliminary calculations if(prev_calculated==0) limit=InpChannelPeriod; else limit=prev_calculated; //--- the main loop of calculations for(i=limit;i<rates_total && !IsStopped();i++) { ExtHighBuffer[i]=100.0; ExtLowBuffer[i]=0.0; ExtCloseBuffer[i]=50.0; } //--- return value of prev_calculated for next call return(rates_total); } //+------------------------------------------------------------------+

스타일 #속성 표시기 _ 스타일 2 STYLE_DOT ; - 차트에 전혀 그리지 않음

스타일 #속성 표시기 _ 스타일 2 STYLE_SOLID ; - STYLE_DOT 비석 의 차트에 그립니다.

이것은 무엇입니까, 아니면 내 손이 비뚤어진 것입니까?

 

지표에 있는 그래픽 배열에서 이동 평균 을 계산하는 가장 좋은 방법은 무엇입니까?

개발자가 권장하는 기성 기능이나 라이브러리가 있습니까?

 
Aleksey Vyazmikin :

지표에 있는 그래픽 배열에서 이동 평균 을 계산하는 가장 좋은 방법은 무엇입니까?

개발자가 권장하는 기성 기능이나 라이브러리가 있습니까?


또는 간단한 옵션조차도 - iMA에서 지하실에 MA를 그립니다 - 말도 안되는 소리를 얻습니다.

함수를 통한 호출

 double MA_TF( int index)
  {
   double MA[ 1 ];
   ResetLastError ();
   if ( CopyBuffer (handle_MA_TF, 0 ,index, 1 ,MA)< 0 )
     {
       PrintFormat ( "Failed to copy data from the handle_MA_TF indicator, error code %d" , GetLastError ());
       return ( 0.0 );
     }
   return NormalizeDouble (MA[ 0 ], Digits ());
  }

그러나 그것은 어떻게 든 옳지 않은 것으로 판명되었습니다 - 뒤집어서 chtol ...

 

Masha를 사용하여 MA_TF(rates_total-i) 내부에서 전화를 걸었습니다. 도움이 된 것 같습니다. 하지만 이력을 보면 때때로 내장 표시기와 불일치가 있습니다(정규화가 제거된 경우에도). 이것이 가능할까요? ?

그리고 표시기에 십진수 값을 표시하는 방법은 무엇입니까?

 
Aleksey Vyazmikin :

지표에 있는 그래픽 배열에서 이동 평균 을 계산하는 가장 좋은 방법은 무엇입니까?

개발자가 권장하는 기성 기능이나 라이브러리가 있습니까?

따라서 Include 폴더에는 모든 항목이 포함된 MovingAverages.mqh가 포함되어 있습니다.
 
Alexey Viktorov :
따라서 Include 폴더에는 모든 항목이 포함된 MovingAverages.mqh가 포함되어 있습니다.

감사합니다 몰랐는데 어디서 작업하는지 예시좀 알수있을까요?

 
Aleksey Vyazmikin :

감사합니다 잘 몰랐는데 어디서 작업을 볼 수 있는지 예시를 볼 수 있을까요?

Alexey, 검색이 더 이상 작동하지 않습니까?

오른쪽 상단에 파일 검색이 있습니다. 검색 영역은 톱니바퀴를 눌러 구성됩니다.


그리고 여기 결과가 있습니다


 
Alexey Viktorov :

Alexey, 검색이 더 이상 작동하지 않습니까?

오른쪽 상단에 파일 검색이 있습니다. 검색 영역은 톱니바퀴를 눌러 구성됩니다.


그리고 여기 결과가 있습니다



실제로, 자신을 찾는 것이 어떻습니까? 감사합니다!