WestCoastTrader 0 Posted November 10, 2020 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 0 Posted December 2, 2020 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 258 Posted December 10, 2020 (edited) 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 December 10, 2020 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