MT5 Timeframe change automatically

 

Hello,

in MQL5 when i set this EA on MT5 in H1 and it' changes automatically timeframe (to Daily) and reset after some milliseconds. So the chart seems crazy. Not all computers have this problem, i have an i7-6700HQ where there is no problem, but on my aruba VPS and some computer there is this problem. 

Thanks so much

The code is this: 

//+------------------------------------------------------------------+

//|                                                   EAProvaMTF.mq5 |

//|                        Copyright 2018, MetaQuotes Software Corp. |

//|                                             https://www.mql5.com |

//+------------------------------------------------------------------+

#property copyright "Copyright 2018, MetaQuotes Software Corp."

#property link      "https://www.mql5.com"

#property version   "1.00"

//+------------------------------------------------------------------+

//| Expert initialization function                                   |

//+------------------------------------------------------------------+

int OnInit()

  {

//---

   

//---

   return(INIT_SUCCEEDED);

  }

//+------------------------------------------------------------------+

//| Expert deinitialization function                                 |

//+------------------------------------------------------------------+

void OnDeinit(const int reason)

  {

//---

   

  }

//+------------------------------------------------------------------+

//| Expert tick function                                             |

//+------------------------------------------------------------------+

void OnTick()

  {

//---

   double massimo = iHigh( _Symbol, PERIOD_D1, 0 );

      double minimo = iLow( _Symbol, PERIOD_D1, 0 );

      double open = iOpen( _Symbol, PERIOD_D1, 0 );

   

   Print( massimo + " " + minimo + " "+ open );   

   

  }

//+------------------------------------------------------------------+


Discover new MetaTrader 5 opportunities with MQL5 community and services
Discover new MetaTrader 5 opportunities with MQL5 community and services
  • www.mql5.com
Ask questions on technical analysis, discuss trading systems and improve your MQL5 programming skills to develop your own trading strategies. Communicate and share your experience with traders from anywhere in the world, answer questions and help beginners — MQL5.community is developing along with you. If price touch the shap Hi I draw a...
 

Forum on trading, automated trading systems and testing trading strategies

When you post code please use the CODE button (Alt-S)!

Use the CODE button

Thank you.

 
Sergey Golubev:

Ok Thanks, have you read my question?

 

These functions have only recently been incorporated to MQL5.

It is possible that there is a bug.

Please write your question and code example to servicedesk so that it will reach the developers. 

 
Marco vd Heijden:

These functions have only recently been incorporated to MQL5.

It is possible that there is a bug.

Please write your question and code example to servicedesk so that it will reach the developers. 

Ok Done, with new release (1875 - 5 Jul 2018) the problem is fixed.

Thanks