Jump to content
tamago168

One Hotkey Executing a Short Order from One Account and a Long Order from Another Account for the Same Stock

Recommended Posts

I mistakenly posted this topic in Tips and Tricks.  I'm reposting my query here, which I think is the right place.

---------------

I'm trading with two accounts, one hedges the other.

I'm looking for a script to send a short order at Bid with $50 risk and 1.08 R target from one account; immediately after this is executed a long order to buy at Ask with $35 risk, SL is short target - $0.02, profit target is short SL - $0.02.

Currently, I'm using the following script for the short order part:

CXL ALLSYMB;ACCOUNT=Uxxxxx;StopPrice=Price+0;DefShare=BP*0.925;Price=Price-Bid+0.00;SShare=50/Price;Share=DefShare-SShare;DefShare=DefShare+SShare;SShare=Share;Sshare=DefShare-SShare;Share=0.5*SShare;TogSShare;ROUTE=SMRTL;Price=Bid-0.05;TIF=DAY+;SELL=Send;DefShare=100;Price=StopPrice-Bid*1.08;Price=Round2;Price=Bid-Price;TriggerOrder=RT:STOP STOPTYPE:RANGE LowPrice:Price HighPrice:StopPrice ACT:BUY QTY:POS TIF:DAY+

When the short order is executed, I click another hotkey for the long order.  The issue of having to click two separate hotkeys is that after the short order is filled, I have to select SL for the long, then hit the long hotkey.  In the meantime, if the price goes down, it's in my favor.  But if the price goes up, I cannot get a good fill on the long order.  Therefore, I'd like to have one hotkey only to execute both orders at the same time (of course the short order HAS TO be filled first).

If this is possible, it'll help a lot.  Thanks!

 

 

Share this post


Link to post
Share on other sites
On 9/4/2021 at 10:47 AM, peterB said:

impossible within DAS.

theoretically possible with some external API calls

i am thinking of what reasonable reason can there be for you to enter a trade against yourself

This is for hedging.  For instance, if I go short, I'm going long with 70% of short share size.  So, if the short is going against me, I'm losing small.  If it goes in my direction, I can hold longer by stretching my initial target to more aggressive ones (of course I still need to constantly evaluate price actions.)  This enables me to trade without much stress. 

Loss is limited and potential gain is enormous. 

Share this post


Link to post
Share on other sites

In terms of "hedging" it only really makes sense if you are betting on two supposedly correlated symbols.  

AKA longing one symbol and shorting a different symbol to reduce exposure to market conditions.

That is, to get beta as close as possible to 0 and make money on the basis of an individual stock's move separate from the overall market.

 

One thing that you technically would be hedging against I suppose is the slippage when you are exiting the entire position.

However, the commissions and fees associated with opening up another position likely will outweigh that difference unless you are entering positions with a rebate and exiting with a rebate.

Maybe it would actually end up helping in that way if I actually did the math, but I'm not sure.

 

  

On 9/7/2021 at 3:19 PM, tamago168 said:

Loss is limited and potential gain is enormous. 

Also as a finish it is important to understand that this is incorrect.

The loss is unlimited in this net-short scenario and the potential gain is the net-short shares you are holding multiplied by the stock price.

 

It's more straight forward "hedge" like this with options. 

(You aren't hedging,  your net-short scenario essentially is a short equal to 30% of whatever your short position size is, since it was "offset" by the 70% long position)  

 

For example, you could open a long CALL with a short shares position.

The long CALL gives you a limited loss on the shares.

Edited by Bailey Nevener

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.