I have been learning the PRT-language for coding a proven system that i currently trade manually on daily bars. I have done a Montecarlo and it should work on other timeframes hence the need for automated trading . I use an ATR-trailing stop and when price during the day touches the ATR-trail it gets out of the position. The problem i have is that ProOrder always exits on the next candle, which is a big problem since it can lead to bigger losses. I know there is no way around this when using the EXIT command, but i think there might be a solution with some sort of adaptive stop (or trailing stop) that changes as the trade progresses, I just haven’t been able to work around it. Please have a look at the attached graph for better understanding.