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.
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.
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.
To help us continually offer you the best experience on ProRealCode, we use cookies. By clicking on "Continue" you are agreeing to our use of them. You can also check our "privacy policy" page for more information.Continue