CFastFile – class for working with uchar array as a virtual file – library MetaTrader 5

CFastFile - class for working with uchar array as a virtual file - library for MetaTrader 5
The CFastFile eliminates the need for an intermediate writing of data to the physical file on disk. It provides the significant acceleration when working with data. It has functions, similar to standard FileWriteXXX/FileReadXXX functions. It means that you can easily migrate from the use of the physical files to the fast work with the “virtual”

heap sort – array sorting algorithm – library MetaTrader 5

heap sort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                     HeapSort.mq5 | //|                                  2019 – 2021, dimitri pecheritsa | //|                             https://www.mql5.com/en/users/dmipec | //+——————————————————————+ //+——————————————————————+ //| heap sort – array sorting algorithm                              | //|  best – n log n, average – n log n, worst – n log n              | //|  memory – 1, stable – no, method – selection                     | //|  heapsort is a much more efficient version of

shell sort – array sorting algorithm – library MetaTrader 5

shell sort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                    ShellSort.mq5 | //|                                    2019-2021, dimitri pecheritsa | //|                                         mql5.com/en/users/dmipec | //+——————————————————————+ //+——————————————————————+ //| shell sort – array sorting algorithm                             | //|  cases: best: n log n, average: n^(4/3), worst: n^(3/2)          | //|  memory: 1, stable: no, method: insertion                        | //|  note: small code size                                           | //+——————————————————————+ //+——————————————————————+ //|  shellsort, also known as shell sort or shell’s method, is an    | //|in-place comparison

selection sort – array sorting algorithm – library MetaTrader 5

selection sort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                SelectionSort.mq5 | //|                                    2019-2021, dimitri pecheritsa | //|                                         mql5.com/en/users/dmipec | //+——————————————————————+ //| selection sort – array sorting algorithm                         | //+——————————————————————+ //|  best: n^2, average: n^2, worst: n^2                             | //|  memory: 1, stable: no, method: selection                        | //|  note: stable with o(n) extra space or when using linked lists.  | //+——————————————————————+ //|  in computer science, selection sort is an in-place comparison   |

insertion sort – array sorting algorithm – library MetaTrader 5

insertion sort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                InsertionSort.mq5 | //|                                    2019-2021, dimitri pecheritsa | //|                                         mql5.com/en/users/dmipec | //|——————————————————————| //| cls | insertion sort                                             | //|——————————————————————| //| use | array sorting algorithm                                    | //|  best: n; average: n^2; worst: n^2                               | //|  memory: 1; stable: yes; method: insertion                       | //|  note: o(n + d), in the worst case over sequences that have d    | //|inversions.                                                       | //|——————————————————————| //|  insertion

gnome sort – array sorting algorithm – library MetaTrader 5

gnome sort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                    GnomeSort.mq5 | //|                                    2019-2021, dimitri pecheritsa | //|                                         mql5.com/en/users/dmipec | //|——————————————————————| //|  c  | gnome sort                                                 | //|——————————————————————| //| use | array sorting algorithm                                    | //|  best: n; average: n^2; worst: n^2                               | //|  memory: 1; stable: yes; method: exchanging                      | //|  note: tiny code size                                            | //|  originally proposed by iranian computer scientist hamid         | //|sarbazi-azad (professor of computer science and engineering at    |

introsort – array sorting algorithm – library MetaTrader 5

introsort - array sorting algorithm - library for MetaTrader 5
//+——————————————————————+ //|                                                    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