Jump to content
KyleK29

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

Recommended Posts

Hey @KyleK29, I've been using the hotkeys now for a while and having difficulty with my stop loss being near the risk $ I took. I am risking $250/trade as per the config option, but when I get stopped out it has been $350-380 range. I changed it to a LIMIT instead of market with .05 buffer on the same stock and then I get $260-280. Which is better, but problem with limit stop is I got skipped once and it freaked me out so went back to market order stops.

It calculated too many shares: entry was 21.95 short, stop loss set to 22.11, shares purchased were 2083 and stop loss was triggered at 22.12 ---- the risk was actually $333 versus $250 and my total loss stop amount was $354 based on the share size

Have you experienced this lately as well, or others?  I am getting too many shares for the risk $ Just wondering if other experience this or if this is a bug

here is my SHORT $250 RISK script for reference:

StopPrice=Price+0;DefShare=BP*0.9;Price=Price-Bid+0;SShare=250/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.04;TIF=DAY+;SELL=Send;DefShare=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.05 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Edited by Thomas
added more details

Share this post


Link to post
Share on other sites

I'm having an issue where the hotkey will sometimes not fill and act like a limit order that just sits open. Kind of a strange situation, but it's pretty frustrating and I'm not sure what is going wrong because I got it directly from the spreadsheet. Anyone have any ideas what is going wrong?

Here is the script that I am using: 

StopPrice=Price-0.01;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=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+;

Hotkey fail.JPG

Share this post


Link to post
Share on other sites

Hi everyone,

 

I didn't go through all the pages so I hope this question wasn't already asked.

I have all the hotkeys setup and working, but there is something I would like to achieve and I don't know how.

Let's say I'm already in a trade, I went long with a fixed risk, and I have my stop defined.

Maybe I went with a smaller size than usual, and now the stock is moving in my direction so I would like to add in, without raising my first stop.

I would like to keep my first entry and my first stop the same, and have a second stop corresponding to my second entry.

 

 

@KyleK29 Do you know if this is possible ?

 

Thank you !

Share this post


Link to post
Share on other sites

I just want to say that every time I read the original post I learn something and laugh. Thanks, Kyle!

Share this post


Link to post
Share on other sites

Great work @KyleK29 ! 

I'm setting up right now all the HKeys! 

just wanted to ask, could you share your layout default config? and that "Stock Calculator" program to have a look? I know it's in BETA, but i'm really interested in it to test. ( and please let me know anyhow when that stock calculator is finished! ) 

also, 

Do you use 4K screen? your layout looks ideal! what monitor you have?

Thanks Again! 

and keep it up!    

 

Share this post


Link to post
Share on other sites

I have a HotKey request, I hope it's not too complicated, but I have no idea how to do it myself. If Kyle or anyone else would be kind enough to help me out I would really appreciate it. I have started using multiple range orders to finish my trades off instead of a trailing stop. So I would like to streamline this order instead of manually entering it each time.

Stop range order; 50% Pos ; BE and BE+1.00

Stop range order; 50% Pos; BE and BE+2.00

 

I could just hit this hotkey, then use the move order on chart to put the profit target where I want.

If I could just get one of these, I could figure out how to adjust this on my own to my liking, 25% 75% 50%,  +1.00 or +2.00 or whatever I find I use the most.

 

Thanks Bobby N in Chat

 


If you don’t have a mountain to climb, find one.

Share this post


Link to post
Share on other sites

I bet I could just tweak Williams R:R hotkey in this video couldn’t I?

8BB2B551-C50F-4ED9-BE44-F3BBBA56B6F5.thumb.jpeg.5b0f7ca62339dc6257f58359057c9c2f.jpeg

 


If you don’t have a mountain to climb, find one.

Share this post


Link to post
Share on other sites

Hello All,

Hope all of you are well.

I've got a hopefully easy fix question for those who might have it already. I would like to have a close and flip position hotkey please.

Scenario:

Step 1: Lets say I am short and want to cover my position and therefore I use the following hotkey from Kyle:

CXL ALLSYMB;Route=SMRTM;Share=Pos;Price=Ask+0.05;TIF=DAY+;BUY=Send;

Step 2: Now I would like to enter a long position with fixed risk, therefore I double click my stop loss price on the chart and use the following Kyle's hotkey:

StopPrice=Price-0.01;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=75/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=0;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Question: Is it possible to have the above 2 steps in one single hotkey please?

Basically, I just need to get the amount of shares held in the current short, and add that number to the result of the long entry hotkey (step 2), before it is actually executed. That way the short is covered and a fixed risk long is opened.

Appreciate all the help.

Thanks in advance and good day,

Kim

Share this post


Link to post
Share on other sites
On 9/8/2020 at 12:32 PM, Thomas said:

Hey @KyleK29, I've been using the hotkeys now for a while and having difficulty with my stop loss being near the risk $ I took. I am risking $250/trade as per the config option, but when I get stopped out it has been $350-380 range. I changed it to a LIMIT instead of market with .05 buffer on the same stock and then I get $260-280. Which is better, but problem with limit stop is I got skipped once and it freaked me out so went back to market order stops.

It calculated too many shares: entry was 21.95 short, stop loss set to 22.11, shares purchased were 2083 and stop loss was triggered at 22.12 ---- the risk was actually $333 versus $250 and my total loss stop amount was $354 based on the share size

Have you experienced this lately as well, or others?  I am getting too many shares for the risk $ Just wondering if other experience this or if this is a bug

here is my SHORT $250 RISK script for reference:

StopPrice=Price+0;DefShare=BP*0.9;Price=Price-Bid+0;SShare=250/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.04;TIF=DAY+;SELL=Send;DefShare=200;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.05 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

bump --- anyone else getting bad slippage when the stop loss triggers? I risk $250 and it's closer to $350.

Share this post


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

bump --- anyone else getting bad slippage when the stop loss triggers? I risk $250 and it's closer to $350.

If you clicked at 21.99 it would calculate at that price, if it was moving fast, or your internet is slow, .04 slippage at entry would give you $83 difference. It doesn’t have to be .04 slippage just at entry, it could be .02 slippage at entry and exit.

 

If you are using DaS you can look at “trade log”, it shows what your order was and where it was filled. You should be able to tell what slippage was from there.

 

hope this helps.

 

Edited by hailchaser2

If you don’t have a mountain to climb, find one.

Share this post


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

Hello All,

Hope all of you are well.

I've got a hopefully easy fix question for those who might have it already. I would like to have a close and flip position hotkey please.

Scenario:

Step 1: Lets say I am short and want to cover my position and therefore I use the following hotkey from Kyle:

CXL ALLSYMB;Route=SMRTM;Share=Pos;Price=Ask+0.05;TIF=DAY+;BUY=Send;

Step 2: Now I would like to enter a long position with fixed risk, therefore I double click my stop loss price on the chart and use the following Kyle's hotkey:

StopPrice=Price-0.01;DefShare=BP*0.97;Price=Ask-Price+0.01;SShare=75/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=0;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.05 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

Question: Is it possible to have the above 2 steps in one single hotkey please?

Basically, I just need to get the amount of shares held in the current short, and add that number to the result of the long entry hotkey (step 2), before it is actually executed. That way the short is covered and a fixed risk long is opened.

Appreciate all the help.

Thanks in advance and good day,

Kim

Hi Kim,

if you're looking to flip your short position to a long position (i wouldn't recommend it) but here is the code for it: 

Flip SHORT to LONG position

CXL ALLSYMB;ROUTE=SMRTL;Share=Pos*2;Price=Ask+.05;TIF=DAY+;BUY=Send

 

Flip LONG to SHORT position

CXL ALLSYMB;ROUTE=SMRTL;Share=Pos*2;Price=Bid-.05;TIF=DAY+;SELL=Send

 

I hope this helps.

Peter

 

Share this post


Link to post
Share on other sites
5 hours ago, pjjsfv said:

Hi Kim,

if you're looking to flip your short position to a long position (i wouldn't recommend it) but here is the code for it: 

Flip SHORT to LONG position

CXL ALLSYMB;ROUTE=SMRTL;Share=Pos*2;Price=Ask+.05;TIF=DAY+;BUY=Send

 

Flip LONG to SHORT position

CXL ALLSYMB;ROUTE=SMRTL;Share=Pos*2;Price=Bid-.05;TIF=DAY+;SELL=Send

 

I hope this helps.

Peter

 

Hello Peter,

Thanks for your reply but no I do not want to just flip the position with same amount of shares, as the stop (according to my fixed risk) would not be a technically good one.

Let say I am left with 100 shares from a previous short trade, and now my strategy is giving me a signal to go long.

The hotkey to go long, with particular fixed risk,(which I have and works great) calculates that it needs to buy 250 shares.

Now, I need one hotkey (which would be 2 of Kyle's hotkeys but merged) which takes the 250 shares long and adds another 100 shares so that it covers the current open short trade too.

This way, apart from opening the long position, based on my strategy, the short position is also closed automatically.

Thanks a lot in advance, all the help is greatly appreciated.

Thanks

Kim

Edited by kimfarr83

Share this post


Link to post
Share on other sites

Hello All,

Just an update, managed to make the hotkey work as I needed but only for entering a new short position.

1. To Close the current long trade, workout the the new amount of shares/fixed risk to go short, and execute, I am using the following. Basically I just added the bold part to Kyle's hotkey:

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

2. I have a problem though when covering the short and opening a long trade, as current Pos would be a negative value and it actually subtracts instead of adding to the total. Would be nice to have an ABS(Pos) function, or another way to do it maybe in DAS.

Thanks a lot to everyone. Maybe there is a simple solution.

Kim

Share this post


Link to post
Share on other sites

@KyleK29 Ive asked DAS and they obvs told me to ask you. I only use your Hkey to trade. Is there any way to get the hotkey to just tell me how many shares it would take based on the distance to SL from where I clicked but not actually send the order to market. 

What I'm trying to achieve and why: Sometimes a stock wants to break up through an important level lets say $50. But by the time I hit the Hkey its already at $50.20. So I want to just use the hotkey in these rare instances to show me how many shares it'd execute if I pre-empted the trade at like $49.99 and then just manually type the trade into the montage with a limit order so I don't get skipped. 

Also, the script has the TIF as Day+ but I want to make it just DAY. I need to do that in my order routing template and change all instances of TIF in the script to DAY as well right? And will this work or screw it up? 

Thx

Edited by Sapperstien

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.