Jump to content
KyleK29

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

Recommended Posts

I am using this hotkey to scale in while short:

;CXL ALLSYMB;DefShare=BP*0.97;Price=StopPrice-Bid-0.02;SShare=50/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+;

is there a single hotkey that can scale in both short and SSR or do they have to be separate? I'm assuming they have to be separate but I thought I'd check. Thanks

Share this post


Link to post
Share on other sites

@forkey I've tried multiple ways to combine them... I can't quite get it. Although this should be possible in the forthcoming version of DAS.

@Casey Gates Who is your broker? If you are with IB then you can actually just use the regular short hotkey as IB will automatically price you on the bid+0.01. Otherwise you should use two separate hotkeys. I say "should" because the SSR hotkey will work on regular shorts, but you wouldn't want to use it because you'd get a worse fill than needed.

Share this post


Link to post
Share on other sites

Hey all, hope someone can help me out. Im trying the hotkets and they work GREAT. 

I do have one issue and would like some help: When im long in a position and scale out I can reclick my Long range order hotkey:

  • (CXL  ALLSYMB; Route=Limit;Share=Pos;Price=AvgCost-StopPrice;Price=Price*3;Price=Price+AvgCost;Price=Round2;Route=Stop;StopType=Range;LowPrice=StopPrice;HighPrice=Price;TIF=DAY+;SELL=Send;ROUTE=LIMIT)

and it re calculates the remaining shares to reset the new share number with the same stop range....

However, when im in a short position and i click the same scale out hotkey and hitting the Short Range Order:

 

  • (CXL ALLSYMB; Route=Limit;Share=Pos;Price=StopPrice-AvgCost;Price=Price*2;Price=AvgCost-Price;Price=Round2;Route=Stop;StopType=Range;HighPrice=StopPrice;LowPrice=Price;TIF=DAY+;BUY=Send;ROUTE=LIMIT)

it cancels the range order without getting into a new one. 

 

Edited by Fernando Samora

Share this post


Link to post
Share on other sites

I am looking to use these hotkeys in the 1besttrader competition starting soon. There are a few requirements such as having no more than $50,000 in any one security and a max share size of 2500. Does anyone know a way to configure the hotkeys to take the most buying power possible while staying within these two restrictions?

Share this post


Link to post
Share on other sites

Has anyone tried to replicate Kyle's hotkey on other platforms? 

I trade on tradestation. Although I'd prefer to trade on DAS, I get free commissions through tradestation's salutes program. That's a big deal for my small account. 

If anyone has any info on creating this hotkey on tradestation's platform, that would be extremely helpful for me. 

Thanks

 

Troy H.

Share this post


Link to post
Share on other sites

I use the following commands in SIM and trying to figure out what is going on. 

Double click to trade and Montage > Style > Stop Order is set

Long
image.thumb.png.a0e502b5387ad753b76275724adc520c.png

StopPrice=Price-0.01;DefShare=BP*0.97;Share=DefShare*0.167*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.03;TIF=DAY+;BUY=Send;DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

I use this Long command (please ignore the entry, its on purpose). i was expecting the stop loss will be triggered but that is not the case. can some body explain what is going on?
 

Short:
StopPrice=Price+0.01;DefShare=BP*0.97;Share=DefShare*0.167*Price*0.01;Price=Price-Bid+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=bid-0.03;TIF=DAY+;SELL=Send;DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

I use this short command (please ignore the entry, its on purpose). i was expecting the stop loss will be triggered but that is not the case. can some body explain what is going on?
image.thumb.png.a2447a1acc39e01d1e81e1ca5c590c37.png
 

image.png

image.png

Share this post


Link to post
Share on other sites

Hello friends, anyone using CMEG with the BBT promo code AND Kyle's hotkey; would you be kind enough to copy me your hotkey config. I am kinda confused with which ROUTE to use. I have read somewhere that LAMP route is not use anymore; but I am not sure. Thank you for any answer!

  • Like 1

Share this post


Link to post
Share on other sites
On 7/5/2020 at 5:50 AM, Benjamin Tang said:

I use this short command (please ignore the entry, its on purpose). i was expecting the stop loss will be triggered but that is not the case. can some body explain what is going on?

Do you ever see any open order in the Orders window to the left?

Share this post


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

Hello friends, anyone using CMEG with the BBT promo code AND Kyle's hotkey; would you be kind enough to copy me your hotkey config. I am kinda confused with which ROUTE to use. I have read somewhere that LAMP route is not use anymore; but I am not sure. Thank you for any answer!

I asked Mike, if using the LAMP route is simply using LIMIT in the hotkeys:

Quote

Yes as long as they have sent an email to CMEG and received confirmation from them all their orders during market hours will be on the lamp route.

 

Share this post


Link to post
Share on other sites
On 6/17/2020 at 5:49 AM, [email protected] said:

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+;

 

For the STOP routing / StopType, use LIMIT or MARKET (preferably market, it's safer). The reason is that these are routed differently, even with IBCO. If you manually set it up in montage you'll notice the STOP Route type doesn't have SMRTM or SMRTL. So when a hotkey tries to populate that, it can't find a match and fails.

Try this one for IB:

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+;

 

 

On 6/19/2020 at 7:01 PM, forkey said:

I am currently clicking the chart for each additional entry and sometimes I want to manage the adds completely independently from the first entry.  In a perfect world, each entry will have its own stop loss (and ideally its own target too with a 6:1 range - my second question) and can be therefore independently managed. 

Correct.

Here is the current long entry with a 0.35% risk (i hit this up to 5 times maximum depending on the setup and how tight I can get). 

;CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*1;Share=DefShare*0.3*Price*0.0035;Price=Ask-Price+0;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=ARCAL;Price=Bid;TIF=DAY+; Account=ABC123;BUY=Send;DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

___________________________________

So the above includes the stop but not the target.  Once I get in the trade and it starts working, I will put out a 4:1 range with a stop using this:

;CXL ALLSYMB;ROUTE=STOP;StopType=Range;LowPrice=Price;HighPrice=AvgCost-Price*5+AvgCost;Share=Pos;TIF=DAY+;SELL=Send

_________________________________

Is it possible to simply conjoin the first hotkey's entry+stop and the second hotkey's target as a single hotkey?


Is it possible to tier in with my the first hotkey and then when clicking it again (after clicking chart to indicate the next entry's stop) I am in with tier2 and it has its own stop (and target? - ideally).?

 

Thanks so much @Justin

 

 

If I'm understanding this correctly, you want to have multiple risk positions (e.g. multiple "strategies" in play)?

So for example, you enter a stock at $20.00, with a $19.80 stop price and qty 50. The stock moves in your favor and sets up for another strategy, and you add at $21.00, with another stop at $20.50 and a qty of (example) 50. Your position / open orders looks like:

STOCK, Qty: 100, $20.50(avgcost)
OPEN STOP, $19.80, Qty: 50
OPEN STOP, $20.50, Qty: 50

Something like that?

 

On 6/27/2020 at 1:39 PM, Fernando Samora said:

Hey all, hope someone can help me out. Im trying the hotkets and they work GREAT. 

I do have one issue and would like some help: When im long in a position and scale out I can reclick my Long range order hotkey:

  • (CXL  ALLSYMB; Route=Limit;Share=Pos;Price=AvgCost-StopPrice;Price=Price*3;Price=Price+AvgCost;Price=Round2;Route=Stop;StopType=Range;LowPrice=StopPrice;HighPrice=Price;TIF=DAY+;SELL=Send;ROUTE=LIMIT)

and it re calculates the remaining shares to reset the new share number with the same stop range....

However, when im in a short position and i click the same scale out hotkey and hitting the Short Range Order:

 

  • (CXL ALLSYMB; Route=Limit;Share=Pos;Price=StopPrice-AvgCost;Price=Price*2;Price=AvgCost-Price;Price=Round2;Route=Stop;StopType=Range;HighPrice=StopPrice;LowPrice=Price;TIF=DAY+;BUY=Send;ROUTE=LIMIT)

it cancels the range order without getting into a new one. 

 

I'll have to remember to try this tomorrow, I have an idea on what might be causing an issue but I need to test it.

 

On 7/5/2020 at 5:50 AM, Benjamin Tang said:

I use the following commands in SIM and trying to figure out what is going on. 

Double click to trade and Montage > Style > Stop Order is set

Long
image.thumb.png.a0e502b5387ad753b76275724adc520c.png

StopPrice=Price-0.01;DefShare=BP*0.97;Share=DefShare*0.167*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.03;TIF=DAY+;BUY=Send;DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

I use this Long command (please ignore the entry, its on purpose). i was expecting the stop loss will be triggered but that is not the case. can some body explain what is going on?
 

Short:
StopPrice=Price+0.01;DefShare=BP*0.97;Share=DefShare*0.167*Price*0.01;Price=Price-Bid+0.01;SShare=Share/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=bid-0.03;TIF=DAY+;SELL=Send;DefShare=100;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice+0.3 ACT:BUY STOPPRICE:StopPrice QTY:Pos TIF:DAY+;

I use this short command (please ignore the entry, its on purpose). i was expecting the stop loss will be triggered but that is not the case. can some body explain what is going on?
image.thumb.png.a2447a1acc39e01d1e81e1ca5c590c37.png
 

image.png

image.png

Few things, can you confirm you have 6:1 leverage (margin) on this account? Default is 4:1. The hotkeys you pasted are setup for 6:1 and a mismatch in leverage to the account can cause anomalies. Second, can you add a Trigger Order window and try again, see if a trigger order is being created? It's under Main Menu -> Trade -> Trigger Order .... this window works like the Open Orders window and will populate the status of active (not triggered) TO's.

3 hours ago, Seydou Dia said:

Hello friends, anyone using CMEG with the BBT promo code AND Kyle's hotkey; would you be kind enough to copy me your hotkey config. I am kinda confused with which ROUTE to use. I have read somewhere that LAMP route is not use anymore; but I am not sure. Thank you for any answer!

If you find a working setup for CMEG, please do post your config so I can roll it in as the recommended. CMEG is the odd-duck, as they have certain things  that mess with the hotkeys.

I've heard some users have luck setting the Time in Force to --> TIF=DAY;   instead of the default TIF=DAY+. Apparently that solves some rejection issues with them.

 

  • 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
17 hours ago, Justin said:

Do you ever see any open order in the Orders window to the left?

Hi Justin,

No open orders at all (hope you can see it on one of the screenshot from my original post)

Share this post


Link to post
Share on other sites
27 minutes ago, Benjamin Tang said:

Hi Justin,

No open orders at all (hope you can see it on one of the screenshot from my original post)

Hey, yeah I saw - I was just wondering if you even saw it flash and disappear right away?

Also did you see Kyle's comment?

16 hours ago, KyleK29 said:

Few things, can you confirm you have 6:1 leverage (margin) on this account? Default is 4:1. The hotkeys you pasted are setup for 6:1 and a mismatch in leverage to the account can cause anomalies. Second, can you add a Trigger Order window and try again, see if a trigger order is being created? It's under Main Menu -> Trade -> Trigger Order .... this window works like the Open Orders window and will populate the status of active (not triggered) TO's.

 

  • Thanks 1

Share this post


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

Few things, can you confirm you have 6:1 leverage (margin) on this account? Default is 4:1. The hotkeys you pasted are setup for 6:1 and a mismatch in leverage to the account can cause anomalies. Second, can you add a Trigger Order window and try again, see if a trigger order is being created? It's under Main Menu -> Trade -> Trigger Order .... this window works like the Open Orders window and will populate the status of active (not triggered) TO's.

Interesting, Didnt know my hotkeys are based on 6:1.  my leverage in SIM is currently at 4:1.

can you tell me what i need to change in my Hotkey setup?

Share this post


Link to post
Share on other sites
18 minutes ago, Benjamin Tang said:

Interesting, Didnt know my hotkeys are based on 6:1.  my leverage in SIM is currently at 4:1.

can you tell me what i need to change in my Hotkey setup?

I don't recommend doing it manually. Here's what the Configurator put out for what I believe is your settings.


LONG - % Equity Risk Version, 1%, DAS DEMO Broker, 4:1 Margin:

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.03;TIF=DAY+;BUY=Send;DefShare=400;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.3 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;


SHORT - % Equity Risk Version, 1%, DAS DEMO Broker, 4:1 Margin:

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

If these don't work for you, you'll need to go into DAS -> Main Menu (Top Bar) -> Setup -> Other Configuration, check the option "Don't Delete History Logs" and "Log Debug Message". Close and restart DAS.  Go test the hotkeys in a trade where it fails. Then PM me the content of the log file in the C:\DAS Trader Pro\LOG\ directory, it should be named for the date, e.g. YYMMDDLog.txt --> 200707Log.txt would be today.

  • Like 1

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

Share this post


Link to post
Share on other sites
On 9/5/2019 at 9:46 AM, KyleK29 said:

Can you post the hotkey command(s) that you are using? And / or did you create them using the configuration Excel sheet yourself or did someone send them to you? I find that the ones users pass around tend to fail because a lot of messaging programs strip out (sanitize) the "*" in the command which causes calculation issues.

 

Hello - I am having the same problem. Every time that I try to send an order, the prompt "set default share to 400" pops up on my montage. I am not sure how to fix this? I got my script from Thor's dropbox in the chatroom. 

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.