How to get candlestick High, Low, Close everyday at 20:00 (Timeframe H4)

To add comments, please log in or register
raynandaufa
7
raynandaufa  
Hello, i'm newbie please help. I want to get pivot from candlestick value at 20:00 everyday at Timeframe H4. I already try this code but it seems not worked well.
if(Hour() == 00||Hour() == 01||Hour() == 02||Hour() == 03)
    {
    RefreshRates();
     cHigh = iHigh(NULL, PERIOD_H4, 1);
     cLow = iLow(NULL, PERIOD_H4, 1);
     cClose = iClose(NULL, PERIOD_H4, 1);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
     if(Hour() == 04||Hour() == 05||Hour() == 06||Hour() == 07)
    {
    RefreshRates();
     cHigh = iHigh(NULL, PERIOD_H4, 2);
     cLow = iLow(NULL, PERIOD_H4, 2);
     cClose = iClose(NULL, PERIOD_H4, 2);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
    if(Hour() == 08||Hour() == 09||Hour() == 10||Hour() == 11)
    {
    RefreshRates();
     cHigh = iHigh(NULL, PERIOD_H4, 3);
     cLow = iLow(NULL, PERIOD_H4, 3);
     cClose = iClose(NULL, PERIOD_H4, 3);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
      if(Hour() == 12||Hour() == 13||Hour() == 14||Hour() == 15)
    {
    RefreshRates();
    cHigh = iHigh(NULL, PERIOD_H4, 4);
     cLow = iLow(NULL, PERIOD_H4, 4);
     cClose = iClose(NULL, PERIOD_H4, 4);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
      if(Hour() == 16||Hour() == 17||Hour() == 18||Hour() == 19)
    {
    RefreshRates();
     cHigh = iHigh(NULL, PERIOD_H4, 5);
     cLow = iLow(NULL, PERIOD_H4, 5);
     cClose = iClose(NULL, PERIOD_H4, 5);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
      if(Hour() == 20||Hour() == 21||Hour() == 22||Hour() == 23)
    {
    RefreshRates();
     cHigh = iHigh(NULL, PERIOD_H4, 6);
     cLow = iLow(NULL, PERIOD_H4, 6);
     cClose = iClose(NULL, PERIOD_H4, 6);
     pivot = cHigh + cLow + cClose;
     pivot = pivot / 3;
     }
     
     //RefreshRates();
Jose Francisco Casado Fernandez
5159
Jose Francisco Casado Fernandez  
Don't double post, please:   https://www.mql5.com/en/forum/220363
How to get candlestick High, Low, Close everyday at 20:00 (Timeframe H4)
How to get candlestick High, Low, Close everyday at 20:00 (Timeframe H4)
  • 2017.11.20
  • www.mql5.com
Hello, i'm newbie please help. I want to get pivot from candlestick value at 20:00 everyday at Timeframe H4...
To add comments, please log in or register