return true if its New York Session

 
Hi guys im doing this EA but using date, time and timezone confuses me. Can you help me make a function that will return true if its New York Session or return true if its the first 3hours of New York Session? Thank you so much :)
 
mark692:
Hi guys im doing this EA but using date, time and timezone confuses me. Can you help me make a function that will return true if its New York Session or return true if its the first 3hours of New York Session? Thank you so much :)

what you think we are? your nannies? don't you know how to look for yourself? search google and/or codebase. There are lots of different indicators and eas that you can modify and copy to suite your needs. OR HIRE A BLOODY CODER and dont be lazy.

 
Revo Trades #:

what you think we are? your nannies? don't you know how to look for yourself? search google and/or codebase. There are lots of different indicators and eas that you can modify and copy to suite your needs. OR HIRE A BLOODY CODER and dont be lazy.



No i dont need indicator i just need function that will return true so i can put it on my EA. This function im askin is only a piece for my EA. Most of my EA doesnt base on time thats why coding ea according to time local,time, date, gmt is new to me. Im trying to study it but its a little confusing. I dont want to hire someone that will code for me because i want to learn.I have searched and look different indacator and EA that used market session but they code it differently that is why i got confuse, Anyway thank you :)
 
not true. there is many codes in codebase that have time filters. You can learn how to code it yourself by reading the code in a working ea or indicator, as i have already described.
 
Revo Trades #:
not true. there is many codes in codebase that have time filters. You can learn how to code it yourself by reading the code in a working ea or indicator, as i have already described.

codebase? here in this forum? ok ok ill look and check it, thanks

 
  1. You know when NY session starts.
  2. Only you know timezone difference between NY and your broker. And when they change. (DST)
  3. Show us your attempt (using the CODE button) and state the nature of your problem.
              No free help (2017)

 
Daylight changes (summer time)
Daylight changes (summer time)
  • www.mql5.com
Compute the daylight saving time changes (start/end of the summer time).
 
mark692 #:

codebase? here in this forum? ok ok ill look and check it, thanks

yes. there is link at top of this forum page haha. or as one of mql5 GODs has said in 3. Show us your attempt, using the src button, and describe what you have already tried, and what the result was, and why it is different to what you wanted.

 

Hi

Try this one:

int startNY =14;
int endNY=22; 
bool isSession(){
   int hour = TimeHour(TimeCurrent());
   string text = "";
      if(startNY<endNY){
         if(hour>=start && hour<endNY{
            return(true);
         }
      }else{
         if(hour>=startNY || hour<endNY){
            return(true);
         }
      }
   }
   return(false);
}

Have a nice weekend