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.

Jake

One hotkey to exit position regardless of type/direction

Recommended Posts

Jake

Is it possible to make one hotkey that sells when you are long and covers when you are short?

I keep on getting my exit keys confused and adding into the trade when I should be decreasing my shares. 

Two examples of my exit hotkeys are below.  Is it possible to dynamically change the Send syntax to SELL or BUY depending on the position you are holding and making two keys into just one?

Sell Full Position

ROUTE=LIMIT;Share=Pos;Price=Bid-.10;TIF=DAY+;SELL=Send;CXL ALLSYMB

Cover Full Position

ROUTE=LIMIT;Share=Pos;Price=Ask+0.10;TIF=DAY+;BUY=Send;CXL ALLSYMB

Share this post


Link to post
Share on other sites
Jake

Thanks, that's a good idea in an emergency but I take partials also.  I posted my full exit hotkey for simplicity sake.  

Share this post


Link to post
Share on other sites
KyleK29

You wouldn't be able to do it as bid-.10 or ask+.10. But you can do something like this.

 

ROUTE=LIMIT;Share=Pos;Price=Ask+Bid;Price=Price/2;TIF=DAY+;Send=Reverse;CXL ALLSYMB

 

^^ That will sell/cover all your shares at the midpoint between the ask and bid. It will also clear any Open Orders for the symbol.

Edited by KyleK29

---------------------------------------------------------
Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here)

Share this post


Link to post
Share on other sites
Jake

Is there a chance that the order would not get filled?  

Share this post


Link to post
Share on other sites
Brian

If your willing to take partials using market orders you can, just change LIMIT to MARKET and leave out the 'Price' bit, as here you don't need to specify the bid or ask, the script below for instance will partial 25% of your position whether you are long or short.   

CXL ALLSYMB;ROUTE=MARKET;Share=Pos*.25;TIF=DAY+;Send=Reverse;

I'm very new to BBT and trading in general, so maybe I'm missing something, but it seems to work fine for me.

On a different note, thanks Kyle for your dollar risk hotkeys they've helped me alot.

Edited by Brian
typo
  • Like 1

Share this post


Link to post
Share on other sites
Jake

That's helpful.  Thank you.  

I'm almost getting used to my hotkeys now but I'm still making mistakes so I will try this approach.

Share this post


Link to post
Share on other sites
dwarsco

i think this would do it 

CXL ALLSYMB;ROUTE=MARKET;Share=Pos;TIF=DAY+;Send=Reverse

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.