Jump to content
KyleK29

DAS - Dynamically Calculate Shares on %Risk or $Risk - Hot Key + Configuration, Updated 12/13, v1.46

Recommended Posts

18 hours ago, Sean S said:

@KyleK29 and @GaryD,

Thank you for the response. Mine is still not working. Below is the link I got from the spread sheet. The share sizes were calculated accurately, just no stop loss order was sent afterwards.

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=ROUTE:STOP;STOPTYPE:MARKET PX:StopPriceSTOPPRICE:StopPrice;Share=Pos;TIF:DAY+ ACT:SELL;

Please assist.

Thank you.

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;

 

Edited by KyleK29

Share this post


Link to post
Share on other sites
On 12/10/2018 at 6:57 PM, Sean S said:

but what if I want to double click the mouse on the chart, and then press the hotkey to set the stop price right there? Can we do that? In that case we can keep changing our stop losses as the price moves.

 

Forgot to answer this yesterday. Yes, it's possible, but it's a tad more involved. It'll be included in a video when I make sure all of the TriggerOrder issues are resolved.

Share this post


Link to post
Share on other sites
On 12/10/2018 at 1:19 PM, Robert H said:

Thanks, Kyle.

I found that even using the dollar risk version, the diminishing available BP was still an issue. I'm assuming this is because it still contains the DefShare=BP*X variable.

I've since switched to a more simple version based on @fjmocke original hotkey:

Price=Ask-Price + 0.02;Share=100 / Price;ROUTE=SMRTL;Price=Ask+0.05;TIF=DAY+;BUY=Send

As we know, the downside is being rejected based on insufficient BP. I manage this by copy/pasting my Withhold BP from DAS to Excel.

For some reason I couldn't get the STOP orders to work at all. Maybe I'm doing something wrong.

On behalf of the BBT Team: thanks again for all the work!

I tested this more today and wasn't able to replicate with the $Risk version, it properly scales, only switching to the BP value when there wasn't enough buying power. If you're willing to help, can you post/answer the following?

- Were you trading LIVE or SIM? 
- Can you post the hotkey command that you're using which is causing the issue?
- DAS Version, Excel Spreadsheet Version
- Can you PM the debug log from DAS Folder --> LOG --> *date-of-test*.txt file -----> You can edit out the top portion that has the server connection / account info if you wish.

Best way for this is to close out DAS, delete the latest log file, reopen DAS, and then try to replicate (in a SIM) account.
 

Also, I did confirm that the trigger orders only work with the following montage styles. They do not work on the default option.

Styles that work:
- Stop Order
- Detail
- Trigger

Styles that don't work:
- DAS Default
- Basic
- OCO [enters, but scaling out doesn't do what you'd expect]
- Option
- Full

Edited by KyleK29

Share this post


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

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, I appreciate you taking your time to help me out here. I have inputted the new link and verified the montage is in "Stop Order" style, but the trigger order still doesn't work.

On the simulator account, the buy/sell orders were executed right away, but there was no stop orders in the "Orders" window.

 

 

 

 

Share this post


Link to post
Share on other sites
On 12/12/2018 at 7:56 AM, ragycpa said:

@GaryD Hi Gary 

I tried changing the Montage style to Stop but the hotkey only sends stop loss on the long side and doesn’t do the same for the short side. Did you experience the hotkey on short and still sent stop order?

@Robert H

19 hours ago, Sean S said:

@KyleK29, I appreciate you taking your time to help me out here. I have inputted the new link and verified the montage is in "Stop Order" style, but the trigger order still doesn't work.

On the simulator account, the buy/sell orders were executed right away, but there was no stop orders in the "Orders" window.

 

 

 

 

 

Guys, I did find a bug in the prior version, for those willing to test (do so in SIM). Can you download the new version 1.45 of the spreadsheet? Then delete the hotkeys you've added in DAS from the prior version [or just create new ones], regenerate in this Excel file, and readd them to DAS. For testing, I'd add them exactly as copied from the sheet at first. Test to make sure they're working correctly, then add any modifications (such as the Focus Montage) you want.

If they still don't work, please do this:
- DAS --> Setup [top menu bar] --> Other Configuration --> Check the "Log debug message" (it's near the top).
- Restart DAS
- Do a few test orders to the long and short side.
- PM me with the following:
- - Your DAS version number --> Help --> About
- - The hotkey file in the DAS main directory, it should be called "Hotkey.htk" --> You may need to add a .txt extension to this to send it through the forum, that's fine. I can reverse it later.
- - The "log" file generated in DAS Main Directory \LOG\ *todays-date*.txt   [default install for SIM/Demo: C:\DASTrader DEMO\LOG ].

Edited by KyleK29

Share this post


Link to post
Share on other sites

Minor revision from the version (1.45) uploaded earlier today, 1.46 now includes more "bidirectional" modifiers (don't need Long / Short specific keys).

Share this post


Link to post
Share on other sites
1 hour ago, ragy said:

@KyleK29 Hi Kyle - Where is the updated excel file?

Should be in original post now, I copied the wrong share link so it was linking the last version.

Share this post


Link to post
Share on other sites
On ‎3‎/‎22‎/‎2018 at 5:29 AM, Robert H said:

@KyleK29, I just realized my DAS version is 5.2.0.31, and you said the system needs to be 5.2.0.34, but when I try to update it, the system shows it is already the most updated version. Why is that?

 

 

Share this post


Link to post
Share on other sites
7 minutes ago, Sean S said:

Re: version

The program only checks the production branch. You have to manually acquire and install the BETA versions. There is a 5.2.0.35 version, but it's a tad tempermental, 0.34 is decent.

I'd recommend backing up your existing DAS install by right-clicking the directory --> Send to Zip. Then install overtop of that directory.

https://www.dastrader.com/download/fixes/DASInstallDEMO.5.2.0.34.exe

^^ This is the SIM/Generic version. There are separate builds for IB/CMEG, if you happen to have them as a broker.

Edited by KyleK29

Share this post


Link to post
Share on other sites

@KyleK29, nice. This seems solved the "Not enough buying power" problem as well. Much Appreciated.

Going back to my original question. How do I set up a hotkey enter a stop loss order with the trigger price I double clicked on the chart?

On ‎12‎/‎12‎/‎2018 at 11:48 AM, KyleK29 said:

Forgot to answer this yesterday. Yes, it's possible, but it's a tad more involved. It'll be included in a video when I make sure all of the TriggerOrder issues are resolved.

 

Share this post


Link to post
Share on other sites

thank you @KyleK29 this has been a huge help to my trading! i was wondering if you know why sometimes the price double clicked in the chart shows up in the montage and sometimes it doesn't? the hotkeys work either way it just seems almost random if the price is displayed in the montage or not. thanks again!!

Share this post


Link to post
Share on other sites
On 12/14/2018 at 8:03 PM, Sean S said:

@KyleK29, nice. This seems solved the "Not enough buying power" problem as well. Much Appreciated.

Going back to my original question. How do I set up a hotkey enter a stop loss order with the trigger price I double clicked on the chart?

 

It's a tad more involved (easier to mess up and leave yourself open to error) and best explained in a video. Essentially, you have to do it in one of a few ways - a replace order or you have to cancel all pending orders for that symbol, both have their tradeoffs. DAS does not currently have a hot key for grabbing the active stop of a symbol.

I've included the hotkeys for this in the 1.46 spreadsheet (under extras), but instructions will follow when I do a video on it all.

 

20 hours ago, Jramosent said:

Anyway you can do a how to video on how to set this all up, tips and tricks?

Yes, I'll be doing a video on the latest version once I make sure I've gotten everything corrected in this. I think there was one other user with issues, so if it's all good for him now, I'll do it before I leave on vacation.

 

1 hour ago, Mark D. said:

thank you @KyleK29 this has been a huge help to my trading! i was wondering if you know why sometimes the price double clicked in the chart shows up in the montage and sometimes it doesn't? the hotkeys work either way it just seems almost random if the price is displayed in the montage or not. thanks again!!

Technically, the price you double click in the chart should show up in the montage until you fire the hotkey. It's then overwritten by the order price (e.g. ask + .05 cents). There's a few other things that can cause DAS to blank the box or fill it with a L1 price.

If you want the price you initially clicked, you can store it by putting this at the beginning of the hotkey (if it's not already there).

StopPrice = Price;

That'll store it in the StopPrice variable which can be viewed on the montage if you use the "Stop Order" display style.

 

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

×

Important Information

By using this site, you agree to our Terms of Use, Privacy Policy and use of 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..