Jump to content
Jake

One hotkey to exit position regardless of type/direction

Recommended Posts

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

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

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

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

Share this post


Link to post
Share on other sites

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

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.