@jipsikingjoon Then you can use something like this:
https://fxdreema.com/shared/3Y5V5tshb
In this example the condition will be reviewed on the last 10 candles.
@jipsikingjoon Then you can use something like this:
https://fxdreema.com/shared/3Y5V5tshb
In this example the condition will be reviewed on the last 10 candles.
Ok. Could you please share the link here to take a look at it?
@sktsec I tried it but it doesn't work. The final result is only modified by the value of 'TP_money' constant only. I tried the same value for 'TP money' with different lot size values and the result on 'tp_fraction' doesn't change. I'm testing on EURUSD with a 5 digits chart.
Now I will try to work on roar's suggestion.
Thank you to all. I will check all options. All of you are great! 
I always ignored the repeated requests of transformation from money to price level in order to find a TP/SL level. However, I finally find myself needing it for a project. Sadly, I don't find the formula doing that.
My project is having several open trades at the same time (buys and sells) and I need to find the dynamic price level that would hit a specific TP/SL in money. So far I selected the corresponding 'check profit/loss' block and then close them all. However now I'm explicitly requested to find the corresponding price level where that will happen. Could someone please tell me the formula used to transform money into price?
I don't get the logic behind it, sorry. What do toy exactly need?
I guess the problem is requesting both conditions to be true at the same time at the beginning of the candle. Move that 'once per bar' block from its current position to immediately above your 'sell pending order' block.
You need to rename the name of the line on block 12. You used the same '1' name. Choose a new one.
Ese problema es muy habitual. Incluso teniendo datos de calidad del 99%, muchos de mis resultados en real no se han acercado a los de bactest por culpa de los factores incontrolables, como el spread variable, el slippage, las comisiones/swaps, etc. Bienvenido al mundo del forex real. 
@guy111 That's not what I said. mean the conditions defining the recovery area, because they will be dynamic, ie will change in time.
Not sure I fully get it. If you're using a classic martingale the only way to avoid jumps in the balance is by hedging. Could you please be more specific?
@oskars Did you check if the indicator repaints? I guess the problem is there.
Do you mean finding the largest one at any specific moment, maybe? Or programming the biggest one?
Ok. Some initial hints. You can remove blocks 29, 35 and 41, they are redundant. Can you please confirm the current structure works as designed? I don't see any issue at first glance.