I want to write a code so that the breakeven is equal to the price the position was bought for. The system buys 2 contracts initially and sells one after X number of pips, I want the breakeven of the second contract to be set at the entryprice + 2 pips so the 2nd contract can follow a trailing stop instead.
It sells the 2nd contract based on where to first sell of the 1st contract took place. I want it to be based on the initial postion instead.
I´ve also tried with tradeprice (1) instead of entryprice but that seems to refer to the previous latest trade of selling 1 contract instead of the initial price when I bought the position.
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