Ákos Maróy 2 Posted June 10, 2020 Hi, Sometimes, when I'm maxing out my buying power, and I try to partial out, it gets rejected due to lack of buying power. As if I'd be trying to add - but actually I'm trying to close the position, partially or in full. For example, to partial 25% of the position, I'm using this script: ROUTE=LIMIT;Price=Ask+0.10;Share=Pos*.25;TIF=DAY+;BUY=Send How can one create a script that would allow partialling out in such cases? Akos Share this post Link to post Share on other sites
mhileman 21 Posted June 10, 2020 Here is what I use: Sell 25% CXL ALLSYMB; ROUTE=SMRTL;Price=Bid-0.10;Share=Pos*.25;TIF=DAY;SELL=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET StopPrice:AvgCost-.10 ACT:SELL QTY:POS TIF:DAY Buy or Cover 25% CXL ALLSYMB;ROUTE=SMRTL;Price=Ask+0.10;Share=Pos*.25;TIF=DAY;BUY=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET StopPrice:AvgCost+.10 ACT:BUY QTY:POS TIF:DAY Share this post Link to post Share on other sites
Justin 262 Posted June 10, 2020 Yeah, it's possible you have a stop order and it needs to be cleared and replaced like mhileman has posted. The CXL ALLSYMB will remove any open orders you have, and then the rest of the script will execute selling/covering 25% and then replace your stop loss. The only thing I notice about your script that strikes me as odd mhileman is that it is placing your stop loss 10 cents above your entry with StopPrice:AvgCost+.10 Maybe that's what you want to do, but I thought it might be a good idea to point out if you just want your stop loss to be placed at break even, just remove the +.10 from the script Share this post Link to post Share on other sites
mhileman 21 Posted June 10, 2020 Yeah I have my script to set a b/e +.10 so that I know it will stop me out with at least some profit after I take at least a 25% profit. That number can be removed or changed to whatever the user wants but I should have stated that when I put the first post. 1 Share this post Link to post Share on other sites