Jump to content

We have moved to Discord. Please click here to join us in the Trading Terminal Discord server.



These forums are read-only.

jpatrick85

DAS Hot Key - 50% and Move Stop to BE

Recommended Posts

jpatrick85

Hi all, maybe I am missing something simple here.  I have a target price that I double click, and once the price hits that target, I want to sell 50% and move existing stop to breakeven.

I was thinking something like below, but the problem is that the old stops stay there in this scenario.  Once the first stop is triggered, I want to cancel all existing stops and then move stop to BE.  Any suggestions?

Route=Stop;StopType=MARKET;STOPPRICE=Price;Share=Pos*.5;TIF=DAY;Send=Reverse;TriggerOrder=RT:STOP STOPTYPE:MARKET STOPPRICE:AvgCost ACT:SELL QTY:POS TIF:DAY+;

Thanks for the help!

Share this post


Link to post
Share on other sites
RussWilliamL

You could make the first order a Range Stop order, but you would need one script for LONG positions, and a different one for SHORT positions.

After you are in a position, double click your profit target then activate the hotkey.  Once the Range Stop is in place, move your StopLoss portion of the Range Order to where you choose.

Try these (IN SIM FIRST!!) and see if they do what you want. (if you want a different risk to reward ratio, you can  change the /1 to a /2 or /3 or whatever you choose)

FOR A LONG POSITION

CXL ALLSYMB;
Route=STOP;
StopPrice=Price-AvgCost/1;
StopType=RangeMKT;
HighPrice=Price;
LowPrice=AvgCost-StopPrice;
Share=POS*.5;
TIF=DAY;
Sell=Send;
TriggerOrder=RT:STOP StopType:Market StopPrice:AvgCost ACT:Sell QTY:POS TIF:DAY;
 

 

FOR A SHORT POSITION

CXL ALLSYMB;
Route=STOP;
StopPrice=AvgCost-Price/1;
StopType=RangeMKT;
HighPrice=AvgCost+StopPrice;
LowPrice=Price;
Share=POS*.5;
TIF=DAY;
Buy=Send;
TriggerOrder=RT:STOP StopType:Market StopPrice:AvgCost ACT:BUY QTY:POS TIF:DAY;

 

Edited by RussWilliamL

Share this post


Link to post
Share on other sites
jpatrick85

Thanks so much Russ.  As I was reviewing this, I had a question though.  Once I am in a position and triggered the hot key, would this change my original stop to only sell half of the position instead of stopping me out completely?  The range order that is being set after cancelling the original order now has 50% to sell at the top and bottom of the range.  I would need it to sell 50% at the top but 100% at the bottom since this would be my full stopout point.  Hope that makes sense!

Share this post


Link to post
Share on other sites
RussWilliamL

If the StopLoss was hit, this order should exit 50% of your position then send the Trigger order for the remainder at AvgCost which would then immediately execute to exit your position

Edited by RussWilliamL
  • Thanks 1

Share this post


Link to post
Share on other sites
jpatrick85

That makes complete sense, thank you!

  • Like 1

Share this post


Link to post
Share on other sites
meatskin2000

Hey, Russ.    I like to use the analogy get in a trade and walk away.  The question I have for you, do you know if you can get a script to move to b/e after getting to first target. Similar to the first question, Patrick asked. But your response,  I think you was saying you have to move your stop manually and not auto.   That's what I have to do now, I want to be able to get in a trade, auto move stop to b/e at 1R then get out at 3R or b/e. Thx in advance.  

Share this post


Link to post
Share on other sites
RussWilliamL
57 minutes ago, meatskin2000 said:

Hey, Russ.    I like to use the analogy get in a trade and walk away.  The question I have for you, do you know if you can get a script to move to b/e after getting to first target. Similar to the first question, Patrick asked. But your response,  I think you was saying you have to move your stop manually and not auto.   That's what I have to do now, I want to be able to get in a trade, auto move stop to b/e at 1R then get out at 3R or b/e. Thx in advance.  

Heya,

I replied to your new post about this (after i got an email notification that you'd replied here, otherwise i wouldn't have seen it)

Edited by RussWilliamL

Share this post


Link to post
Share on other sites

[[Template core/front/global/mobileNavigation is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]

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.