Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2013.01.25 15:25
Scripts

bts - script for MetaTrader 5

| English Русский 中文 Español Deutsch 日本語 Português

Views:
2271
Rating:
votes: 36
bts.mq5 (8.39 KB)view

The script has two functions:

  • bsearch() - a binary search
  • tsearch() - a ternary search

Comparing the speed of two types of search is performed.

Test is performed 30 times on different arrays, the alert displays the result of each test and at the end the total time for each function.

A ternary search is almost one and a half faster than a binary.


Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/1468

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Example of MACD Automated Example of MACD Automated

Code example of MACD automated with advanced money management function.

Pivot Star Pivot Star

Pivot indicator. Standard, Fibonacci, Camarilla, Woody's, Demark. Calculates pivot points from previous bar of chosen period (M5 - MN).