Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

WestCoastTrader

DAS Hotkey Help

Recommended Posts

WestCoastTrader

Hi Everyone,

I am trying to setup a buy hot key that automatically set a stop order that has a fixed max loss dollar amount and have it calculate what the stop loss price would be at

For example. I want to buy 100 shares of a $30 stock and have a max $50 loss. So the raw math would be $30 - $50/100 or AvgPrice - 50/Pos

Here is the hot key i have but it does not set the stop for some reason

CXL ALLSYMB; ROUTE=LIMIT;Price=Ask+0.05 ;Share=100 ;TIF=DAY+;Buy=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET ACT:SELL STOPPRICE:AvgCost-50/Pos QTY:Pos TIF:DAY+;

 

Thanks Everyone!!

Share this post


Link to post
Share on other sites
cpjarrell92

If you're OK with using a separate hotkey to set the stop loss below is the script I use for a $50 max loss when going long.

ROUTE=STOP;StopType=Market;Share=Pos;StopPrice=50/Share;StopPrice=AvgCost-StopPrice;TIF=DAY+;SELL=Send

Share this post


Link to post
Share on other sites
KyleK29
On 11/10/2020 at 8:43 AM, WestCoastTrader said:

Hi Everyone,

I am trying to setup a buy hot key that automatically set a stop order that has a fixed max loss dollar amount and have it calculate what the stop loss price would be at

For example. I want to buy 100 shares of a $30 stock and have a max $50 loss. So the raw math would be $30 - $50/100 or AvgPrice - 50/Pos

Here is the hot key i have but it does not set the stop for some reason

CXL ALLSYMB; ROUTE=LIMIT;Price=Ask+0.05 ;Share=100 ;TIF=DAY+;Buy=Send;TriggerOrder=RT:STOP STOPTYPE:MARKET ACT:SELL STOPPRICE:AvgCost-50/Pos QTY:Pos TIF:DAY+;

 

Thanks Everyone!!

Have you checked out this thread?: DAS - Dynamically Calculate Shares on %Risk or $Risk - Hot Key + Configuration, Updated 9/10/19, v2.1 - DAS Trader Pro Tips and Tricks - Bear Bull Traders Forums

As a side note, you can't currently do a lot of math in the Trigger Orders as it won't properly flatten the values so it tries to pass it as literal strings.  The general syntax available is AvgCost+## or AvgCost-## and those tend to go in correctly.

 

Edited 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

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

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.