Closing trades on weighted average price

Forums ProRealTime English forum ProOrder support Closing trades on weighted average price

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

    Hi,

    I’m trying to correct the following code to close all positions on the weighted average price if there is more than one trade open.  If only one trade is open it will close on the indicator signal.  Any help would be greatly appreciated.

     

    #204262

    In order to close the orders basket at average price, add this code at the top of the strategy:

    #204304

    Thanks for the reply. I’ve added the suggestion to the code but unfortunately it still seems to be closing only on the indicator criteria being met and not the average weighted price when there is more than one trade. Do you know what is causing this?

    Many thanks in advance.

    #204308

    This is the code i’m using, seems ok:

    The white line on the price chart is where the orders should close when accumulating.

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