Download MetaTrader 5

How to calculate integrals in MQL4?

To add comments, please log in or register
Download MetaTrader 5 and start trading today!
Proximus
760
Proximus 2013.11.19 19:17 

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?

whroeder1
14543
whroeder1 2013.11.19 22:22  
  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.
Proximus
760
Proximus 2013.11.20 03:31  
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.
Ian Flanagan
549
Ian Flanagan 2013.11.20 03:43  

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?

Alain Verleyen
Moderator
30754
Alain Verleyen 2013.11.20 12:12  
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
Yochanan Gerbi
608
Yochanan Gerbi 2013.11.20 12:16  

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

Proximus
760
Proximus 2013.11.20 21:11  
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.
To add comments, please log in or register