Brain-training tasks related to trading in one way or another. Theorist, game theory, etc. - page 22
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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 ;))