Urgent and very necessary : Close partial Position not working



We need to close part of the position with the block "Close position". (please see image 0 attached).


As is indicated on the  image 0 attached, we can see "Close specified position or its parts"



In the snippets, we can read  "Order size" parameter  (in yellow)



public class ClosePosition extends ActionBlock {
   
    @Parameter(defaultValue="Current", category="Order identification", showIfDefault=false, allowAny=true)
    public String Symbol;
   
    @Parameter(defaultValue="0", category="Order identification")
    @Editor(type=Editors.Selection, values="Long=1,Short=-1,Any=0")
    public int Direction;

    @Parameter(defaultValue="MagicNumber", category="Order identification", showIfDefault=false)
    @Help("Magic number that can identify the order.")
    @Editor(type=Editors.SelectionVariablesWithAny)
    public int MagicNumber;

    @Parameter(defaultValue="", category="Order identification", showIfDefault=false)
    @Help("Comment can be also used to identify the order. In case of Comment, order matches if the order comments contains the text specified here.")
    public String Comment;

    @Parameter(category="Order size")
    @Editor(type=Editors.Formula, formulaName="CloseSize")
    @Required
    public IFormula Size;







But when we want to use it , to enter the position size to close we see : "Full position" only   
(please see image 1 attached)








We can not enter the position size to close.


Please fix this bug, we really need to close part of a position.


This basic function is really necessary

In the API, (https://strategyquant.com/sqxapi/com/strategyquant/tradinglib/ILiveOrder.html#setSize(double) )
We have the function   order.setSize(new size).Send() available


Thank you for your excellent work







Attachments
image-0.png
(16.97 KiB)
image-1.png
(14.96 KiB)
  • Votes +1
  • Project AlgoWizard
  • Type Feature
  • Status New
  • Priority Normal

History

E
#1

Emmanuel

28.09.2023 21:37

Task created

E
#2

Emmanuel

28.09.2023 21:37
Voted for this task.
E
#3

Emmanuel

28.09.2023 21:38

Subject changed from Urgent and very necessary : Close partial Position position not working to Urgent and very necessary : Close partial Position not working

Description changed:



We need to close part of the position with the block "Close position". (please see image 0 attached).


As is indicated on the  image 0 attached, we can see "Close specified position or its parts"



In the snippets, we can read  "Order size" parameter  (in yellow)



public class ClosePosition extends ActionBlock {
   
    @Parameter(defaultValue="Current", category="Order identification", showIfDefault=false, allowAny=true)
    public String Symbol;
   
    @Parameter(defaultValue="0", category="Order identification")
    @Editor(type=Editors.Selection, values="Long=1,Short=-1,Any=0")
    public int Direction;

    @Parameter(defaultValue="MagicNumber", category="Order identification", showIfDefault=false)
    @Help("Magic number that can identify the order.")
    @Editor(type=Editors.SelectionVariablesWithAny)
    public int MagicNumber;

    @Parameter(defaultValue="", category="Order identification", showIfDefault=false)
    @Help("Comment can be also used to identify the order. In case of Comment, order matches if the order comments contains the text specified here.")
    public String Comment;

    @Parameter(category="Order size")
    @Editor(type=Editors.Formula, formulaName="CloseSize")
    @Required
    public IFormula Size;







But when we want to use it , to enter the position size to close we see : "Full position" only   
(please see image 1 attached)








We can not enter the position size to close.


Please fix this bug, we really need to close part of a position.


This basic function is really necessary


Thank you for your excellent work







E
#4

Emmanuel

29.09.2023 13:38

Description changed:



We need to close part of the position with the block "Close position". (please see image 0 attached).


As is indicated on the  image 0 attached, we can see "Close specified position or its parts"



In the snippets, we can read  "Order size" parameter  (in yellow)



public class ClosePosition extends ActionBlock {
   
    @Parameter(defaultValue="Current", category="Order identification", showIfDefault=false, allowAny=true)
    public String Symbol;
   
    @Parameter(defaultValue="0", category="Order identification")
    @Editor(type=Editors.Selection, values="Long=1,Short=-1,Any=0")
    public int Direction;

    @Parameter(defaultValue="MagicNumber", category="Order identification", showIfDefault=false)
    @Help("Magic number that can identify the order.")
    @Editor(type=Editors.SelectionVariablesWithAny)
    public int MagicNumber;

    @Parameter(defaultValue="", category="Order identification", showIfDefault=false)
    @Help("Comment can be also used to identify the order. In case of Comment, order matches if the order comments contains the text specified here.")
    public String Comment;

    @Parameter(category="Order size")
    @Editor(type=Editors.Formula, formulaName="CloseSize")
    @Required
    public IFormula Size;







But when we want to use it , to enter the position size to close we see : "Full position" only   
(please see image 1 attached)








We can not enter the position size to close.


Please fix this bug, we really need to close part of a position.


This basic function is really necessary

In the API, (https://strategyquant.com/sqxapi/com/strategyquant/tradinglib/ILiveOrder.html#setSize(double) )

We have the function   order.setSize(new size).Send() available



Thank you for your excellent work







MF
#5

Mark Fric

04.10.2023 12:34

Type changed from Bug to Feature

I'm reclassifying this as a feature. I'm not sure we'll make it into Build 138, it will be mainly bugfix build.
E
#6

Emmanuel

04.10.2023 15:56
Thank you Mark :)  

Votes: +1

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please