Got a little problem while programming my strategy, concerning the Profit targets. I want to make them dependent of the last bar. So, let's say, the profit target of a position should always be on the Open of the last bar. I have really no idea, how I should get this.
Can anyone help me?
Thanks in advance
Sepp


My 2 main problems are just that the position is closed when it's hold longer than one bar. Second problem: the "complicated" profit target. My NT is in German, so I can tell you the exact problem, but the Codes are CS0120 and CS0266. Here the excerpt of the code:
Comment