@trader-philipps said in How can I collect the latest open positions in the event of a trend change?:
So after having a deep thought about it, the algorythm seems to be MathAbs(buylots-selllots)+lots. MathAbs calculates the absolute number, which means 1 and -1 have the absolute number value of 1.
Right?
Yes, it is true there are two methods: The first is to use the absolute value. This is easier and sufficient.
The second method: squaring the number and then putting the root in it, thus eliminating the negative.
I think the first is easier


