How to close a trade automatically?

Forums ProRealTime English forum ProRealTime platform support How to close a trade automatically?

  • This topic has 7 replies, 5 voices, and was last updated 4 years ago by avatarJack.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #115012

    Hi Team, I wonder if it is possible to close a trade automatically at a certain time, or after a certain time when the trade is openend after price hitting a stop order or is manualy opened?

    If this is posible, can somebody teach me where to find this ordertype or how to code this?

    Thank you

    #115013

    It is not possible to mix manual and auto trading. If a position is opened in an auto strategy then you can either close it manually or automatically. If a trade is opened manually then you can only close it manually.

    If you want to open a trade in an auto strategy you can then check if price has dropped to or below a stop level and then set a flag so that you know it has done this. You can record the barindex or time when this occurs and then you then just need to count how much time has passed and/or check if a certain time is achieved and that the flag is set and then close the trade and reset the flag.

    Something like this (not tested):

     

     

    #115014

    It is not possible fdor ProOrder to close trades opened/modified manually.

    You can certainly close automatic trades opened at anytime, after N bars or at a specif TIME (and DATE, eventually) or when a price is hit.

    Since all strategies are executed when a bar closes, you may need to use the MTF support to use a lower TF to be more accurate.

    If your strategy runs on a 4-hour or Daily TF you can use a 1-minute TF to close/update that trade.

    edit: Vonasi is superfast!!!

    #115015

    edit: Vonasi is superfast!!!

    Marcel had to wait 44 minutes for my reply and 59 minutes for yours – I think we both need to up our game!

    1 user thanked author for this post.
    #117289

    Hello,

    Can we do  a stop loss or take profit on a portion of a position with the new prorelatime V11  ? (partial position closing)

    Thanks

    Jack

     

     

    #117292

    Can we do  a stop loss or take profit on a portion of a position with the new prorelatime V11  ? (partial position closing)

    Whether we can do this in live automatic trading or not is purely the decision of the broker.  IG do not allow partial position closing at the moment and so we will all just have to wait until if and when they decide to allow it. The PRT platform is able to function already with partial position closing in back tests but if we put any strategy live it is not allowed as we are then trading both demo and live using the brokers server which does not allow it.

    #117302

    wait until if and when they (IG) decide to allow it.

    Seems daft / not logical (not allowing) as we can do partial closures when manual trading with IG.

    #117364

    What about with Interactive Brokers account + PRT ? are partial closing possible ?

     

     

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

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