a Problem with an EA in finding Sessions

 

hi there, i have a problem with my wroten EA that contains :

i want to draw some lines everyday of the given Date in the time i gave to it. it works well but it has a Logical Error that it is when it draws lines in Specified Hour,

it draws the extra lines every week in the 21 or 20 hour at the end of every week, could anyBody help me with this? i gave the picture of result , the Code and the EA in this Topic.

Thank you for visiting this topic.

this is my code :

Improperly formatted code removed by moderator
Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • 599.00 USD
  • 2024.04.26
  • www.mql5.com
MQL5: language of trade strategies built-in the MetaTrader 5 Trading Platform, allows writing your own trading robots, technical indicators, scripts and libraries of functions
Files:
waawwws.PNG  105 kb
LineTest1.ex4  8 kb
LineTest1.mq4  6 kb