Accumulate and average exit

Forums ProRealTime English forum ProOrder support Accumulate and average exit

Viewing 4 posts - 1 through 4 (of 4 total)
  • #12751

    Hi Everyone,

    I’m trying to achieve something I believe is very simple but I am having a few troubles. What I would like is an average exit price of different entry prices and quantities when I set accumulate to true but cant seem to get it to work as expected. After reading as much as possible it seems profit target is meant to do this but it doesnt. I have tried using other commands in code such as positionprice but with no success. Any help would be great.

    Many Thanks

    Carter

    #12764

    Hi,

    Do you mean you need to set an exit price for the whole basket in relation to their mean open price?

    POSITIONPRICE give you the average open price of the whole open orders. If you need to exit them at 5 points from it, you have to set a STOP or a LIMIT order at that price.

    #12795

    Hi Nicolas,

    Thank you for your reply, please see some code below for example. I’m not sure of the correct syntax to achieve this. Yes I want to achieve an average of the whole basket of orders.

    Thanks

    Carter

     

    #12797

    I don’t know about the entry logic, but the exit one seems ok to me. You should adapt your exitprice variable to any instrument like this:

     

     

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

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