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 wondering if there is a way to Use the Hotkeys for Price targets based on R multipliers and still have the stop loss from the equalized risk in place. When I try to do this I get an Error. Also, is there a way that when My first target gets hit, lets say 25% of my position gets sold at 1R can I then move my stop order to breakeven based on what I have profited already? Thank you for this as the tool is incredible!

Share this post


Link to post
Share on other sites

@KyleK29 I noticed in the DAS "Configuration Management" window under "New Features-under development" the option to turn-on "Hotkey Advanced Script". Have you had a chance to investigate and is there any information available on how it works? 

Share this post


Link to post
Share on other sites

Hi,

 

in regards to these scripts, specifically the modified ones from William in the below video, the R target price gets put almost at the entry price when ever R > 1.

CXL ALLSYMB;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=100/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=LIMIT;Price=Bid-0.03;TIF=GTC;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:GTC

 

Please see the above script and see the issue reproduced Price=StopPrice-Bid*3; gives the issues but Price=StopPrice-Bid*1; works fine.

 

Thanks

 

Share this post


Link to post
Share on other sites
On 3/31/2023 at 2:12 PM, natelockett said:

is there a way that when My first target gets hit, lets say 25% of my position gets sold at 1R can I then move my stop order to breakeven based on what I have profited already? Thank you for this as the tool is incredible!

In order to do this, you would need two trigger orders.  The first trigger order would be a range stop order for 25% of your position and then the second would be the standard stop order for 75% of your position.  After the Range Stop is triggered, you can manually move the regular stop to break even.

There is a problem with this, though.  If your dynamically calculated position is an odd number of shares, the 25% and 75% would not equal your complete position.  In that case, you would need to manually change one of the orders.

Share this post


Link to post
Share on other sites
On 3/31/2023 at 2:12 PM, natelockett said:

I am wondering if there is a way to Use the Hotkeys for Price targets based on R multipliers and still have the stop loss from the equalized risk in place. When I try to do this I get an Error. 

I'm guessing you are talking about having a Trigger order that is a Range Stop order where the high and low are calculated on R.

Share this post


Link to post
Share on other sites

Hello Kyle,

I downloaded this hot keys but some reason I don't get the exit and target entries for the short script only on the long. I may have messed something up when I copied them, but I can't find it. Nor can I find the document I originally copied them from. Any help would be appreciated. 

Short:

CXLALLSYMB;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=100/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=200;Price=StopPrice-Bid*2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGELowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+

 

Long(Which works fine):

CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=100/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;Price=Ask-StopPrice*2+Ask;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+

 

Thank you

Tom

Share this post


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

TriggerOrder=RT:STOP STOPTYPE:RANGELowPrice:Price

It's only and educated guess but I'd assume the lack of a space here between the RANGE and LowPrice would be causing an issue because it's two different calls. So basically this instead.

TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price

There may be other issues but I'd try that first.

Share this post


Link to post
Share on other sites
Hi All,
 

I hope anyone can help me with this?

So I have a hotkey for a fixed risk of $50:

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.1 ACT:SELL STOPPRICE:StopPrice QTY:Pos TIF:DAY+;ROUTE=LIMIT;
 
My question is, how can I make a hotkey for a stoploss (when by any reason my original stop loss is lost) at that $50 fixed risk level (example: AvgCost=340.83, Shares=250, so 50/250=0.2 > AvgCost-0.2= 338.83= Stoploss fixed risk $50
 
 

Share this post


Link to post
Share on other sites

Hey D-Zitter2, thank you for sending over that excel file. As they stated on the PDF page I had, "Do NOT copy this as there are line breaks that will cause the script not to work"! Was put there for a good reason. However that spread sheet has all of them. 

Much appreciated. 

 

Best Regards, 

Tom

Share this post


Link to post
Share on other sites

Hi , I am trying to using the long or short script in SIM environment on SPY ,  CObra trading with DAS trader Pro latest beta version

long one 

CXL ALLSYMB;
StopPrice=Price;DefShare=BP*0.925;Price=Ask-Price;
SShare=1000/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=200;
Price=Ask-StopPrice*3+Ask;
TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:StopPrice HighPrice:Price ACT:SELL QTY:POS TIF:DAY+;

 

 I Tired various scripts from various places in bearbulltrader. Am i missing any configuration

Either i am get invalid price error

or i get the very high number in the price field  and if it buys it doesn't come with the range order

20:23:00    TriggerLog    Update, F=9, NEWORDER ACC:TR3496 ACT:SELL SYM:SPY EXH:A QTY:POS RT:STOP StopType:RANGE LowPrice:, Untriggered, Canceled, , , mid:15

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.