V11 Partial close of orders

Forums ProRealTime English forum ProOrder support V11 Partial close of orders

Viewing 13 posts - 1 through 13 (of 13 total)
  • #137910

    Hi, I think partial closing a position in V11 is still not possible. Is this true or do I make a mistake?

    I want for instance buy 2 contracts and exit 1 very quickly bring the stoploss to break even and let the other contact run.

    If it is really not there, when can it be expected?

    Regards, Ronald

     

    #137913

    It is there as a capability in the Platform, but IG don’t allow us to use it!

    #137915

    Hi GraHal, I would already be very happy if I can use it in backtesting on my paper trading account from IB. But that does also not seem to work.

    Do you know if that is correct?

     

    #137916

    Oh so with IB … you can do backtesting of strategy that you want to trade manual … is that correct?

    As we are informed that with IB you cannot do Auto-trading … is that correct?

    #137917

    We can do partial closures on our Demo Accounts on backtest and forward test, but not on Real Live.

     

    #137921

    Thank you for your answers, and very strange it did not work for me. But now I test again…. off course it works.

     

     

    #137924

    GraHal is right, it is possible in any but not yet in live trading.

    Automated trading with Interactive Broker (IB) should be available in a near future as I heard.

    #137925

    Hi Nicolas, that is very good to hear. Thank you.

    #138047

    Interesting news that automated trading should be available with IB soon. Presumably that will be with v.11?

    I suspect that if IB start offering A.T. on v.11 PRT traders will start leaving IG, and IG will then miraculously integrate v.11 with their platform.

    #168940

    Hello,

    Could somebody advice what is the latest status on partial position closing?

    Several topics have been opened over time on this subject and situation is not very clear to me.

    From what I understood it is working with PRT v11 in backtest using code like the one described on

    https://www.prorealcode.com/topic/bollinger-band-coding-help-please/#post-80959

    or

    https://www.prorealcode.com/topic/code-for-partial-close/

    or

    https://www.prorealcode.com/blog/learning/partial-closure-positions-price-retracing-complete-function/

     

    But as of May 2021 is it working with PRT v11 PRO-ORDER (i.e. live trading) with IG and maybe IB?

    Thanks in advance.

    #168941

    Currently Autotrading is only available through IG.

    Partial closing of positions is available with v11.

    To close the whole position you simply use SELL and EXITSHORT with no LotSize (at Market, Stop or Limit). To close it partially you just need to add the quantity you want to close):

    Beware no to leave open a quantity less than the minimum required by the broker.

     

    3 users thanked author for this post.
    #179627

    Ciao robertogozzi,

    Thanks for great input.

    How to make the code only exit half the position once, as i coded now, i exits half and then 1 minute later exit another half which i would like to keep as a runner. My current code:

    SHL = ((Positionprice+(Mystop*2)))
    SellHalfL = (Close > SHL)

    SHS = ((Positionprice+(Mystop*2)))
    SellHalfS = (Close > SHL)

    IF LONGONMARKET THEN
    IF ExitL THEN
    SELL AT MARKET
    elsif SellHalfL THEN
    SELL ClQ CONTRACTS AT MARKET
    elsif StopL THEN
    SELL Positionsize CONTRACTS AT MARKET
    endif
    endif

    IF SHORTONMARKET THEN
    IF ExitS THEN
    EXITSHORT AT MARKET
    elsif SellHalfS THEN
    EXITSHORT Clq CONTRACTS AT MARKET
    elsif StopS THEN
    EXITSHORT Positionsize CONTRACTS AT MARKET
    endif
    endif

     

    Br Anders

     

    #179666

    Try replacing these two lines as follows:

    they should work, unless there is something affecting Positionsize elsewhere in your code.

Viewing 13 posts - 1 through 13 (of 13 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login