
Pips on profit = PIPS de beneficio (positivo) para mover el SL
BEP offset mode -> sirve para establecer cuántos PIPS se añaden al Open Price como nivel final del SL (BELevel = OpenPrice+BEP offset)
El bloque puede filtrar determinados trades.

Pips on profit = PIPS de beneficio (positivo) para mover el SL
BEP offset mode -> sirve para establecer cuántos PIPS se añaden al Open Price como nivel final del SL (BELevel = OpenPrice+BEP offset)
El bloque puede filtrar determinados trades.
At the dropdown menú you have those options

Hi fxDreema
It is just an idea. No worries. I have other options that I tested and it works pretty well even though there are not what I would like.
Thanks
Si haces click derecho sobre un bloque, tienes la opción de "Information" que te da información del funcionamiento del bloque.

Hi fxDreema
Yes, you are right and I know that.
What I wanted to say with "...after 16:00 because in H8 there is not any bar that opens at 22:00..." is that there is none bar after 16:00 on Friday in H8.
What I would like to find is a "trick" that allows me to check a condition at 22:00 on Friday in H8 to close the trades at Market Close time but using Once per bar. It works with Every Tick.
Thanks
This might be work but it has not been checked,

You can shift the "Price" field to Bid or Ask as per your convenience.

Let's take a look at your Project.
I have changed the size of the postions (1 lot) and the EA is trading "Once per bar".

GBPUSD H4
Entry Price = 1.61728
SL Price = 1.74666 {= 1.61728 x(8%)} --> 1293.8pips
TP Price = 1.29382 {= 1.61728 x(-20%)} --> 3234.6pips
The EA opens the trade as you expect.
3% of Current SL = 1293.8pips x 3% = 38.81pips --> Partial TP (1) = 1.61728 - 38.81pips = 1.613399

It works as expected. If the EA is evaluated with Every Tick, it would close partially the trade at 1.61335. For this case, it closes the trade partially at the begining of next bar.
Then, what you would like is a partial trade close when the profit reaches 5% of Open Price.
Partial TP Price (1) = 1.536416 {= 1.61728 x(-5%)} --> 808.6pips
The goal is to calculate how many pips belongs to a 5% of the Open Price in profit direction to be used in the "pips away from open-price" block.
The next might be an approach that works as expected




https://fxdreema.com/shared/1Bg0OYPTc
Of course, there are different options to get what you want and fxDreema allows you to investigate easily across many alternatives.
I think what you want to evaluate is something like this: if the current Price (Ask/Bid) raises above the High[1] or falls below Low[1], enter Long or Short.
Is that what you want to do?
Could you clarify this condition: "Parcial Take Profit: 5%"?
5% of what: TP, SL?
It is not posible to evaluate "High [0]" because it is the most recent bar opened. Then, the bar's High is not a "right" value.
You should try High [1] > High [2], it should work.
This could be an approach

You do not need to take care of what pair are you trading by using PointSize because that value is got from MarketProperties or from what is set at Project settings (Customized)
It should work.
"Check age" block allows to do something when its condition to pass is met. I am using it like a position´s expiration condition so when the true output is activated, the EA closes all positions.
It Works pretty well but the code that is checking how much time has passed since the position was opened also is taking into account the weekend days. For that, a position can be closed on Monday because the position´s age has met the "check age" block condition but it is not the real age.

The example above shows a postition expired (EXP) at the first Monday´s bar but it is not the real age.
How can I avoid the weekend days for the "check age" block?
Thanks
Hi @fxDreema

That Works if the tester execution is set to "Every tick". I was using "Open prices only" so there was no way to let the EA checks that condition.
Thanks for helping.
Hi @fxDreema
The blocks work if I set the ClosingMarketTime at Bar´s open.
Let´s say, I want the EA trades in TF == H8. The EA only checks the project´s logic OncePerBar (bar´s open). Then, if I set
WeekDayFilter == Friday && HourFilter == 16:00 - 23:00 (connected to the OncePerBar block)
when the last bar on Friday (H8) opens at 16:00, the EA closes all the positions. This Works pretty well. Because my EA trades in H8, it is not posible to check that condition at any bar´s open after 16:00 because in H8 there is not any bar that opens at 22:00. For this reason, I placed the blocks group without connection to the "Once Per Bar" block and with a "Pass" block on the top to let the ticks do the condition check. But it does not work even though the MarketCloseSwitch is set to "true".
I Will try some more checks and I Will update on this.
Thanks for helping.
Hola @YADER-MAYORGA
No queda claro cuál es tu objetivo.
"... si no cierra en positivo abra otra operación cuando vuelva a cruzar las linias"
¿Sólo quieres que el EA abra una nueva posición si la anterior ha cerrado con pérdidas? Si ha cerrado con ganancias, ¿no quieres que abra ninguna otra? Con lo cual, cuando haya una ganancia, el EA no seguirá tradeando.
You should combine a "Weekday" & "Hours" filter block for that.

If Weekday == Monday && Hours == 00:00 - 05:00 -> No Trade (because there is nothing connected to the True output of the Hours filter)
If Weekday is Monday && Hours is not 00:00 - 05:00, False output is activated on the Hours filter allowing to trade on Monday.
If Weeday is not Monday, False output is activated on the Weekday filter allowing to trade the rest of the weekdays.
It should work.