Break-even interest - page 7

 

Vladimir Pastushak, the calculation of step 4 according to your methodology can be simplified

(1,50000*0,01+1,54720*0,01+1,57640*0,01-(1,57640*(0,01+0,01+0,01))/(1,57640-1.60000)+0,01

So there are 3 methods of calculation.

 
-Aleks-:

Vladimir Pastushak, the calculation of step 4 according to your methodology can be simplified

(1,50000*0,01+1,54720*0,01+1,57640*0,01-(1,57640*(0,01+0,01+0,01))/(1,57640-1.60000)+0,01

So, we get 3 methods of calculation.

(op1*lt1+op2*lt2+op3*lt3-(aw*lt1+aw*lt2+aw*lt3))/(aw-op4)

Checked in principle yes and my way is easier to program...

 
-Aleks-:
try to count profits in money, not in points
 
pako:
Try counting profit in money rather than in pips
It doesn't matter what you count profit in, even in dollars, even in roubles, even in pips, profit is profit ....
 
pako:
Try counting profits in money instead of points
Show us an example of your method, maybe it really is more convenient.
 
Vladimir Pastushak:
It doesn't matter what you count profit in, whether in dollars, roubles or pips, profit is profit ....
The tseplate is counted in the autumn, and to make it quicker, it is counted in eight
 
-Aleks-:
Show me an example of your method, maybe it's really more convenient.

the profit you want to make is known, the number of points is known

find the lot

the script will look for the one with "0" in it.

there's a bit of a margin of error, rounding.

Files:
 
pako:

the profit you want to make is known, the number of points is known

find the lot

the script will look for the one with "0" in it.

there's a little bit of a margin of error, rounding

Show me the code, the method of implementation ... Such scripts are a dime a dozen...

 
pako:

the profit you want to make is known, the number of points is known

find the lot

the script will look for the one with "0" in it.

there's a little bit of a margin of error, rounding

This is all good, but we are discussing algorithm and calculation method, so I agree withVladimir Pastushak- show the code and write the logic in words - to evaluate the convenience and speed of finding a solution.
 
Another challenge appeared here https://www.mql5.com/ru/forum/67560
Частичное закрытие позиции с плановым безубытком
Частичное закрытие позиции с плановым безубытком
  • www.mql5.com
Частичное закрытие позиции с плановым безубытком. - - Категория: автоматические торговые системы