Jump to content
Zeckrin

Panic Hotkey Pre/Post Market Hours ?

Recommended Posts

(EDIT: SEE LAST COMMENT BY ME - FOUND THE CORRECT WAY TO CREATE PRE/POST PANIC HOTKEY)

The existing Panic key will put a Market order to close all positions. Of course this will not work if you are trading Post/Pre Market.

Is there a hotkey which can do the same for Post/Pre Market?

Example: If you are long at $20 for 1000 shares and price is going against you and is at 19.50. You then hit the Post/Pre Market panic button and it puts a limit order in for 1000 shares at 'Price - x'

So this way you can define x as .05 and the panic button will place a short limit at 19.45 for 1000 shares. Your not guaranteed to be filled but if the spread is tight you most likely will be. 

I may be missing something but I think this would be helpful as the only way to exit currently is to drag your Short Limit for 1000 shares to some place around 19.45 to exit the trade.

Thanks,

Mike

Edited by Zeckrin
Pointing to solution

Share this post


Link to post
Share on other sites
8 hours ago, peterB said:

you know you can exit any position by selling at bid or covering at ask instantly. so you dont need to drag anything, just have the hotkeys for sell 100% and cover 100% of position

Thanks. I guess I was thinking that if you have say 2000 shares on a low float and need to sell and say the bid is at 18.49 and your hotkey puts in a sell limit order for 2000 shares at 18.49 but there are only 1000 shares available at that price then you would not get filled. But if you could define tolerable slippage in your hotkey then you could get filled.

 

I'm just getting into pre/post market trading so I may be completely off 🙂

Share this post


Link to post
Share on other sites

Hi @peterB,

In the same idea, I have a weird thing going on with my "sell 100%" hotkey. Very simple need, get out completely of the remaining position (like the "Panic" button but without exiting the other positions).

It used to work but I made a few adjustements on other entry hotkeys and then, this one doesn't work anymore.

Here is the script I want to fix:

CXL ALLSYMB;ROUTE=SMRTM;Price=BID 0.05;Price=Round2;Share=Pos*1;TIF=DAY+;SELL=Send

When I enter a long position with this script :

CXL ALLSYMB; StopPrice=Price-0.01;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=100/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;Share=Share/4;Share=Share*4;TogSShare;ROUTE=SMRTM;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=1000;Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*5+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;Price=Ask-StopPrice*7+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS*.25 TIF:DAY+;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos*.25 TIF:DAY+;

I get this type of position :

Sell-strange-behaviour.PNG.cfff272ac9a995033888f7cb1e871cea.PNG

Then, when I press the "sell 100%", Instead of getting everything out like the Panic button, I get this :

Sell-strange-behaviour-2.PNG.70f2f8cb37fe2e3d7242852b34c498b5.PNG

And pressing Sell 100% again doesn't change anything. I can only exit by pressing the Panic button.

In another test with a slightly different code, I could cancel all the existing orders, but the position was still open. Not very useful either.

Could you tell what is going wrong, please ?

Thanks a lot.

Best,

Pierre

 

Share this post


Link to post
Share on other sites

And I will have the same issue with the short side, too please.

Thanks PeterB

Edited by paqueuc
Being polite

Share this post


Link to post
Share on other sites

Thanks a lot @peterB

Was it a" * " or was it a " - " ? I've tested both and both seemed to work on the long side. On the short side, only the " + " was working. The " * " was not working.

Thanks anyway, it was helpful as I didn't see it.

Best,

Share this post


Link to post
Share on other sites

Got an update to this. Now with the Advanced Hotkey IF/Else conditions I was able to get a Post/Pre market PANIC Hotkey created.

This will set share size to current position and then put a Sell limit .25 below current Ask if your in a long or a buy .25 above current bid if your in a short.

This is then a simple EXIT/PANIC hotkey for both Long & Short for Pre/Post Market hours.

Be sure to have 'Hotkey Advanced Script' enabled in DAS configuration before using the script

(If your Montage Window name is 'LIVE')
Replace the x's between quotes with your Account #
Replace Route with desired route

 

CXL ALLSYMB;
FocusWindow LIVE;
$mon=GetWindowObj("LIVE");
$Pos= GetAccountObj("xxxxxxxx").GetPosition($mon.SYMB).share;if ($Pos<0){Price=Ask+0.25;} else{Price=Bid-0.25;};
$Price=round(Price,2);
Share=Pos;
Price=$Price;Route="LIMIT";TIF=DAY+;Send=Reverse

Edited by Zeckrin

Share this post


Link to post
Share on other sites

this is not an equivalent of the panic. here is why

- this will close only the position of currently selected symbol

- it does not use market order to exit the position so you can get just skipped

it is also syntatically wrong and here is why

- you read the $Pos then use Pos which are two different things if you run the hotkey when montage is in focus

- if the spread of the stock you want to exit is wider than 0.25 then you can get skipped very easily

the true panic will be possible only once DAS will let us to read all the current opened positions from the trades window. hopefully they will make it possible this later this year. 

to see how these things work go to https://traderpeter.substack.com/s/dastrader-hotkeys

 

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.