@AlphaOmega
As I mentioned earlier, there are several ways to achieve the same result with fxDreema. This is just an option and, of course, the project can be optimized to get a more efficient code. Here it is the long trading side:

https://fxdreema.com/shared/xblYjK0uc
0_1598858539003_Profit Math.mq5



Whatever the condition is true to enter at market, that piece of code will open a trade for every new bar with the original take profit value (100 pips in the exxample). When a child trade opens, it calculates the take profit average by getting which is the take profit in pips of the child trade using the parent open price as the reference following this formula structure:
TakeProfitAv == (TakeProfitPips + (TPLevel_ChildTrade1 - OpenPrice_ParentTrade) "as pips")) / nTrades
After that, the code will modify the child´s TP to TakeProfitAverage.
That logic will repeat until you break the loop when your condition to do not enter long at market is met (maybe when start to go short).
Keep in mind:
-
I defined the Pointsize with a number but it can be set with 'Market Properties'. This parameter is used to convert from points to pips or vice versa.
-
I have used a "Counter: Pass once' (Id=3) block to split the parent trade from the child trades. This block will need to reset at some point along your code. For example, when you break the go long loop. If it is not reset, when the EA starts with a new go long loop, it will not activate the true output of the block.
One of the best suggestion that I got from fxDreema support & other forum members is to add blocks that makes me to see if the code is going as I expect:
"Draw Arrow" allows me to see that the execution passed through the "modify stops" block
"Comment (ugly)" allows me to see the parent trade values
"Comment" allows me to see that the calulations are correct
Hoping that this example provides you some starting point.