거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
조회수:
4901
평가:
(28)
게시됨:
2012.11.14 15:57
업데이트됨:
2016.11.22 07:32
\MQL5\Include\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

The GetExtremums() function is designed to identify extremums over a given period of history. The search algorithm is similar to that used in the FastZZ indicator and uses only one parameter - the minimum price change - to identify an extremum.

int GetExtremums(double range,      //minimum price change
                 MqlRates &rates[], //array of history quotes
                 dextremum &ge[],  //returned array of extremums
                 int total=0)      //required number of extremums or zero for all extremums        
Parameters:
  •     double range - minimum price change required to identify an extremum;
  •     MqlRates &rates[] - array of quotes;
  •     dextremum &ge[] - array that stores identified extremums in consecutive order, the extremum closest in time being stored in the first element (0 index).
  •     int total - limit for the total number of extremums to be found. All extremums are searched for by default (total==0).
Returned value:
  •     Number of elements in the array of extremums.

The following structure is used for the description of extremums.

struct dextremum         //description of extremum
{
   int        type;      //1 - peak, -1 - trough
   datetime   time;
   double      value;
};


An example of using GetExtremums().

#include <GetExtremums.mqh>
//----
void OnStart()
{
   MqlRates rt[];
   dextremum zz[];
   CopyRates(_Symbol,_Period,TimeCurrent(),100,rt);
   //the first variant - to get 10 extremums
   int cnt=GetExtremums(100*_Point,rt,zz,10);
   for(int i=0; i<cnt; i++)
        Print(i,") ",zz[i].time," >> ",zz[i].type==1?"Peak":"Trough","=",zz[i].value);
   //the second variant - to get all extremums 
   cnt=GetExtremums(100*_Point,rt,zz);
   Print("Found ",cnt," extremums");
}
//----

MetaQuotes Ltd에서 러시아어로 번역함.
원본 코드: https://www.mql5.com/ru/code/1052

gpfTCPivotStop gpfTCPivotStop

The Expert Advisor based on daily Pivot support.

gpfTCPivotLimit gpfTCPivotLimit

The trading system operating based on the bounce off the support/resistance levels of the Pivot indicator

SinTick SinTick

The sine and tick indicator

3rd Generation XMA 3rd Generation XMA

3rd Generation XMA is the 3rd generation moving average. This is an advanced version of the standard moving average indicator (МА) that follows a fairly simple procedure to reduce the time lag based on the increase in the moving average period.