Jump to content
junpasion

Need help to confirm or make correction of the DAS scripts

Recommended Posts

Newbie here and this is my first post.

I got the code from a Google Doc shared by Aiman. This is a hotkey to place a limit for 0.10 above the average cost:

ROUTE=LIMIT;Price=AvgCost+0.10;Share=Pos;TIF=DAY+;SELL=Send;

I would like to modify so that it will suit my needs. Kindly confirm or correct these scripts:

1) I would like to place a limit at 5% above the average cost.

ROUTE=LIMIT;Price=AvgCost*1.05;Share=Pos;TIF=DAY+;SELL=Send;

2) Or to sell half at 5% above the average cost.

ROUTE=LIMIT;Price=AvgCost*1.05;Share=Pos*0.5;TIF=DAY+;SELL=Send;

3) and to go further, sell half at 5% above average plus put an automatic stop loss for the remaining at breakeven.

ROUTE=LIMIT;Price=AvgCost*1.05;Share=Pos*0.5;TIF=DAY+;SELL=Send;ROUTE=STOP;StopType=Market;StopPrice=AvgCost;Share=Pos-share;TIF=GTC;SELL=SEND

Your confirmation/correction is greatly appreciated.

 

Thanks in advance.

Jun Pasion

 

Share this post


Link to post
Share on other sites

Hi Jun,

What are you trying to do with these hotkeys? The hotkeys you listed are used for setting take-profit orders for already open positions (AvgCost variable is only available for an open position).  Are you using them to set take-profit orders?

 

Side tip: Be sure to keep an Open Orders window viewable on your main trading screen at all times so you can see which orders are in the system and don't end up with duplicate Stop Orders. 

Edited by KyleK29

---------------------------------------------------------
Profile / Project Pages (Dynamic Hotkeys, StreamDeck Files, and other contributions are located here)

Share this post


Link to post
Share on other sites

Hi Kyle,

Yes this is when I have a position already.

The third one is most important where I want to sell half of my position at 5% above average price, then automatically put a Stop Loss at breakeven.

Been trying on DAS SIM, it does xecute the sell at 5% above average price, put the sopt loss at breakeven, but does not execute the sell when it hits the stop loss even it was broken.

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.