Jump to content
joeylui

Hotkey to add my position

Recommended Posts

Hi everyone,

I am creating a hotkey to add my position, but my script seems not working.

This hotkey is to add more positions in winning trade. For example, I have 100 shares @$10 and it's now $13, the hotkey is supposed to add shares to make my average cost and stop loss@$11, in other words, I want to get 200 more shares in this trade and put a stop loss at the breakeven.

My script is:

CXL ALLSYMB;ROUTE=LIMIT;Share=Pos*(Price-Avgcost)/(ASK-Price);Price=ASK+0.05;TIF=DAY+;BUY=Send;

After I push this button, there's a notification that part of my scirpt is not able to run, but it still helps me get some more shares, but not the amount I want precisely. Would anyone give me a helping hand to build this script?

Share this post


Link to post
Share on other sites
On 7/4/2021 at 7:43 PM, peterB said:

just use this 

 

Thank you Peter, I couldn't see this post which is exactly I need. I am going to test it today.

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.