How to trade at a certain time of day?

To add comments, please log in or register
jthornton
70
jthornton  

I'm creating an EA for training.  I've created an EA that has been 100% accurate since 2012.  It's based on the daily chart, but there have been HUGE drawdowns.  One thing that I've noticed is that my trade conditions are triggering during the day, but based on the value of the candle at the end of the day the trade would NOT have triggered.

I would like to put in a condition to only trade between 3:30pm and 4pm New York time.

I know there are functions like TimeCurrent(), Hour(), Minute(), etc.  However, I can't figure out how to get the server time and figure out the offset to match it to NY Time.

Can anyone help me with this please?

whroeder1
17927
whroeder1  
jthornton:

I've created an EA that has been 100% accurate since 2012.  It's based on the daily chart, but there have been HUGE drawdowns. 

I would like to put in a condition to only trade between 3:30pm and 4pm New York time.

figure out how to get the server time and figure out the offset to match it to NY Time.

  1. Contradictory statement. 100% accurate can not have any drawdowns
  2. No one is stopping you.
  3. Convert your broker time to GMT time and then to NY time. Posted my code Why is there NO Complete EA within the Code-Base? - MQL4 forum It has not been adjusted for Build 600+.
To add comments, please log in or register