I assume this did what was needed, I use ChatGPT for this type of code, the problem is that the FX trade time returns as a string, not a number. This is MT4 but will show you what I mean:
Posts made by jstap
-
RE: How can I check the last closed trade was open on candle ID 0?posted in Questions & Answers
-
RE: Need Help: Building a "Previous Hour Breakout" Strategyposted in General Discussions
Use candle 1 for your price levels:

-
RE: Could you please explain how to split trades into Group 1 and Group 2?posted in Questions & Answers
Groups are what a trade is placed in, when you place a trade you give it a group number at the top of the block, so your conditions above are what says to place the trade, you can then use the group number in other blocks to control the trade.
-
RE: “Manual Trade” sizingposted in Questions & Answers
Button is the only way I know, you could place a pending order that places the new and then deletes, but this is not as simple as a live trade. This is how to use a button on tick: https://fxdreema.com/shared/yfqIa8vMd
-
RE: Why isn't the MT5 Donchian Channel Indicator working? Lots of Picsposted in Questions & Answers
Looks like it should work, have you tried another indicator? Maybe this will say weather that indicator is the problem...
-
RE: Can somebody please help?posted in Questions & Answers
What is this not doing correctly? you need to limit the orders placed with a check pending orders block.
-
RE: How to add a block for closing all trades at a specific timeposted in Questions & Answers
Little bit different depending on DST change and your country... if this is taken into consideration you would need a custom code block (AI can create this for you), 5min before is close for comfort as close will some times happen 15min before, the time filter block will commit an action at your specific time daily so... time block - close block
-
RE: Is It Possible To Import a READY MADE CUSTOM INDICATOR TO FURTHER Create a New Oneposted in Questions & Answers
Yes or not... but depending on what you mean yes it is possible, the indicator tab in your project page allows you to add indicators and then use it while creating the EA.
-
RE: Any Free Working EA For Scalping Gold?posted in General Discussions
You can create a free scalping EA here, but it will not be complete... just working. mql5 website has many but if good will cost to purchase. Your best bet is to decide on a strategy, create, test, test... then you may get a working EA.
-
RE: Trailing struggleposted in Questions & Answers
It is just how you have shown, pip rules will change to pips, but every other asset will use points.
where it says pips will be points depending on the asset and pip rule settings

-
RE: Trailing struggleposted in Questions & Answers
Then don't set a stop, if stop is 0 than when the trail activates it will set the stop to the distance set in the settings.
-
RE: Trailing struggleposted in Questions & Answers
Stop loss is a fixed stop position at open (although you can add later), trailing stop is the stop that moves with price as the settings allow.
-
RE: New here and have a simple questionposted in Questions & Answers
that is quite simple... start with... no position block - condition block - buy/sell block. Watch on backtest then you can add to the condition...
-
RE: Trailing struggleposted in Questions & Answers
Not sure what do you mean, you need to workout once triggered though in that project you don't have a start, how far behind and how often the stop is moved... if you need more advice on how it works just ask... you can't add to a positions size without opening a new trade so adding volume on open is often best.

........