Closing operations after reaching a daily profit

Forums ProRealTime English forum ProBuilder support Closing operations after reaching a daily profit

Viewing 3 posts - 1 through 3 (of 3 total)
  • #50149

    Dear colleagues,

    Sorry I have been away for a while. I am working on a code with daily operations. It works from 0200h to 2200h, and based on accumulation of contracts.

    I would like to sell or exit short when the profit of all my positions together is above 30 pips. I am using positionperf but obviously something is wrong.

    IF SHORTONMARKET AND COUNTOFPOSITION >= 3 AND positionperf>30*pipsize THEN
    EXITSHORT MARKET
    ENDIF

    Thanks in advance for your help and have a nice weekend.

    Juan

    #50150

    Positionperf gives you the performance of the position in % and not in pips. This is where your code is wrong.

    #50236

    Hi Despair,

    Thanks for the information.

    Regards,

    Juan

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

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