Only Trade During Market Hours(Asia, UK, UK/US)
Is the US session 13:00 to 21:59 or 13:00 to 22:59 ? if it's the former your code is wrong.
c0d3:
Hi guys, i'm trying to make my EA only work during open market hours: Asia, UK, UK/US.
- There are no ticks when the market is closed. Start isn't called. No code needed
- Do you mean all sessions except first two of Sydney (except 5pm ET to 7 pm ET) Then you do NOT want hour=22.
if(Hour()>=0 && Hour()<22) // if(Hour()>=0 && Hour()<=22) { return(true); } else { return(false); } //// or Simplify /// return( Hour()>=0 && Hour()<22 );
- If you mean code to allow a range, see my code
i made it grater than zero, and less than 21. I'm not in rush to trade the last hours of US, and the open of Asia
Hour()>0 && Hour()<21
Hi guys, i'm trying to make my EA only work during open market hours: Asia, UK, UK/US.
My broker is IBFX: +0 GMT
I would like to have a generic algorithm, which will also consider the hour shifts, +1 hour, -1 hour