Jump to content
JDen

Script for automatically moving stoploss to breakeven when in profit

Recommended Posts

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

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

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

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

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.