Errors, bugs, questions - page 992

 
ns_k:

I'm going to sprinkle in some more.

On startup the terminal swears the specified symbol is not selected. I transferred it to another MT5 via cloud - it works, and with commented strings using tickers.

I'd try to find the reason, but I don't know where to start searching for such a stray error. May be, why don't you re-install the terminal at once?

Add used symbols to Market Watch window during indicator initialization.

SymbolSelect()

 
tol64:

Add used symbols to the Market Watch window when initialising an indicator.

SymbolSelect()

Thanks for the tip. It didn't work and would hardly work as all symbol references in the code are commented out.

Any other ideas? I'll try to run an empty indy now

 

I commented out everything I could, but the specified symbol is not selected

//+------------------------------------------------------------------+
//|                                                      Therm02.mq5 |
//|                        Copyright 2013, MetaQuotes Software Corp. |
//|                                              http://www.mql5.com |
//+------------------------------------------------------------------+

//#include <ST_ServicesAndAbstracts.mqh>

#property copyright "Copyright 2013, MetaQuotes Software Corp."
#property link      "http://www.mql5.com"
#property version   "1.00"
#property indicator_separate_window
//#property indicator_minimum 0
//#property indicator_maximum 120
//#property indicator_buffers 2
//#property indicator_plots   2
////--- plot Label1
//#property indicator_label1  "Label1"
//
//#property indicator_type1   DRAW_LINE
//#property indicator_color1  clrBlack
//#property indicator_style1  STYLE_SOLID
//#property indicator_width1  1
////--- indicator buffers
//double         gThermB[];
//
//double         gEURThermB[];
//double         gCHFThermB[];

//CRangeManager  *gEURRM, *gCHFRM;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   //SymbolSelect("EURUSD",true);
   //SymbolSelect("USDCHF",true);
   //SetIndexBuffer(0,gEURThermB,INDICATOR_DATA);
   //SetIndexBuffer(1,gCHFThermB,INDICATOR_DATA);
   //gEURRM = new CRangeManager(1,0.2,20,"EURUSD");
   //gCHFRM = new CRangeManager(1,0.2,20,"USDCHF");
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate (const int rates_total,      // size of input time series
                 const int prev_calculated,  // bars handled in previous call
                 const datetime& time[],     // Time
                 const double& open[],       // Open
                 const double& high[],       // High
                 const double& low[],        // Low
                 const double& close[],      // Close
                 const long& tick_volume[],  // Tick Volume
                 const long& volume[],       // Real Volume
                 const int& spread[]         // Spread
   )

  {
//---
//   double lEUR[], lCHF[];
//   int copied;
//  // copied=CopyClose("EURUSD",PERIOD_CURRENT,0,5000,lEUR); 
//   if (copied==-1){Print("Ждите...EUR");return(0);}
//  // copied=CopyClose("USDCHF",PERIOD_CURRENT,0,5000,lCHF); 
//   if (copied==-1){Print("Ждите...CHF");return(0);}
//
//
//   //sThermometer lT;
//   for(int i=prev_calculated;i<5000;i++)
//      {
//         //lT = gEURRM.getState(lEUR[i]);
//       //  gEURThermB[i] = lT.currentT; 
//         
//     //    lT = gCHFRM.getState(lCHF[i]);
//     //    gCHFThermB[i] = lT.currentT; 
//      }
////--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
//| TradeTransaction function                                        |
//+------------------------------------------------------------------+
void OnTradeTransaction(const MqlTradeTransaction& trans,
                        const MqlTradeRequest& request,
                        const MqlTradeResult& result)
  {
//---
   
  }
//+------------------------------------------------------------------+
 
ns_k:

I commented out everything I could, but the specified symbol is not selected

I have no such error neither in the first nor in the second variant. ))
 
tol64:
I have no such error in either the first or the second version. ))
I told you that through the cloud to another terminal and I don't have it. Is moving the terminal the only option? I just want to solve the problem as easily as possible, the reason is not important to me
 
ns_k:
I told you that via the cloud to another terminal and I don't have one. Is moving the terminal the only option? I just want to solve the issue as simply as possible, I don't care about the reason
I don't know, some kind of weird problem. Write to Service Desk. I personally have never reinstalled the terminal in more than two years because of any problem. I have never encountered anything like that before. )) Try to re-install. How do you find it?
Общайтесь с разработчиками через Сервисдеск!
Общайтесь с разработчиками через Сервисдеск!
  • www.mql5.com
Ваше сообщение сразу станет доступно нашим отделам тестирования, технической поддержки и разработчикам торговой платформы.
 

TimeGMTOffset() on MQ server returns wrong value.

Quotes are at +2 offset from GMT,

and TimeGMTOffset() returns +3 from GMT.

 
Urain:

TimeGMTOffset() on MQ server returns wrong value.

Quotes are at +2 offset from GMT,

and TimeGMTOffset() returns +3 from GMT.

What's wrong?
 

Good afternoon!

It would be good to make it possible to suspend the output of print commands in the experts tab. From running indicator, for example

Thank you!

 

I made this possible through TRACE() macros - inside the macro, the display flag is checked, and depending on how it is set - the output is either to Print or to a file, or to both, or nothing is output at all.

Документация по MQL5: Общие функции / Print
Документация по MQL5: Общие функции / Print
  • www.mql5.com
Общие функции / Print - Документация по MQL5
Reason: