Jump to content
Aiman

Most frequently used hotkeys

Recommended Posts

On 4/20/2022 at 10:08 AM, NTrader2021 said:

For the range order script below (eg Long with 2:1 range order), how would I alter them so that if the first profit target is hit, only 1/2 position is sold (so that I can then continue partialing). But if Stop Loss is hit, full position is sold.

Also, if the first profit target is hit, could a stop loss for the remaining position be set at break even?

CXL ALLSYMB;StopPrice=Price-0;DefShare=BP*0.925;Price=Ask-Price+0.00;SShare=20/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+

I've tried altering the bolded red text above to read "POS*0.5" but that affects both sides of the range. I want the profit target to be set at half and the stop loss at the full position size.

 

was anyone able to create this script?

Share this post


Link to post
Share on other sites
Posted (edited)

that would require more complicated hotkeys containing conditional execution (or placing a set of orders) which is possible but it comes with some challenges. I might be covering it in one of my hotkeys posts here
https://traderpeter.substack.com/s/dastrader-hotkeys

feel free to ask there any of your requirements I can use for the use case

Edited by peterB

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.