Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Script | bts

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.

MetaTrader Experts, Indicators, Scripts and Libraries

1468

Best MetaTrader Indicators + Profitable Expert Advisors