NexusFi: Find Your Edge


Home Menu

 





Short sale help


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #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?
Using multiple Versions of the same DLL in MC.Net
MultiCharts
New York Stock Exchange to Launch NYSE Texas
Stocks and ETFs
Ticksandtrades.com
Trading Reviews and Vendors
GANN THEORY DAVID BOWDEN SAFETY IN THE MARKETS
Traders Hideout
Building models w/Neuroshell and Adaptatrade
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tariffs and what comes next...
39 thanks
Looking for advice from seasoned TopSteppers
5 thanks
Lady Vols Primer: Trading Volatility Journal
5 thanks
Converting NT7 indicators to NT8 for free
3 thanks
Big Mike in Ecuador
3 thanks




Last Updated on August 10, 2015


© 2025 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 - Downloads - Top
no new posts