Need Help

30 January 2015, 13:41
JeanT
0
57

Hello, I'm French so sorry for y english. 

I am a beginner in programming, I need help handling time data on MQL5. I wish that the algorithm takes the highest of a period such as high 8am to 10:30. The problem is that even by doing exactly as it says in the manual, well it does not work. It's been three weeks that I mess ... If someone knows the solution could help me .. Thank you

That's what I did:

  datetime TimeCurrent day = ();

  datetime debutjour = ((day / 86400) * 86400) -86000; // Determine the start of the day (ie 00h)

  datetime dixhtrente debutjour = + 37800; // I add 37800 seconds to fall on 10:30

      

    Double hm [];

    if (CopyHigh (_Symbol, _Period, dixhtrente, 75, hm)> 0) // Being in UT2, reversing 75 candle to arrive at 8 am

    {

       Plushautperiod hm = [ArrayMaximum (hm, 0)];

    }

Thank you very much