@Daniel Cioca#: But how to calculate TP average price for a bunch of orders. But not for a break even , but to place TP for all orders in the same place in such way to have a desired profit.
Daniel Cioca #: Thanks ! But this formula is to close all on break even … I want to calculate the price for a desired profit
There is no mention in my post about "break-even". It is about calculating the net mean value of prices and gains for a basket of positions.
I state clearly in the closing price equation that it can be used for the stop-loss and the take-profit, and I provided the equation for calculating the desired profit or reward.
Daniel Cioca #: But how to calculate TP average price for a bunch of orders. But not for a break even , but to place TP for all orders in the same place in such way to have a desired profit.
In the presence of buys and sells, there may not be a price meeting a desired profit.
Desired profit = ∑ Pn =∑ (TP - On ) * Vn You will need to do a binary search to find TP.
Thank you all for the solutions you provided … still … what I need is a price … where I should put all TP for all the opened trades in one direction , so I can have a profit of X USD
@Daniel Cioca#: Thank you all for the solutions you provided … still … what I need is a price … where I should put all TP for all the opened trades in one direction , so I can have a profit of X USD
I already gave you the answer, so I can only conclude that the reason you are still asking is that you did not understand the maths or equations provided.
If you know how much you want to profit, then you know the value of PLn(in point-lot units for example).
Also, if you know your current total volume Vn of your entire basket, then you can calculate the price difference ( Cn - On ) using the last equation.
Once you know the price different, simply calculate the net mean open price On and then solve for Cn
Already answered in my post #2 ...
Already answered in my post #2 ...
There is no mention in my post about "break-even". It is about calculating the net mean value of prices and gains for a basket of positions.
I state clearly in the closing price equation that it can be used for the stop-loss and the take-profit, and I provided the equation for calculating the desired profit or reward.
In the presence of buys and sells, there may not be a price meeting a desired profit.
Desired profit = ∑ Pn =∑ (TP - On ) * Vn You will need to do a binary search to find TP.
I already gave you the answer, so I can only conclude that the reason you are still asking is that you did not understand the maths or equations provided.