I can see your projects even without sharing 🙂
You need to buy and sell, this is forex after all. The question is when and how much to buy and sell. But there is no one rule for that. Someone may want to trade on each candle. Other may want to trade once a day, when some condition happens. Other may want to buy when conditions reverse. Other may want to have 1 trade all the time.
EAs are working on events. Certain part of the code is executed... sometimes, on a given event. The most important event is the "Tick" event. When a new tick comes, MetaTrader causes this part of the code to run. As you can suggest, all blocks under "on Tick" are running on every tick. Your block 59 is running once for every tick. Blocks below... depending on the block/s above.
Remove that block "AND", it's not needed, it's the same without it.
Your strategy is now like this:
When a tick is received, check how many trades there are
If there are 0 trades, check if RSI is above 50, otherwise stop here and wait for the next tick.
Check if the server time is between 8:00 and 20:00. If not, stop here and wait for the next tick.
Create Buy trade. That's all.
On the next tick everything will be the same. But when you finally create a new Buy trade, 1) will not pass anymore. When your Buy trade is closed for whatever reason, 1) will pass again.... until you got another Buy trade.
As I already said, if you want to limit the number of trades by time, add some block like "Once per bar" or "Once a day". There are other scenarios as well, this is the most simple.