Robert H 452 Posted January 25, 2018 EDIT 16-APR-2018: With the help of Raymond W, we've been able to define a single hotkey for flipping an open position: Simulator: ROUTE=MARKET;Share=Pos*2;TIF=DAY+;SEND=REVERSE Interactive Brokers: ROUTE=SMRTM;Share=Pos*2;TIF=DAY+;SEND=REVERSE Note that this hotkey will send a market order. ===== I'm trying to define a single hotkey to switch an open position. For now, I was able to create two separate hotkeys for switching a long-to-short, and a short-to-long. Flip Long to Short ROUTE=SMRTL;Share=Pos*2;Price=Bid-.05;TIF=DAY+;SELL=Send Flip Short to Long ROUTE=SMRTL;Share=Pos*2;Price=Ask+.05;TIF=DAY+;BUY=Send 1 Share this post Link to post Share on other sites
Jason H. 53 Posted January 26, 2018 This is cool, I'm going to test it for sure! Share this post Link to post Share on other sites
Greg K 5 Posted February 1, 2018 Very cool Robert! I could have used this today in trading BABA. Sorry I don't know the answer to your question. Share this post Link to post Share on other sites
Martin 1 Posted February 28, 2018 Added it to my Hotkeys. Gonna try it today.. Thanks!! Share this post Link to post Share on other sites
Martin 1 Posted March 1, 2018 Hi Robert, I used the hotkey today to flip a position from short to long, but i did not work out well. i was short MU with 183 Shares and after flipping it to long i was in possession of 2 Shares :) Long to short works fine. i think its because of the -2 in the script. instead of ROUTE=SMRTL;Share=Pos*-2;Price=Ask+.05;TIF=DAY+;BUY=Send i was trying ROUTE=SMRTL;Share=Pos*(-2);Price=Ask+.05;TIF=DAY+;BUY=Send but that does not work either. I was playing around but i couldnt figure it out. Any suggestions? Share this post Link to post Share on other sites
Robert H 452 Posted March 1, 2018 Great catch, Martin! I updated the original post with the corrected script: ROUTE=SMRTL;Share=Pos*2;Price=Ask+.05;TIF=DAY+;BUY=Send 1 Share this post Link to post Share on other sites
Robert H 452 Posted April 16, 2018 With the help of Raymond W, we’ve been able to define a single hotkey for flipping an open position: Simulator: ROUTE=MARKET;Share=Pos*2;TIF=DAY+;SEND=REVERSE Interactive Brokers: ROUTE=SMRTM;Share=Pos*2;TIF=DAY+;SEND=REVERSE Note that this hotkey will send a market order. 2 1 Share this post Link to post Share on other sites
FlourishingWeee 42 Posted September 3, 2019 So, to close an open position, long or short, I could just use this one hotkey right? ROUTE=SMRTM;Share=Pos;TIF=GTC;SEND=REVERSE Share this post Link to post Share on other sites