{"id":178,"date":"2026-04-23T08:13:06","date_gmt":"2026-04-23T06:13:06","guid":{"rendered":"https:\/\/strony.info\/AdaptiveHybridSystem\/?p=178"},"modified":"2026-04-26T11:28:09","modified_gmt":"2026-04-26T09:28:09","slug":"trading-schedule-eod-terminator","status":"publish","type":"post","link":"https:\/\/strony.info\/AdaptiveHybridSystem\/2026\/04\/23\/trading-schedule-eod-terminator\/","title":{"rendered":"Trading Schedule &amp; EOD Terminator"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"schedule\">10. Trading Schedule &amp; EOD Terminator<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Session Schedule (Terminal Local Time)<\/h3>\n\n\n\n<p>Each weekday has its own trading window:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Monday:    Inp_Hours_Monday    = \"00:00-22:00\"\nTuesday:   Inp_Hours_Tuesday   = \"00:00-22:00\"\nWednesday: Inp_Hours_Wednesday = \"00:00-22:00\"\nThursday:  Inp_Hours_Thursday  = \"00:00-22:00\"\nFriday:    Inp_Hours_Friday    = \"00:00-05:00\"  \/\/ earlier close \u2014 weekend risk<\/code><\/pre>\n\n\n\n<p>Format:&nbsp;<code>\"HH:MM-HH:MM\"<\/code>&nbsp;\u2014 multiple ranges per day can be entered, comma-separated, e.g.&nbsp;<code>\"09:00-12:00,15:00-20:00\"<\/code>. Saturday and Sunday are automatically blocked.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">EOD Terminator<\/h3>\n\n\n\n<p>An emergency mechanism for closing all positions at a defined time:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Friday:     Inp_EOD_Time_Friday    = \"21:39\"\nOther days: Inp_EOD_Time_OtherDays = \"22:29\"<\/code><\/pre>\n\n\n\n<p>Algorithm with retry logic:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Attempts to close all positions on the symbol<\/li>\n\n\n\n<li>If the broker rejects an order \u2192 waits 5 seconds \u2192 retries (up to 10 attempts)<\/li>\n\n\n\n<li>On success:\u00a0<code>g_Last_EOD_Day = dt.day_of_year<\/code>\u00a0(does not repeat on the same day)<\/li>\n<\/ol>\n\n\n\n<p><strong>Log:<\/strong>&nbsp;<code>\"EOD TERMINATOR: Emergency closing all positions...\"<\/code>&nbsp;\u2192&nbsp;<code>\"EOD SUCCESS: Closed position #123.\"<\/code>&nbsp;\u2192&nbsp;<code>\"EOD TERMINATOR: Chart cleared. Goodnight.\"<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>10. Trading Schedule &amp; EOD Terminator Session Schedule (Terminal Local Time) Each weekday has its own trading window: Format:&nbsp;&#8220;HH:MM-HH:MM&#8221;&nbsp;\u2014 multiple ranges per day can be entered, comma-separated, e.g.&nbsp;&#8220;09:00-12:00,15:00-20:00&#8221;. Saturday and Sunday are automatically blocked. EOD Terminator An emergency mechanism for closing all positions at a defined time: Algorithm with retry logic: Log:&nbsp;&#8220;EOD TERMINATOR: Emergency closing &hellip; <a href=\"https:\/\/strony.info\/AdaptiveHybridSystem\/2026\/04\/23\/trading-schedule-eod-terminator\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Trading Schedule &amp; EOD Terminator<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[7,292,373,275,368,33,363,11,12,369,364,366,372,270,371,370,374,236,367,365],"class_list":["post-178","post","type-post","status-publish","format-standard","hentry","category-en","tag-adaptivehybridsystem","tag-algorithmictrading","tag-automatedexitsystem","tag-en","tag-endofdayclose","tag-eodterminator","tag-marketsessionfilter","tag-metatrader5","tag-mql5","tag-orderretrylogic","tag-positionclosing","tag-retrymechanism","tag-risktimecontrol","tag-sessioncontrol","tag-symbolmanagement","tag-timebasedtrading","tag-timerangesettings","tag-tradingschedule","tag-tradingwindows","tag-weekendblock"],"_links":{"self":[{"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/posts\/178","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/comments?post=178"}],"version-history":[{"count":1,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/posts\/178\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/posts\/178\/revisions\/283"}],"wp:attachment":[{"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/media?parent=178"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/categories?post=178"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/strony.info\/AdaptiveHybridSystem\/wp-json\/wp\/v2\/tags?post=178"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}