Symbol properties
Sometimes we need to use a different approach for symbols that are on SSR or that are hard to borrow. For this purpose, the getquoteobj() function will retrieve all the information about the symbol.
Note: The properties are being added with each version of DAS Trader Pro, so make sure you use the latest one to get the most out of the feature.
To get quick information about a symbol, we can call the getquoteobj() function and show the object variable like this.
$QUOTE=getquoteobj("AMD");
$QUOTE.showobject();

Now, to get the value of the above properties, we just need to address that property by its name. If we need to read RVOL we can call it
$RVOL=getquoteobj($montage.Symb).RVOL; msgbox($RVOL);
which gives us

In this way we can quickly display the symbol properties we are interested in or work with the properties in our scripts later on.
Notice that
$QUOTE=getquoteobj($montage.Symb); msgbox($QUOTE.RVOL);
and
$RVOL=getquoteobj($montage.Symb).RVOL; msgbox($RVOL);
and also
msgbox(getquoteobj($montage.Symb).RVOL);
are interchangeable, so we can use any of the forms we prefer for the readability of our scripts.
More use cases
Based on the properties of the symbol we trade, we can add the conditional behavior for our entry or exit hotkey scripts.
HTB
If a symbol is hard to borrow, it has HTB property set to 1 and ETB property set to 0, and vice versa. In this situation, we must locate the shares first as described in the previous post
DAS Trader Pro Autolocate with hotkeys
if ($QUOTE.HTB==1)
{
$Montage.exechotkey("Autolocate");
//the usual entry code
}
else
{
//the usual entry code
}
SSR
If a symbol is in short selling restriction, it has SSR property set to 1. In that case we have to enter our short positions on the Ask, rather than the Bid
if ($QUOTE.SSR==1)
{
// the usual entry code
$montage.Price=Ask;
// send the order code
}
else
{
// the usual entry code
$montage.Price=Bid;
// send the order code
}
Halted
If a symbol has been halted during the day, it has the halted property set to 1. We might need to use a different route for the symbol based on the halted flag, like this:
if ($QUOTE.Halted==1)
{
//the usual entry code
$Montage.route="Special Route";
// send the order code
}
else
{
//the usual entry code
$Montage.route="Standard Route"
// send the order code
}
