Jake 0 Posted July 25, 2020 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 0 Posted July 25, 2020 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 257 Posted July 30, 2020 (edited) 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 July 30, 2020 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 0 Posted July 31, 2020 Is there a chance that the order would not get filled? Share this post Link to post Share on other sites
Brian 1 Posted August 5, 2020 (edited) 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 August 6, 2020 by Brian typo 1 Share this post Link to post Share on other sites
Jake 0 Posted August 6, 2020 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 0 Posted May 9, 2021 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