//+------------------------------------------------------------------+ //| Experts98.mq4 | //| Theo | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Theo" #property link "https://www.mql5.com" #property version "1.00" #property strict // void functions change flobal vars without parsing them //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ /*/input string InpName="ArrowCheck"; // Sign name input int InpDate=10; // Anchor point date in % input int InpPrice=50; // Anchor point price in % input ENUM_ARROW_ANCHOR InpAnchor=ANCHOR_TOP; // Anchor type input color InpColor=clrRed; // Sign color input ENUM_LINE_STYLE InpStyle=STYLE_DOT; // Border line style input int InpWidth=5; // Sign size input bool InpBack=false; // Background sign input bool InpSelection=false; // Highlight to move input bool InpHidden=true; // Hidden in the object list input long InpZOrder=0; */ void opensell() { ticket++; return; } int ticket=0; datetime date21=D'2015.03.31 21:00:00'; datetime date03=D'2015.03.31 3:00:00'; int shift =-1 ; int shift2 =1 ; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ int OnInit() { //--- for(int i=1; i<4; i++) { opensell(); Print(ticket); Print("The time is:",iTime(Symbol(),30,0)); } datetime datenao=iTime(Symbol(),30,0); if(date21<=datenao && date03>=datenao) { Print("True"); } else Print("false"); //--- return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //--- } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //--- datetime datenao=iTime(Symbol(),30,0); if(3