You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My trading target is futures, with a minimum trading size of 1 lot and a minimum unit of 300 per lot. When I trigger a certain signal, I only want to reduce my position instead of closing it completely. However, the parameter in the close function is a proportion value. So, if I hold a position of 7 lots and my size is 2100, the parameter set for self.position.close(portion=6/7), which is not wrong. But the result is that my position is 301, which is incorrect and causes a chain reaction of position errors later on.
The sample shown in the picture is incorrect.
The correct one should look like the following.
So I am wondering if it is possible to adjust the setting of the portion parameter?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
My trading target is futures, with a minimum trading size of 1 lot and a minimum unit of 300 per lot. When I trigger a certain signal, I only want to reduce my position instead of closing it completely. However, the parameter in the close function is a proportion value. So, if I hold a position of 7 lots and my size is 2100, the parameter set for
self.position.close(portion=6/7)
, which is not wrong. But the result is that my position is 301, which is incorrect and causes a chain reaction of position errors later on.The sample shown in the picture is incorrect.
The correct one should look like the following.
So I am wondering if it is possible to adjust the setting of the
portion
parameter?Beta Was this translation helpful? Give feedback.
All reactions