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.

JDen

Script for automatically moving stoploss to breakeven when in profit

Recommended Posts

JDen

Hello everyone,

I am aware that DAS provides hotkeys for moving a stoploss to breakeven. However, these hotkeys require that I manually press the key combination that triggers the action.

Is it possible to write scripts in DAS such that, upon reaching a certain unrealized PnL in an order, the stoploss is automatically moved to breakeven WITHOUT pressing a hotkey? For example, I enter an order and when I am in 100$ profit I want the stoploss to go to breakeven automatically without pressing a hotkey.

Such scripts are common in other platforms, but I couldn't find a way or writing them in DAS.

Thanks!

Share this post


Link to post
Share on other sites
JDen

That's a good workaround. Thank you! So the size of the stoploss would be the original position size + 1 in this case. Do you have a sample of such a hotkey by any chance?

Share this post


Link to post
Share on other sites
JDen

Oh I see you mean partially closing 1 share. In this scenario could I have 2 take profits simultaneously in DAS? One of 1 share only for triggering the stoploss and one for the rest of the position.

Share this post


Link to post
Share on other sites
JDen

I see, that's a pity because then you pretty much can't leave the screen unattended for a longer period of time (2-3 hours) as I was intending. Thanks for the reply!

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.