Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

Ákos Maróy

partialling out rejected - not enough buying power?

Recommended Posts

Ákos Maróy

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

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

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

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.

  • Like 1

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.