How to calculate integrals in MQL4?

 

I`m writing a mathematical -statistical bot that will analyze my market.I need to calculate mathematical integrals somehow in MQL4, is it possible.And by integral's i mean these:

Can anyone help, how can i program this?

 
  1. Since the market is descreet, I don't know how you expect to use integrals
  2. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 
WHRoeder:
  1. Since the market is descreet, I don't know how you expect to use integrals
  2. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.

2)Dude i`m not asking to code it for me, i`m just asking for some questions if there is any prebuilt function that does that, or a library for example.I will code everything my own.As for the discreet market, i`m not calculating the integral of the prices, what did you thought? I put up a few statistical analysis of chart patterns and /or profit distribution and i need integrals to calculate a few statistical formulas on it.
 

As far as I remember, integrals are not all solvable with one method, hence no single MQL function to do it. Depending on what you are integrating, you choose an appropriate method to do it. And with some expressions, its not possible to find the integral algebraically, you have to approximate it.

What kind of formulas are you integrating?

 
Proximus:

I`m writing a mathematical -statistical bot that will analyze my market.I need to calculate mathematical integrals somehow in MQL4, is it possible.And by integral's i mean these:

Can anyone help, how can i program this?

Maybe this article can help you : https://www.mql5.com/en/articles/1567
 

Integral is another name for SIGMA (sum).

if you have a function - f(x), transform it to a formula with the sum(...x), then it is very simple...

Good luck

 
angevoyageur:
Maybe this article can help you : https://www.mql5.com/en/articles/1567

Nah, i need the integral solving the equations when the EA is running.If would be just statical analysis after the data has been processed i`d use excel, but that not the case.


crossy:

Integral is another name for SIGMA (sum).

if you have a function - f(x), transform it to a formula with the sum(...x), then it is very simple...

Good luck

Thanks for that, or if that wont work i`ll fund an aproximation for my function.

alladir:

As far as I remember, integrals are not all solvable with one method, hence no single MQL function to do it. Depending on what you are integrating, you choose an appropriate method to do it. And with some expressions, its not possible to find the integral algebraically, you have to approximate it.

What kind of formulas are you integrating?

It's hard to explain.It's the function for the chart pattern's structure (geometrically, since work on the line chart now).I`m comparing the candle's variation's that make up the pattern, vs the whole database that i have, to find for once what is the statistical distrubution of the pattern, the probabilty of occurences and the probability of reversals after the pattern.
 

Check this out. You will be benefit a lot using external integral calculator tool which I have found - https://integral-calculator.co - hopefully this helps.

Integral Calculator
Integral Calculator
  • integral-calculator.co
Calculate your integral functions here and get the result with the steps involved. Our online calculator will help you get definite and indefinite (antiderivatives) integrals.
 
DLL option to you , develop a 3rd party dll solve maths complex equation in there send back result to mql, if you cant do it post a job on freelance section.
 
Proximus:

I`m writing a mathematical -statistical bot that will analyze my market.I need to calculate mathematical integrals somehow in MQL4, is it possible.And by integral's i mean these:

Can anyone help, how can i program this?


Did you try its approximation by rectangle method