Partial closure zero quantity exits

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #74092 quote
    Vonasi
    Moderator
    Master

    I’m preparing myself for when the soon to be released partial closure arrives. I have a strategy that opens one position of a calculated size and then closes it in several separate and equal value positions.

    I notice that I get a lot of zero value exits. I put this down to rounding of odd quantities at first but then I noticed that it happens even if the total position size opened can be divided with no remainder left. In the image a position of 9.60 is opened and then closed in ten steps of 0.96 and then a zero quantity exit appears.

    [attachment file=74093]

    Can anyone explain these zero quantity exits?

    Screenshot_2-5.png Screenshot_2-5.png
    #74237 quote
    Vonasi
    Moderator
    Master

    Although the first question has not found an answer yet I have a second. I have not manually traded for ages and even then I rarely did partial closures of a position. So can someone please remind me if there is a maximum position size expected by IG when doing a partial closure of a position?

    #74692 quote
    Nicolas
    Keymaster
    Master

    I can’t replicate the 0 quantity closure.

    I used this code as for testing:

    if not onmarket then 
     buy 9.6 shares at market 
    endif 
    
    if barindex-lastbar>2 then 
     sell 0.96 shares at market 
     lastbar=barindex
    endif

    The 0 closure you are pointing is not a partial close I think, because it is labelled as a “buy exit” and not a sell exit of your buy position.

    #74697 quote
    Vonasi
    Moderator
    Master

    because it is labelled as a “buy exit” and not a sell exit

    Well spotted! I really should put my glasses on more often! It would be interesting to know why it is there for some trades and not others.

    Also do you know whether IG would expect us to be closing a position size equal or greater than the minimum position size allowed? So for example on a market with minimum position size of 1 I am guessing we cannot do a partial close of 0.5.

    #74699 quote
    Vonasi
    Moderator
    Master

    The code I was using was something like this:

    z = 10
    
    if not onmarket and (my conditions) then
    buy PositionSize * z contracts at market
    endif
    
    if onmarket and (my conditions2) then
    buy PositionSize contracts at market
    endif
    
    For i = 1 to z
    if onmarket and (my exit condition using high[i]) then
    sell positionsize contracts at market
    endif
    next
    #74831 quote
    Vonasi
    Moderator
    Master

    I’ve just been ‘Googling’ and I came across this:

    https://prt.md.it-finance.com/IGIndex/features_complete_10_3/features_complete_10_3_prt_en_GB.phtml?#S-103-2

    [attachment file=74832]

    I’m guessing this is just a case of the advertising arriving before the actual product as I can’t get any strategies with partial closures to run in forward testing on demo yet.

    Screenshot_4-8.png Screenshot_4-8.png
    #74844 quote
    robertogozzi
    Moderator
    Master

    I was notified, a couple of days ago, by IG of new features already available. Partial closing of trades is one of them. I am not aware if it’s only for manual trading.

    #74854 quote
    Vonasi
    Moderator
    Master

    I understand that it is available via PRT for manual trading but I cannot forward test a partial closure auto strategy yet in demo and no one is going to want to put one live without any testing. I have not tested on a live strategy for exactly this reason!

    #74865 quote
    Nicolas
    Keymaster
    Master

    I confirm that it’s still not live for IG accounts. Wait a couple of days please..

    Vonasi thanked this post
    #77676 quote
    Bob Bobulus
    Participant
    New

    I have spoken with IG and they do not seem to know when partial closures will be enabled and have referred me to PRC.  Do we have any updates to when partial closures are being enabled in programmed trading?

    #77750 quote
    Nicolas
    Keymaster
    Master

    I had the information that partial closure for automatic trading is still in heavy test to make sure everything go well, I think that should expect it on live account by September/October. It is already available for manual trading though.

    Vonasi thanked this post
    #85123 quote
    Bob Bobulus
    Participant
    New

    Hi – has anyone had an update on partial closing being enabled for programmed trading?

    Antus thanked this post
    #88314 quote
    Leo
    Participant
    Veteran

    Hi all,
    I asked IG when the option of Partial Closure in  probuilder will be available.
    They reply:
    “might take a long time since there’s only a few people requesting it and we work on a priority list whereas as we implement or initiate a function due to its demand from clients so it may take a while for us to implement this as the demand is too small”
    Then I encourage all of you to request this option and make a bit of pressure.
    Cheers

    #88316 quote
    Nicolas
    Keymaster
    Master

    Thanks Leo to update everyone on this aspect, this is the news I have:

    You can believe me if I say that it is planned already. In fact, some of the December issues with MTF have caused delays on other server-side developments. So, we just have to wait for it.. 🙂

    #93131 quote
    Bob Bobulus
    Participant
    New

    I have contacted IG several times now about this partial closure but no progress.  If anyone has had any joy then please do update.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.

Partial closure zero quantity exits


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Vonasi @vonasi Moderator
Summary

This topic contains 14 replies,
has 5 voices, and was last updated by Bob Bobulus
6 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/22/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...