NexusFi: Find Your Edge


Home Menu

 





Short sale help


Discussion in EasyLanguage Programming

Updated
    1. trending_up 1,148 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread

Short sale help

  #1 (permalink)
8manxv
Philadelphia PA
 
Posts: 1 since Aug 2015
Thanks Given: 0
Thanks Received: 0

Hi,
I'm trying to write a code that when a short sale is open for a sufficiently long time and is profitable that the program automatically "rebalances" the position, taking advantage of the increase in equity caused by the short sale profit.

I am currently doing this buy entering a buy to cover order for the entire position, then re-shorting the new larger number of shares. This is fine except for when shares are not available where it closes the position and is unable to re-short.

1) Is there a way to check the short inventory through easylanguage? (Using IB)
2) I've tried to only short the "profit' equity (i.e. if I had 100 shares short, the position profit gave me enough new equity for 10 shares, so I would short an additional 10 shares) but using functions under the GetPosition___ family don't seem to work.

Any ideas would be very appreciated!
Thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Quantum physics & Trading dynamics
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
 




Last Updated on August 10, 2015


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts