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.

ari4u

How do you set a stop loss distance that scales across different stocks?

Recommended Posts

ari4u

Below is my hotkey script that does two things:

1. Executes a long buy order for 100 shares using a marketable limit order
2. Once above order executes, triggers a stop loss to be created at a distance of $0.10 below the average price

 

CXL ALLSYMB;ROUTE=SMRTL;Share=100;Price=Ask+0.03;TIF=DAY+;Buy=Send; TriggerOrder=RT:STOP STOPTYPE:MARKET STOPPRICE:AvgCost2-0.10 PX:AvgCost2-0.10 ACT:SELL QTY:POS TIF:DAY+

 

  • This works totally fine for stocks that don't jump around much and have a smaller bid-ask spread (1-2 cents). The $0.10 stop loss distance is good enough
  • This does not work for low priced stocks - $0.10 stop distance is too large
  • This does not work for high priced stocks (e.g. TSLA. NVDA) that jump around quite a lot and have a larger bid-ask spread. The $0.10 stop distance is way too tight and i get stopped out right after the buy order is placed.

 

How do you scale the stop distance automatically in the script based on the stock price, ATR and bid-ask spread instead of hard-coding a fixed value? Do you use a % of the stock price to set the stop distance? What has worked for you all? 

 

New to DAS and thanks in advance for the support!

Edited by ari4u

Share this post


Link to post
Share on other sites
dwarsco
On 4/11/2021 at 11:53 AM, peterB said:

most people use static risk

either a %of BP or a defined risk per trade like $20

just search for fixed risk and you will find it

ive been searching for a way to scale in up to my max loss risk (and dont want to open a new thread).  when the trade is going against me but still not hit my stop lets use Sq on may, 7 21 as an example. 

 im shorting the stock and my stop loss is $242.     my first entry is 240. 50 with $40 risk.  my 2nd entry is 241 with $80 risk my my last entry was 241.33. with $240 risk   ( so my total risk would be 360. (which is less than my max loss of 400) .   im still using the same stop loss number. 

 

would the defined risk hotkeys mess up because the previous stop loss order that was there? or would it mess up because now the total number of shares cause a problem.  i dont have a sim to test it.  so i actually did this manually on friday and got a good gain with covers at 235. but took a lot of math on my end and would rather the computer compute.  Thanks Peter and Kyle and every one else that contributes so much  

 

 (my actual entries were 25 @ 240.50.  75 @ 241  350@ 241.33 (was waiting for 241.75 but was on the ask and never made it but 241.33 is when i saw that was hading down finally )

 

 

edit- after thinking . if it messes up due to the total risk im adding in. i can create another button with the higher risk .  say the 80 risk. after the 4- doesnt make my total risk 120.  then just make a 120 button.    

Edited by dwarsco
more thoughts

Share this post


Link to post
Share on other sites
KyleK29

You'll find a ton of helpful information on how to get a more dynamic risk based stop in 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

 

That basically does what you want, basing a stop-distance on where you double-click on the chart. It does the calculations for you from there.

On 5/9/2021 at 2:44 PM, dwarsco said:

ive been searching for a way to scale in up to my max loss risk (and dont want to open a new thread).  when the trade is going against me but still not hit my stop lets use Sq on may, 7 21 as an example. 

 im shorting the stock and my stop loss is $242.     my first entry is 240. 50 with $40 risk.  my 2nd entry is 241 with $80 risk my my last entry was 241.33. with $240 risk   ( so my total risk would be 360. (which is less than my max loss of 400) .   im still using the same stop loss number. 

 

would the defined risk hotkeys mess up because the previous stop loss order that was there? or would it mess up because now the total number of shares cause a problem.  i dont have a sim to test it.  so i actually did this manually on friday and got a good gain with covers at 235. but took a lot of math on my end and would rather the computer compute.  Thanks Peter and Kyle and every one else that contributes so much  

 

 (my actual entries were 25 @ 240.50.  75 @ 241  350@ 241.33 (was waiting for 241.75 but was on the ask and never made it but 241.33 is when i saw that was hading down finally )

 

 

edit- after thinking . if it messes up due to the total risk im adding in. i can create another button with the higher risk .  say the 80 risk. after the 4- doesnt make my total risk 120.  then just make a 120 button.    

 

On 4/7/2021 at 6:12 PM, ari4u said:

Below is my hotkey script that does two things:

1. Executes a long buy order for 100 shares using a marketable limit order
2. Once above order executes, triggers a stop loss to be created at a distance of $0.10 below the average price

 

CXL ALLSYMB;ROUTE=SMRTL;Share=100;Price=Ask+0.03;TIF=DAY+;Buy=Send; TriggerOrder=RT:STOP STOPTYPE:MARKET STOPPRICE:AvgCost2-0.10 PX:AvgCost2-0.10 ACT:SELL QTY:POS TIF:DAY+

 

  • This works totally fine for stocks that don't jump around much and have a smaller bid-ask spread (1-2 cents). The $0.10 stop loss distance is good enough
  • This does not work for low priced stocks - $0.10 stop distance is too large
  • This does not work for high priced stocks (e.g. TSLA. NVDA) that jump around quite a lot and have a larger bid-ask spread. The $0.10 stop distance is way too tight and i get stopped out right after the buy order is placed.

 

How do you scale the stop distance automatically in the script based on the stock price, ATR and bid-ask spread instead of hard-coding a fixed value? Do you use a % of the stock price to set the stop distance? What has worked for you all? 

 

New to DAS and thanks in advance for the support!

 


---------------------------------------------------------
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.