거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

introsort - array sorting algorithm - MetaTrader 5용 라이브러리

조회수:
2775
평가:
(14)
게시됨:
2021.02.10 06:33
Introsort.mq5 (0.96 KB) 조회
\MQL5\Include\Mqh\Algorithms\SortIntro\
Introsort.mqh (26.5 KB) 조회
Functions.mqh (1.94 KB) 조회
\MQL5\Include\Mqh\Algorithms\
ASorter.mqh (2.18 KB) 조회
\MQL5\Include\Mqh\Universal\
이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동
//+------------------------------------------------------------------+
//|                                                    Introsort.mq5 |
//|                                    2019-2021, dimitri pecheritsa |
//|                                         mql5.com/en/users/dmipec |
//|------------------------------------------------------------------|
//|   c| array sorting algorithm                                     |
//|  introsort or introspective sort is a hybrid sorting algorithm   |
//|that provides both fast average performance and (asymptotically)  |
//|optimal worst-case performance. it begins with quicksort, it      |
//|switches to heapsort when the recursion depth exceeds a level     |
//|based on (the logarithm of) the number of elements being sorted   |
//|and it switches to insertion sort when the number of elements is  |
//|below some threshold. this combines the good parts of the three   |
//|algorithms, with practical performance comparable to quicksort on |
//|typical data sets and worst-case o(n log n) runtime due to the    |
//|heap sort. since the three algorithms it uses are comparison      |
//|sorts, it is also a comparison sort.                              |
//|  introsort was invented by david musser in 1997, in which he also|
//|introduced introselect, a hybrid selection algorithm based on     |
//|quickselect (a variant of quicksort), which falls back to median  |
//|of medians and thus provides worst-case linear complexity, which  |
//|is optimal. both algorithms were introduced with the purpose of   |
//|providing generic algorithms for the c++ standard library which   |
//|had both fast average performance and optimal worst-case          |
//|performance, thus allowing the performance requirements to be     |
//|tightened. introsort is in place and not stable                   |
//|  the most popular c++ stl algorithm sort() uses introsort.       |
//|------------------------------------------------------------------|
//| scr| introsort example                                           |
//+------------------------------------------------------------------+
#include <Mqh\Algorithms\SortIntro\Introsort.mqh>
#include <Mqh\Algorithms\SortIntro\Functions.mqh>
void OnStart()
  {
   int a[] = {3, 1, 23, -9, 233, 23, -313, 32, -9};
   ArraySort(a,new CIntroSort<int,int>,SORT_ORDER_ACCENDING);
   ArrayPrint(a);
  }
//+------------------------------------------------------------------+
//| >>>| -313   -9   -9    1    3   23   23   32  233                |
//+------------------------------------------------------------------+


gnome sort - array sorting algorithm gnome sort - array sorting algorithm

gnome sort is based on the technique used by the dutch garden gnome

INDICATOR Breakout Strength Meter - MT5 INDICATOR Breakout Strength Meter - MT5

The breakout strength meter is a trading tool that is used to identify which currencies are the strongest to breakout, and which currencies are the weakest to breakout

Currency Strenght Meter - MT5 Currency Strenght Meter - MT5

The currency strength meter is a trading tool that is used to identify trending and consolidating markets based on the percentage rate of change in price from one period to the next.

The Cyber Cycle The Cyber Cycle

The Cyber Cycle: John Ehlers, "Cybernetic Analysis For Stocks And Futures", pg.34