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.

Aiman

Most frequently used hotkeys

Recommended Posts

apperformance
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
peterB

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

[[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.