ea trading hours function

 

Hi,

would someone be generous to help me and attach a simple traing hours function to this ea

i have tried to add the function iTime but with no success

 
  1. simple traing hours
    What do you want? Use real words.
  2. If you want to control trading hours see my code.
  3. iTime is a Mql4 function so you can't add it.
 

yes that is what i want

and i dont know what to do with your code

i know a little c# not mql

 
ji2gy7:

yes that is what i want

and i dont know what to do with your code

The 2nd code block is a Function ( https://book.mql4.com/basics/functions ) you can add it at the very end of your code . . .

The first block returns ( https://book.mql4.com/operators/function ) if the time is outside of the time you want to allow trading to happen . . . you can, for example, add it at the top of your start() function . .

Reason: