Very decent. I.e. we say that every subsequent step-opening of the lot in pips is getting closer and closer to a trend reversal, so we will not increase the order size, but we will open it just in case something goes wrong)))
new-rena: That's pretty decent. I.e., we say that every subsequent lot opening step in pips is getting closer and closer to a trend reversal, so we won't increase the order size, but we will open it just in case something goes wrong)))
i don't know about that.... I was just solving a problem... it wasn't about reversals, trends or anything else.
new-rena: Now I want to write its solution in the form of a formula. I'm already working out the formula.
You can't derive a formula, you'll get a cancerous brain. But it is possible to write a function that solves it approximately. But that's if you have to solve it with respect to x, of course.
Mathemat: You can't derive a formula, you'll get cancer in your brain. But you can write a function that solves it approximately. But that's if you have to solve it with respect to x, of course.
P.S. My brain refuses to solve such a strange, alien problem. The monotonicity of the first derivative is not respected. And this prevents me from easily and simply solving the equation on x by secants/Newton's method. Although a dumb search (strongly optimized) solves it rather quickly.
But if it were not doubling, but simple multiplication, everything would be easier and clearer.
Here's the dumbest algorithm. It's quick, though. It needs about 50 iterations to get an accuracy of 10^(-8).
Here is avtomat's picture from the previous page, for starters.
P.S. It's good to keep in mind that this algorithm works only for this function. It is monotone and therefore has a single root. Unfortunately, the non-monotonicity of the first derivative makes it impossible to apply the tangent method. True, the loss is not felt at all - the computation time taken using GetTickCount() is not even counted.
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
It's fine. I've already posted the code. I'm just going to shake it up to the right answer and that's it.
Will you share the result...? :-)
I wonder - what does it look like - a non-sinusoidal geometric progression?
Renat, so what do you need - to solve an equation or something else?
If the equation
MiniLot^(x^0)+MiniLot^(x^1)+MiniLot^(x^2) ... + MiniLot^(x^(N-1))=VolMax
is to be solved with respect to x, then it's easier than ever - by Newton's method or secants. But you need to specify MiniLot, VolMax and N.
That's pretty decent. I.e., we say that every subsequent lot opening step in pips is getting closer and closer to a trend reversal, so we won't increase the order size, but we will open it just in case something goes wrong)))
i don't know about that.... I was just solving a problem... it wasn't about reversals, trends or anything else.
And I've got my own ideas about that, too.
Renat, so what do you need - to solve the equation or something else?
Now I want to write its solution in the form of a formula. I'm already deriving the formula.
Thank you very much.
You can't derive a formula, you'll get cancer in your brain. But you can write a function that solves it approximately. But that's if you have to solve it with respect to x, of course.
Show me.
P.S. My brain refuses to solve such a strange, alien problem. The monotonicity of the first derivative is not respected. And this prevents me from easily and simply solving the equation on x by secants/Newton's method. Although a dumb search (strongly optimized) solves it rather quickly.
But if it were not doubling, but simple multiplication, everything would be easier and clearer.
Here's the dumbest algorithm. It's quick, though. It needs about 50 iterations to get an accuracy of 10^(-8).
Here is avtomat's picture from the previous page, for starters.
And now mine (same parameters):
And code:
P.S. It's good to keep in mind that this algorithm works only for this function. It is monotone and therefore has a single root. Unfortunately, the non-monotonicity of the first derivative makes it impossible to apply the tangent method. True, the loss is not felt at all - the computation time taken using GetTickCount() is not even counted.
there's a bit more to the solution
to complete the picture ;))