Hello,
I am trying to create a hotkey button which sells/covers x% of my position, cancels my stop loss order, and sends a new stop loss order for break even and updates new position size.
Here is an example of the script that I am using for selling 30% of my position.
CXL ALLSYMB;ROUTE=LIMIT;Price=BID-0.05;Price=Round2;Share=Pos*.3;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=GTC;SELL=SEND;
The issue with this script is when I press the button, it works once. The second time I press it, it doesn't update my position size.
Can anyone correct my script or share a script that does the same function?
Thank you