Jump to content
KyleK29

DAS - Dynamically Calculate Shares on %Risk or $Risk - Hot Key + Configuration, Updated 9/10/19, v2.1

Recommended Posts

Thanks @Justin I appreciate the clarity. While I have your attention, can I get some more clarity on the function of these hotkeys, but in some layman's terms? 

Lets say a stock is 20 dollars currently, and I am eyeing a good stop .20 cents away at a moving average, with a planned target of 20.60.

So, if my max risk on any trade is $45, and I am using the "dollar risk" hotkey (as shown), then am I correct in stating that I will be double clicking on the price I want to set my stop (19.80), and then the hotkey function is going to be calculating how many shares I can afford at the current price (20) based on my risk per share (.20 cents), with a total max risk in the trade of $45 worth? 

So it seems in this example, I would be purchasing 225 shares at $20. Is that how this all works? I watched some of Kyle's example videos, and that seems to be what is happening, I'd just really appreciate some clarity on the function of it all. Thanks in advance for the help, it is VERY appreciated. 

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, Andrew from Jersey said:

Thanks @Justin I appreciate the clarity. While I have your attention, can I get some more clarity on the function of these hotkeys, but in some layman's terms? 

Lets say a stock is 20 dollars currently, and I am eyeing a good stop .20 cents away at a moving average, with a planned target of 20.60.

So, if my max risk on any trade is $45, and I am using the "dollar risk" hotkey (as shown), then am I correct in stating that I will be double clicking on the price I want to set my stop (19.80), and then the hotkey function is going to be calculating how many shares I can afford at the current price (20) based on my risk per share (.20 cents), with a total max risk in the trade of $45 worth? 

So it seems in this example, I would be purchasing 225 shares at $20. Is that how this all works? I watched some of Kyle's example videos, and that seems to be what is happening, I'd just really appreciate some clarity on the function of it all. Thanks in advance for the help, it is VERY appreciated. 

You require zero clarity! 😛 

Your scenario is exactly how it works! You even understand the math on how it calculates the shares! 🥳

Share this post


Link to post
Share on other sites
12 hours ago, Justin said:

Hey Justin,

Yeah, it's an issue with DAS and having a Stop order open at the same time. You need to cancel the stop order and replace it. Luckily we can do that all in one hotkey:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.03;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=StopPrice;Share=Pos-share;TIF=DAY+;SELL=SEND

That will cancel the stop order, sell 25% of your shares, and replace the stop order in the same position with the new share count.

If you want to move your stop to breakeven you would use:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.05;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=DAY+;SELL=SEND

Amazing! Thanks.

  • Like 1

Share this post


Link to post
Share on other sites
12 hours ago, Justin said:

Hey Justin,

Yeah, it's an issue with DAS and having a Stop order open at the same time. You need to cancel the stop order and replace it. Luckily we can do that all in one hotkey:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.03;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=StopPrice;Share=Pos-share;TIF=DAY+;SELL=SEND

That will cancel the stop order, sell 25% of your shares, and replace the stop order in the same position with the new share count.

If you want to move your stop to breakeven you would use:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.05;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=DAY+;SELL=SEND

Having a crack at the reciprocal hotkey to cover 25%. Is it:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Ask+0.03;TIF=DAY+;BUY=Send;ROUTE=STOP;StopType=Market;StopPrice=StopPrice;Share=Pos-share;TIF=DAY+;BUY=SEND

Share this post


Link to post
Share on other sites
10 hours ago, Justin T said:

Having a crack at the reciprocal hotkey to cover 25%. Is it:

You got it!

Share this post


Link to post
Share on other sites
23 hours ago, Justin said:

Hey Justin,

Yeah, it's an issue with DAS and having a Stop order open at the same time. You need to cancel the stop order and replace it. Luckily we can do that all in one hotkey:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.03;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=StopPrice;Share=Pos-share;TIF=DAY+;SELL=SEND

That will cancel the stop order, sell 25% of your shares, and replace the stop order in the same position with the new share count.

If you want to move your stop to breakeven you would use:

CXL ALLSYMB;Route=LIMIT;Share=Pos*0.25;Price=Bid-0.05;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=DAY+;SELL=SEND

Hi Justin

I've been having the same problem (not being able to scale out while long on an SSR. With the first hotkey script that you listed, is that strictly for scaling out while long on an SSR? can that be used for scaling out long on a non SSR stock? I'm really trying to use the least amount of hotkeys as possible as I am still in SIM and practicing. Here is what I have been using.

LONG $250 risk
StopPrice=Price-0.01;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=250/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;                                                                                        

LONG scale out 10%
Route=LIMIT;Share=Pos*0.10;Price=Bid-0.05;TIF=DAY+;SELL=Send            

LONG scale out 25%
Route=LIMIT;Share=Pos*0.25;Price=Bid-0.05;TIF=DAY+;SELL=Send            

LONG scale out 100%
;CXL ALLSYMB;Route=LIMIT;Share=Pos*1;Price=Bid-0.05;TIF=DAY+;SELL=Send                

 

SHORT $250 risk
StopPrice=Price+0.01;DefShare=BP*0.97;Price=Price-Bid+0.01;SShare=250/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;                                                                                        

SHORT scale out 10%
Route=LIMIT;Share=Pos*0.10;Price=Ask+0.05;TIF=DAY+;BUY=Send            

SHORT scale out 25%
Route=LIMIT;Share=Pos*0.25;Price=Ask+0.05;TIF=DAY+;BUY=Send            

SHORT scale out 100%
;CXL ALLSYMB;Route=LIMIT;Share=Pos*1;Price=Ask+0.05;TIF=DAY+;BUY=Send                

 

LONG/SHORT move stop to break even
;CXL ALLSYMB;Route=Stop;Price=AvgCost;StopType=MARKET;STOPPRICE=AvgCost;StopPrice=Round2;Share=Pos;TIF=DAY+;Send=Reverse;                                

 

I just added SHORT SSR (haven't used it yet)
StopPrice=Price+0.01;DefShare=BP*0.97;Price=Price-Bid+0.01;SShare=250/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid+.01;TIF=DAY+;SELL=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;          

 

1. What do I need to do to be able to scale out long on SSR? Do i need to add a whole new set of scale out Long SSR keys or replace the ones that I have?

2. Scaling out while short SSR? are they the same as Scaling out Short?

3. Will my "move stop to break even" be universal (LONG, SHORT, SSR SHORT, SSR LONG)? 

3. Does this all make sense? I really appreciate all of your help. Any other tips or suggestions to help me streamline the process or narrow down my hotkeys is greatly appreciated.   Let me know if you need any clarification or information.                                                                    

Share this post


Link to post
Share on other sites
3 hours ago, Casey Gates said:

1. What do I need to do to be able to scale out long on SSR? Do i need to add a whole new set of scale out Long SSR keys or replace the ones that I have?

2. Scaling out while short SSR? are they the same as Scaling out Short?

3. Will my "move stop to break even" be universal (LONG, SHORT, SSR SHORT, SSR LONG)? 

3. Does this all make sense? I really appreciate all of your help. Any other tips or suggestions to help me streamline the process or narrow down my hotkeys is greatly appreciated.   Let me know if you need any clarification or information. 

1. No, the hotkey I posted works for both scenarios.

2. Yes

3. Yes

4. Yes 😋 I think you’ve got it nailed tbh. With the newer scale out long being able to work for both situations, you seem to have a nice, concise set of hotkeys!

Share this post


Link to post
Share on other sites

spacer.png

 

In testing this morning, I noticed DAS has managed to get in a significant request. To sum it up, it allows a single hotkey to cast not only a STOP order on fill (how we currently do it), but also price target orders with each order canceling / updating the position of the STOP when filled.  You might not see a beta configuration tool for this for a bit, as I have to get a wrangle on the syntax and how I plan to handle the configuration options, but it's cool enough that I felt like sharing.

If you're like me and use set Limit Orders to take profit (versus a scale-out hotkey like Andrew), this is a pretty useful addition.

Edited by KyleK29
  • Like 2

---------------------------------------------------------
Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here)

Share this post


Link to post
Share on other sites
4 minutes ago, KyleK29 said:

spacer.png

 

In testing this morning, I noticed DAS has managed to get in a significant request. To sum it up, it allows a single hotkey to cast not only a STOP order on fill (how we currently do it), but also price target orders with each order canceling / updating the position of the STOP when filled.  You might not see a beta configuration tool for this for a bit, as I have to get a wrangle on the syntax and how I plan to handle the configuration options, but it's cool enough that I felt like sharing.

If you're like me and use set Limit Orders to take profit (versus a scale-out hotkey like Andrew), this is a pretty useful addition.

EXCITING! Can't wait to see what you come up with Kyle!

Bonus points if in addition to all that, I can have 2 laddered take-profit orders (i.e. 75% @ 2R, 25% @ 3R) and the stop gets updated after the 1st one gets hit! 😉  

Share this post


Link to post
Share on other sites
6 minutes ago, KyleK29 said:

spacer.png

 

In testing this morning, I noticed DAS has managed to get in a significant request. To sum it up, it allows a single hotkey to cast not only a STOP order on fill (how we currently do it), but also price target orders with each order canceling / updating the position of the STOP when filled.  You might not see a beta configuration tool for this for a bit, as I have to get a wrangle on the syntax and how I plan to handle the configuration options, but it's cool enough that I felt like sharing.

If you're like me and use set Limit Orders to take profit (versus a scale-out hotkey like Andrew), this is a pretty useful addition.

This is amazing news. 🥳

I might have been hammering them on a weekly basis on this for the last few months 😈

Share this post


Link to post
Share on other sites
25 minutes ago, KyleK29 said:

spacer.png

 

In testing this morning, I noticed DAS has managed to get in a significant request. To sum it up, it allows a single hotkey to cast not only a STOP order on fill (how we currently do it), but also price target orders with each order canceling / updating the position of the STOP when filled.  You might not see a beta configuration tool for this for a bit, as I have to get a wrangle on the syntax and how I plan to handle the configuration options, but it's cool enough that I felt like sharing.

If you're like me and use set Limit Orders to take profit (versus a scale-out hotkey like Andrew), this is a pretty useful addition.

WOW !!! head blown on new order processing........ Wonder how many of the list I submitted they completed.  

need to check the release notes...was tht updated ?

 

Share this post


Link to post
Share on other sites

Greetings Dear BBT members,

I need some help with configuring my hotkey.

StopPrice=Price-0;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

This script was working fine on DAS Trader Demo but after I went live and switched to DAS Trader Pro, this is not working as expected for the stop loss order. The script is not placing the stop loss order. I had to create a second hot key for placing the stoploss order. Can someone help please.

Appreciate the help from the community.

Share this post


Link to post
Share on other sites
3 hours ago, samnaha74@gmail.com said:

Greetings Dear BBT members,

I need some help with configuring my hotkey.

StopPrice=Price-0;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

This script was working fine on DAS Trader Demo but after I went live and switched to DAS Trader Pro, this is not working as expected for the stop loss order. The script is not placing the stop loss order. I had to create a second hot key for placing the stoploss order. Can someone help please.

Appreciate the help from the community.

What broker are you with?

For example I’m with IB, so instead of STOPTYPE=MARKET, market is called SMRTM, so try replace with STOPTYPE=SMRTM (if you are with IB).

  • Like 1

Share this post


Link to post
Share on other sites

Thank you so much TommyK667. Yes, I am with IB.  I updated the script with SMRTM but that also did not worrk.

StopPrice=Price-0;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:SMRTM PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

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.