Jump to content
KyleK29

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

Recommended Posts

1 hour ago, peterB said:

StopPrice=Price-0,01;DefShare=BP*0,97;Share=DefShare*0,25*Price*0,01;Price=Ask-Price+0,01;SShare=Share/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=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

i am getting "Invalid Operator" in my DAS 5.4.3.0

what is wrong?

It's the commas.

Looks like you're in Italy? In the troubleshooting section of the spreadsheet it mentions European users will need to change the decimal separator from "," to "."

Incorrect - 0,01

Correct - 0.01

  • Like 2

Share this post


Link to post
Share on other sites
On 12/2/2019 at 10:05 AM, Sapperstien said:

Hey Kyle, This might be difficult to do and kind of dangerous to rely upon but do you think it would be possible to implement having it only execute and round to the nearest and smallest board lot (100shares) so you don't execute in odd lots? Obviously and shares <100 (mixed) would have to be executed as 100. 
 

I don't believe it would be possible given what I know of DAS' hotkeys but I thought it would be worth a shot. Would help save on fees. Thx. 

Curious, how would this help save on fees? Odd lots cost more? I haven't noticed with IB. 

Share this post


Link to post
Share on other sites

Hi I'm 1 month into sim but having some issues with my hotkeys and was hoping someone would help a fellow BBT member out.

I'm currently using kyles hotkeys which work great but when a stock is on SSR.S  I'm having alot of trouble

I have a $25 risk long hotkey which is

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

which works as normal when a stock is on short selling restriction once I've double clicked where i want my stop to be on the chart.

 

but all the hotkeys below won't work when a stock is on  ssr.s restriction:

SELL HALF (When I'm long)

Share=Pos*.5;Price=Bid-.05;TIF=DAY+;SELL=Send;

 

SELL ALL (When i'm long)

;Share=Pos;Price=Bid-.05;TIF=DAY+;SELL=Send;

 

also none of my short hotkeys below work either:

I have a $10 risk short hotkey which is

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

 

COVER HALF (when i'm short)

Share=Pos*.5;Price=Ask+.05;TIF=DAY+;BUY=Send;

COVER ALL (When i'm short)

Share=Pos;Price=Ask+.05;TIF=DAY+;BUY=Send;

 

When i try to use these when a stock is on SSR.S it says short marketable limit order disable due to SSR.S.

 

does anyone have a script which will work with kyles hotkeys when a stock is on SSR.S to

1) cover half  and cover all of my position  when i'm long using kyles hotkeys

2) short a stock using kyles hotkeys with a defined risk

3) cover half and cover all of your position once I've used kyles short hotkeys  

 

I'm currently with CMEG but only in their simulation mode. 

Any feedback would be great.

 

Thanks

 

Share this post


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

SELL HALF (When I'm long)

Share=Pos*.5;Price=Bid-.05;TIF=DAY+;SELL=Send;

 

SELL ALL (When i'm long)

;Share=Pos;Price=Bid-.05;TIF=DAY+;SELL=Send;

You're missing your Route - also you should cancel any open orders before selling/buying:

50%
;CXL ALLSYMB;Route=LIMIT;Share=Pos*0.5;Price=Bid-0.05;TIF=DAY+;SELL=Send

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

 

For your Short hotkey, when you trigger it on an SSR can you see that it creates an open order - just not filled? Because they will only fill when going up in price.

Edited by Justin
  • Thanks 1

Share this post


Link to post
Share on other sites

@KyleK29 Hi Kyle - Thanks for such outstanding work, you have no idea how these hotkeys improve my trading. I have one question though, do you know why I can not partial when my breakeven bidirectional hotkey is on. For example I am long ROKU at $150 and moved a dollar $151 and let's say I moved my stop loss to breakeven using the biderectional breakeven hotkey for short and long, and now I want to partial 25%. For some reasons it does not allow me to. I need to cancel my breakeven stop loss order first then I can take my partial. Any idea why?

Thanks!

Share this post


Link to post
Share on other sites
On 12/12/2018 at 10:44 AM, KyleK29 said:

Did the spreadsheet create that command, or did you make edits (just need to know if I need to make a fix for the spreadsheet)? The TriggerOrder section shouldn't have ";" as it's technically one command.

Here is what the TriggerOrder portion should look like:


TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice STOPPRICE:StopPrice QTY:Pos TIF:DAY+ ACT:SELL;

Fixed command:


FocusWindow MONTAGE;StopPrice=Price-0;DefShare=BP*0.99;Share=DefShare*0.25*Price*0.02;Price=Ask-Price+0;SShare=Share/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=1000;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice STOPPRICE:StopPrice QTY:Pos TIF:DAY+ ACT:SELL;

 

@KyleK29

Below 2 hot keys I am assuming placing a stop market order by double clicking on chart to get stop price for an open position. Please let me know if my understanding is correct.

 

TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice STOPPRICE:StopPrice QTY:Pos TIF:DAY+ ACT:SELL;

 

TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice STOPPRICE:StopPrice QTY:Pos TIF:DAY+ ACT:BUY;
 

Share this post


Link to post
Share on other sites

Kyle - I have a question regarding this hotkey. I have been using the script for a few months now and it works perfect. The concern I have is when I let the stock go to my stop loss (risk) $20, this is the exact amount I lose. The question is when I get my 2-1, I don't get a true $20 or even $40 reward. Why is this? I have let the stock run sometimes upwards of .40 cents where my risk is say only .12. I still don't get my actual risk to reward. 

  • Confused 1

Share this post


Link to post
Share on other sites
16 hours ago, Jramosent said:

Kyle - I have a question regarding this hotkey. I have been using the script for a few months now and it works perfect. The concern I have is when I let the stock go to my stop loss (risk) $20, this is the exact amount I lose. The question is when I get my 2-1, I don't get a true $20 or even $40 reward. Why is this? I have let the stock run sometimes upwards of .40 cents where my risk is say only .12. I still don't get my actual risk to reward. 

Hi Jra - post a screenshot of your order log because that sounds impossible. There could be some slippage between orders sent and filled, but be aware the script, by nature, is not 100% accurate with the risk calc. 

Share this post


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

Hi Jra - post a screenshot of your order log because that sounds impossible. There could be some slippage between orders sent and filled, but be aware the script, by nature, is not 100% accurate with the risk calc. 

In this example here I shorted the stock in which I had a .16 cent win with a stop of .07 cents. A little more than 2 to 1 correct? I ended up making $13.60, Although my risk is always $20.... Maybe I'm doing something wrong here?

AMD Log.png

Edited by Jramosent

Share this post


Link to post
Share on other sites

Kyle Thank You so much for this amazing hotkeys you created for the community. It improved my trading a lot.

I have a question is there any way you can add one more criteria to the existing hotkeys  that will allow you to buy or sell maximum 1000 shares with your buying power.

Edited by Jinagt

Share this post


Link to post
Share on other sites
9 hours ago, peterB said:

it all depends on your buying power so if your buying power is only $4000 that is your limit on the position size, not the risk.

OK so buying power comes into play here. Makes sense. In this scenario what can I do to better my 2-1 ratio? Lower my risk and strive for a 2 or more play?

Share this post


Link to post
Share on other sites
9 hours ago, peterB said:

it all depends on your buying power so if your buying power is only $4000 that is your limit on the position size, not the risk.

Peter - My brother has this same issue. Buying power is not a problem here with a broker in the states. Risk for him is $50. Yet the same thing occurs for him.....

Share this post


Link to post
Share on other sites
22 hours ago, Jramosent said:

In this example here I shorted the stock in which I had a .16 cent win with a stop of .07 cents. A little more than 2 to 1 correct? I ended up making $13.60, Although my risk is always $20.... Maybe I'm doing something wrong here?

AMD Log.png

Hmm well if you shorted 85 shares, with a stop of 7 cents away, that's $5.95 risk, not $20. You may have the script set to $20 but as Peter pointed out you may be limited to your buying power...And to risk $20 with a 7 cent stop you would have needed to short ~285 shares of AMD (at that share price).

Hopefully this helps!

  • Like 1

Share this post


Link to post
Share on other sites
10 minutes ago, Jramosent said:

OK so buying power comes into play here. Makes sense. In this scenario what can I do to better my 2-1 ratio? Lower my risk and strive for a 2 or more play?

If it is buying power related, just focus on less expensive stocks and less risk. 

  • Like 1

Share this post


Link to post
Share on other sites

Hi Everyone!  

I'm not sure if this has been asked (or requested already).  I've tried searching but have come up empty.  I am using this hotkey successfully and love it!  Currently only taking on $30 risk per trade.  It would be great if I could modify it to automatically enter a range order (with the stop at the $30 risk level) with a target set at a 2 to 1 or 3 to 1 target.  Has anyone tried this and have an example?  

Regards,

Angel

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.