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.
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