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 having trouble getting the hotkey to work. It keeps saying can't get valid price.  It puts a number in the montage that isn't rounded to the nearest 2 digit cents. Is that problem? I've tried putting price=round2 in the formula but still can't  get it to work. Any ideas? 

Share this post


Link to post
Share on other sites

Hello and sorry if this has been asked before but I haven't been able to find an answer.

 

I have a pretty typical hotkey, double click where I want to set my stop, $20 fixed risk, works perfectly. The only issue I have is that if I add to an existing position I get a second stop order for the total number of shares, instead of the just the number of shares that I added. So, let's say I'm long 100 shares with a stop loss at 95.50. I take another entry for 50 shares but this time with the stop at 95.70. Now I have two stops, one for 100 shares at 95.50, and one for 150 shares at 95.70. I'm wondering how I can modify the hotkey so that the second stop will be for just 50 shares at 95.70. Here's the script:

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

 

I already tried changing the QTY from Pos to Shares or SShares. The former doesn't change anything and the latter just doesn't place a stop order at all. 

 

Share this post


Link to post
Share on other sites

Thanks Peter! I tried it with Share again but still no luck. I can't think of any other logical thing that would work in Qty so I guess I'll just have to live with changing the stops manually.

Share this post


Link to post
Share on other sites

EDIT: I figured it out. I have two hotkeys now. One that buys $10,000 worth of stock and one that will set a range order stop  at 1% loss and then multiple profit targets. 

 

 

 

7 hours ago, peterB said:

check montage style and double click to trade on the chart as mentioned in the cery first post

I do have double click to trade on. 241.913 is what popped up after running the script, so thats why I think its some kind of rounding error

 

1994276162_2022-02-1806_05_26-DASTraderProPoweredbyDASTrader_com.png.8cf0502514159ddfe16ae0b5733d425d.png

Edited by Greg

Share this post


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

post your hotkey

StopPrice=Price-0.01;DefShare=BP*0.95;Price=Ask-Price+0.01;SShare=20/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=150;TriggerOrder=RT:STOP STOPTYPE:MARKET PX:StopPrice-0.1 ACT:SELL STOPPRICE:StopPrice QTY:Share TIF:DAY+;

Share this post


Link to post
Share on other sites

Is there a way to automatically set the value of VWAP as a stop point without having to double click it. Or is there a way to even hit a hotkey and have it place the value of VWAP in the montage? 

Share this post


Link to post
Share on other sites

Dear BBT Team,

first I want to thank you for those hotkeys, really helpful tool!

I saw William video on Youtube in order to set my hot buttons with 3:1 risk reward with stop loss and take profit all in one.

I'm using Cobra Trading with DAS but the hotkey work with the take profit but does notput the stop loss in place.

I also don't see the stop and take profit indication on the chart, how can fix also this matter?

Here below one example short and one example long. Here I risk 500$ with

 

SHORT 500 R 3:1 RR

CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=500/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=IEXGL;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=200;Price=StopPrice-Bid*3;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+

 

LONG 500 R 3:1 RR

 

CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=500/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=IEXGL;Price= Ask+0.05;TIF=DAY+;BUY=Send;DefShare=200;Price=Ask-StopPrice*3+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+

Already set the montage with stop order, changed SMRTL with IEXGL (route), set double click to trade

What I am missing in order to have the hotkey correctly set and ready to be used?

 

Thanks for your help!

 

 

 

 

Share this post


Link to post
Share on other sites

Hi Peter,

thanks for your reply.

I have sent them an email, I will update you as soon as possible.

If they don't support that orders, there are alternatives? maybe similar hotkeys?

 

thanks

 

Jacopo

Share this post


Link to post
Share on other sites

Thanks Peter.

Can you please provide me the hotkey (i've written it a couple of posts before, both short and long) with both stop loss and take profit 3:1 set without OCO order? will be ok for me to cancel manually the orders

Actually I cannot use those hotkeys at all, and it's absolutely important for me to have them set

Everything similar to the hotkeys I've posted will be ok in order to use it, without them I risk too much, not so good to manage positions without stop loss and take profit set

 

thanks for your help!!

 

Jacopo

Share this post


Link to post
Share on other sites

Thank you for this great script! I'm using it for my long position with a fixed $ risk. I was however wondering if there was a way to reject / not send the order if the number of shares I can afford are under 100? Sometimes in the heat of the moment I get in only to realise how far my actual stop was and the position size just wasn't worth it

Thank you

Jono 

Share this post


Link to post
Share on other sites

Hi Peter,

I spoke both with DAS and Cobra Trading. The two hotkeys I posted are actually correct and working.

Cobra Trading and range orders works perfectly together with DAS.

My Issue was chart related and not hotkey related, now solved.

Thanks for your help! Hopefully those posts can help future Cobra Trading users in order to start using those incredible hotkeys

  • Like 1

Share this post


Link to post
Share on other sites

Hi all, 

I was just wondering if there is a way to set a global constant for the DAS scripts.

I'm using kyle hotkeys and they work awesome, but say I want to reduce or increase my size. 

Is there a way I can do it in one place (the global variable) and that would affect all hotkeys, or would I have to modify all scripts.

Thanks

  • Like 1

-----

[email protected]

Twitter: @tradeicio

Share this post


Link to post
Share on other sites

Not sure if some of the listed bugs still occur, or how consistent these hotkey scripts work, but I'm thinking it might make sense to just use 2 separate hotkeys that are simpler, one to just get the sizing right for the risk, then one to set the stop (you can pretty easily set up a stop loss order with a hotkey that allows you to click on chart and just set it for whole position after you've entered.

 

Using fjmocke's scripts from the post linked in op here: (the red underline is the $ amount you want to risk if stock hits this level), although I personall

Buy

Price=Ask-Price + 0.01;Share=125 / Price;ROUTE=SMRTL;Price=Ask+0.10;TIF=DAY+;BUY=Send

Sell

Price=Price-Bid + 0.01;Share=125 / Price;ROUTE=SMRTL;Price=Bid-0.10;TIF=DAY+;SELL=Send

 

then you can simply use Account=#######;Route=MARKET;Share=Pos;TIF=Day;NewOrder StopMarket  (then obviously put whatever type of market order you want to use in here, I like to use LAMPM on cobra to save money on ECN)

 

 

I set this up on weekend so I couldn't test, but is there any reason this shouldn't work? Sure it's 2 hotkeys and makes it into 2 steps, but seems more fool/bug proof. Any replies much appreciated!

Share this post


Link to post
Share on other sites

Hi,

The answer to my question is probably somewhere in the forum but I wasn't able to find it yet (after 2 days of searching and testing various options).

I would just want a very simple "on the chart Take profit target", please. In the Kyle's file there is  "price target" based on R:R but I get a "script invalid operator" in DAS (this function is not quite what I would want but at least, this would have been a first step).

My starting point is a market order with a stop loss on chart that works great :

StopPrice=Price-0.01;DefShare=BP*0.97;Share=DefShare*0.167*Price*0.005;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;

Then I would just want to double click on the chart to set my Profit Target based on technical levels (25% of the position for example) . That simple. Sorry I just struggle with this simple key.

Thanks for your help.

Share this post


Link to post
Share on other sites

Hi Peter,

Im' not sure I understand what you mean.

Currently, what I was up to was :

1/ Market order with a stop loss via Kyle's script in a first hotkey. OK, this one works fine.

2/ I would have liked to set up  a second hotkey for a Take profit via double clicking on the chart for X% of the position, regardless of the stop loss and R:R.

It is not possible this way ?

If not, OK, I'll go for a range hotkey, instead.

Thanks Peter.

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.