- NP-completeness (wikipedia link)?
- or about Mathematics in Metatrader 5?

Multiple libraries are provided to perform calculations in various areas of mathematics:

- Statistics — functions for working with various distributions of the Probability theory
- Fuzzy logic — library that implements Mamdani and Sugeno fuzzy inference systems
- ALGLIB — data analysis (clustering, decision trees, linear regression, neural networks), solving differential equations, Fourier transform, numerical integration, optimization problems, statistical analysis, and more.

I've been studying about NP problems and i could say that if you have as little as 25 different candlesticks , and try to use combinatory optimization to find patterns

to beat the market, a really fast computer , that could do 1 billion loops per second, would take about 40 million years to discover the best pattern to beat the market,

so the market is a NP complete problem, just like the travelling salesman problem. So you can just make approximations, and hope it to be good enough, just saying