Simple_Open_Close_Market

Author: Copyright 2023, MrBrooklin
0 Views
0 Downloads
0 Favorites
Simple_Open_Close_Market
ÿþ//+------------------------------------------------------------------+

//|                                     Simple_Open_Close_Market.mq5 |

//|                                       Copyright 2023, MrBrooklin |

//|                         https://www.mql5.com/ru/users/mrbrooklin |

//+------------------------------------------------------------------+

#property copyright "Copyright 2023, MrBrooklin"

#property link      "https://www.mql5.com/ru/users/mrbrooklin"

#property version   "1.00"

//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+

int OnInit()

  {

   EventSetMillisecondTimer(100); // A>74048< B09<5@

   return(INIT_SUCCEEDED);

  }

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {

   EventKillTimer(); // C40;8< B09<5@

   Comment(""); // C40;8< :><<5=B0@89

  }

//+------------------------------------------------------------------+

//| Timer function                                                   |

//+------------------------------------------------------------------+

void OnTimer()

  {

//--- >1JO28< ?5@5<5==CN 2@5<5=8 ?@8E>40 ?>A;54=59 :>B8@>2:8 ?> B5:CI5<C A8<2>;C

   datetime time_current=(datetime)SymbolInfoInteger(_Symbol,SYMBOL_TIME);

//--- ?>A;54=OO :>B8@>2:0 ?@8H;0 <5=LH5 1-9 <8=CBK =0704 ? 5A;8 "40", B> @K=>: - >B:@KB, 8=0G5 - 70:@KB

   string text=TimeTradeServer()-time_current<=60 ? "" +"" : " +"";

//--- 5ABL =0;8G85 ?>4:;NG5=8O : B>@3>2><C A5@25@C ? 5A;8 "40", B> A>ABO=85 - =>@<0, 8=0G5 - >1@K2

   string text_1=TerminalInfoInteger(TERMINAL_CONNECTED) ? " " : " +";

   Comment("\n", "Time Current         = ",time_current,"\n", // 2K2545< 2@5<O ?@8E>40 ?>A;54=59 :>B8@>2:8

           "Time Trade Server = ",TimeTradeServer(),"\n", // 2K2545< 2@5<O B>@3>2>3> A5@25@0

           "!>AB>O=85 @K=:0   = ", text,"\n", // 2K2545< 8=D>@<0F8N > A>AB>O=88 @K=:0

           "!>ABO=85 IT-A2O78 = ", text_1); // 2K2545< 8=D>@<0F8N > A>AB>O=88 IT-A2O78

  }

//+------------------------------------------------------------------+

Comments