Position closure of balanced deals
Position closure of balanced deals
01 Dec 2014, 09:54
Position closure of balanced deals.
Problem description:
- 2X open positions X Long + X Short
- Margin level ~40%
- During high volatility one most unprofitable position closed by server
- Let say one Long position
- New account state is: X-1 Long + X Short positions
- Prices moves Up – against me
- Server closes another Long position
- New account state is: X-2 Long + X Short positions
- And finally all position closed during very small price change.
Thus I think what this wrong algorithm to close positions.
Correct behavior of server should be at step 5) Close most unprofitable Short position.
This will move Margin level to new balanced state >> 40% and prevent waterfall of position closure.
Maxim
Replies
maxim_7
02 Dec 2014, 18:12
RE:
Spotware said:
The most losing position will be closed in that case.
Exactly, this is the problem. From my point of view, this behavior is wrong. and MUST be changed, to close opposite positoin to preserve account in balanced state (X Volumes Long and X Volumes Short), instead of closure one by one all positions of one direction.
@maxim_7
AlexanderRC
03 Dec 2014, 04:35
RE: RE:
maxim_7 said:
Spotware said:
The most losing position will be closed in that case.
Exactly, this is the problem. From my point of view, this behavior is wrong. and MUST be changed, to close opposite positoin to preserve account in balanced state (X Volumes Long and X Volumes Short), instead of closure one by one all positions of one direction.
As a workaround, a cBot can balance the Long/Short position count by immediately closing a position of the opposite direction. It should be pretty trivial to write one.
@AlexanderRC
maxim_7
04 Dec 2014, 09:11
RE: RE: RE:
AlexanderRC said:
As a workaround, a cBot can balance the Long/Short position count by immediately closing a position of the opposite direction. It should be pretty trivial to write one.
Except one thing: Server side will serve all cases cBot only specific client.
@maxim_7
AlexanderRC
02 Dec 2014, 12:56
In the latest release notes cServer behavior was changed to close the "position with the biggest Margin will be closed on Stop Out event instead of most losing position". Assuming that all of the positions in this example have the same volume, cServer should use some other sortable metric to determine which position to close.
Spotware, can you provide an insight, what metrics are used to choose the position if volumes (and the locked margin) are the same?
@AlexanderRC