Over the years I have tuned up the exit hotkey several times and this is the last version I use as of today. It is similar to the previously used getout hotkey. Here are some of the properties of the hotkey
single hotkey for both long and short
detects sub dollar price and does the rounding automatically
is a limit order
does not require a chart window
uses advanced syntax and addresses specific montage window so can be called from anywhere
uses 2% limit offset of the current price to exit the position (tunable)
Requirements
It requires naming the montage window as “MONTAGE1”
The EXIT hotkey
$montage=getwindowobj("Montage1");
$MYPOS=GetAccountObj($montage.account).getposition($MONTAGE.Symbol).share;
if ($MYPOS==0)
{
MsgBox("No position to close");
}
else
{
$MONTAGE.CXL ALLSYMB;
if ($MYPOS>0)
{
$Montage.price=$montage.last*0.98;
}
else
{
$Montage.price=$montage.last*1.02;
}
if ($MONTAGE.price>=1)
{
$MONTAGE.Price=Round($Montage.price,2);
}
else
{
$MONTAGE.Price=Round($Montage.price,4);
}
//set your exit route
$MONTAGE.ROUTE="LIMIT";
$MONTAGE.Share=$MONTAGE.POS;
$MONTAGE.Send=Reverse;
}
Set your exit route according to your preference or need.
If there is no position opened for the symbol, it will pop up a message
This can be skipped if not needed, but it helps to show that you probably have made a mistake in the symbol selection on your montage.
The Limits
There could be situations when the broker denies your limit order because it is “too far” from the current price especially when trading penny stocks, so tune the price offsets according to your needs.
Do you have a PANIC hotkey for a market order just to be safe that I always get out 100%?
Does this panic button work for premarket and after hour trades as well?
Peter, are you able to share a writeup of optimal DAS setup settings for the quickest speed/executions? I've recently pivoted to Ocean One for quick entries and exits (plus the added benefit of your scripts not needing to be customized to another broker), but I'm getting some lag vs the TOS version. Thank you sir