Problems with partial closure/breakeven

Forums ProRealTime English forum ProOrder support Problems with partial closure/breakeven

Viewing 6 posts - 1 through 6 (of 6 total)
  • #71354

    Today I have been messing around with a new strategy and decided to write it as two strategies – one that closes the position when the profit target is reached and another that moves the stop to break even when the profit target is reached and then closes the trade at a higher profit level. The idea is run both and simulate partially closing a position for a profit and then let the second half try to hopefully make more money for no risk.

    All is working fine except for the fact that the strategies get out of sync. All the while the second break even strategy has a position open it is no longer able to do the same for any other positions when new ones arrive and are opened and closed by the first strategy. Some of the positions are accumulated positions opened on several different bars and so if the break even strategy closes its position mid way through the first strategies accumulating process then it starts buying mid way through the position accumulation which then puts its stop loss levels and take profit levels out of sync with the first strategy.

    I’ve been racking what is left of my brains for a solution but not come up with one except wait for PRT to introduce partial closure. Even then I wonder how PRT will deal with this issue. I guess I could just manually monitor it and open a breakeven strategy every time a breakeven position is running to ensure that if a new position opens it will be covered by both strategies. I would then have to close the first break even strategy once it has closed out its position. That all sounds a bit manual for auto-trading! If anyone has any other thoughts then please post them here.

    Incidentally I don’t see much benefit of the break even strategy over the other one at the moment – in fact the non-break even strategy has the benefit of you spending less time in the market and very similar level of profit. So I may be trying to do something that is ultimately unnecessary. Your thoughts on break-even strategies also welcome.

    #71355

    Partial closure will not split orders into different ones with different management for each of them. All positions are still a whole big one, so putting a stoploss level above a TRADEPRICE will be moved if you add new orders after that.

    To be clear:

    1/ buying 10 contracts at time X

    2/ close 50% because in profit of 100 points

    3/ you have 5 contracts at market

    4/ close everything at time Y

    is exactly the same as buying 5 contracts at time X and close them at time Y, jumping from point 1. to 4. (apart from the 5*100 points of gain of course).

    (EDIT/ this topic is the 6000th one, congratulations, you won a free hug 😉 )

    #71356

    The way that I have coded the break even strategy is so that it does not open further positions once the break even stop loss has been set. I wanted to manage each set of trades individually. Adding to the position later just adds more risk and the strategy has different levels of stop loss and take profit at different stages of the open positions life – so opening a new position means having the incorrect stops and take profit for the running break even trade if a new position is opened.

    #71357

    Sorry – forgot to thank you for the hug! Congratulations on reaching such a milestone… roll on 7000 when I win a million!

    #71359

    Orders can’t be managed individually, even with partial closure. You can only play with POSITIONPRICE which is the average open price of the whole opened orders.

    #71360

    The strategy is a mean reversal one and it is very good at getting in at or around the bottom of a dip so it opens a few positions around there and then works with the PositionPrice. Initially it looks for a rapid rebound but if that does not happen then it looks for a small profit. If I let it continue trading then I just end up averaging up or averaging down which I do not want – nor can I afford!

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

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