Errors, bugs, questions - page 933

 
sion:
void OnInit()
{
uint as=iCustom(_Symbol,PERIOD_M10,"Examples\\CCI");
}

void OnTick()
{
}

Is the error repeated?

In 770 build, chart with m10 doesn't appear, in previous build it's fine.

Eh..., did the broker update the terminal, is it just the visualisation messing up there, or can I expect anything?
 

Hello when attaching the indicator to the chart I get

Access violation read to 0x000000000000000001 in 'C:{Program Files\Alpari NZ MT5\MQL5\Indicators\indicators.ex5'

how do i deal with it? build 770 64bit OS 7


Документация по MQL5: Операции с графиками / ChartIndicatorAdd
Документация по MQL5: Операции с графиками / ChartIndicatorAdd
  • www.mql5.com
Операции с графиками / ChartIndicatorAdd - Документация по MQL5
 
kirill190982:

Hello when attaching the indicator to the chart I get

Access violation read to 0x000000000000000001 in 'C:\Program Files\Alpari NZ MT5\MQL5\Indicators\indicators.ex5'

How do I fix this? build 770 64bit OS 7


Afternoon .

Write to servicedesk and attach the indicator please. Thank you.

 

Hello.

Let's say there is a class that contains several groups of buttons:

class CMyApp : public CAppDialog {
private:
   CButton m_digits[BUTTONS_QTY];
   CButton m_letters[BUTTONS_QTY];
   
public:
   CMyApp() {}
   ~CMyApp() {} 
   virtual bool Create(const long chart, const string name, const int subwin, 
                        const int x1, const int y1, const int x2, const int y2);
   virtual bool OnEvent(const int id, const long &lparam, const double &dparam, const string &sparam);
   bool CreateDigitButtons();
   bool CreateLetterButtons();
   void OnClickButton();
   void OnClickDigit(string text);
   void OnClickLetter(string text);
   
private:
   bool CreateButton(CButton &button, string name, string text, int x1, int y1, int x2, int y2);
};

Buttons are grouped, because when you click on them, some similar actions are performed. The task is to detect which button group it belongs to and "send" it to the appropriate method which will perform certain actions depending on what text is on the button. To simplify things to the limit, suppose we simply need to display a group name and text on a button. And here is where it gets baffling - how do we get the text of the button?

At the moment, the button name has a common name for a particular group + text on the button itself. In other words: 1) by a substring in the name I determine the group the button belongs to, 2) I pass in the "next" method the name again, from which I "get" the text. But this is not an optimal solution, to put it mildly. More specifically, the problem here:

//---
bool CMyApp::OnEvent(const int id,const long &lparam,const double &dparam,const string &sparam) {
   if ( id == CHARTEVENT_CUSTOM ) {
      if ( StringFind(sparam, "Digit") >= 0 ) {
         // string text = ? (как получить текст на кнопке?)
         OnClickDigit(sparam); // вместо sparam надо бы передавать text
         return(true);
      } else if ( StringFind(sparam, "Letter") >= 0 ) {
         OnClickLetter(sparam); // аналогично случю выше - вместо sparam надо бы передавать text
         return(true);
      }
   }

   return(CAppDialog::OnEvent(id, lparam, dparam, sparam));  
}

Please advise how to solve the problem.

PS. Just in case, I'm attaching the code, so that if necessary you can look at "the whole thing".

Files:
 

Hi all!

The simple code in the strategy tester, in visualization mode, instead of Zig_Zag you get a miracle in the picture (attached).

Provided that in CopyClose(_Symbol,PERIOD_H1... the period in this function is not equal to period selected in the strategy tester window (if it is equal, then all is fine, what is the connection?))

Is it a bug? And if so, where to go with this in the service desk through a private message (or here the message is enough)?


input int      ExtDepth=13;
input int      ExtDeviation=5;
input int      ExtBackstep=3;

int zzHandle;      // хэндл индикатора ZigZag
//+------------------------------------------------------------------+
int OnInit()
  {
//--- Получить хэндл индикатора ZigZag
   zzHandle=iCustom(NULL,0,"ZigZag",ExtDepth,ExtDeviation,ExtBackstep);  //Расчет индикатора ZigZag
//--- Нужно проверить, не были ли возвращены значения Invalid Handle
   if(zzHandle<0)
     {
      Alert("Ошибка при создании индикаторов - номер ошибки: ",GetLastError(),"!!");
     }
   return(0);
  }
//+------------------------------------------------------------------+
void OnTick()
  {
//---
   double Last_Price_Close[];
   CopyClose(_Symbol,PERIOD_H1,0,1,Last_Price_Close);
  }
//+------------------------------------------------------------------+
Files:
uvsf6r.jpg  406 kb
 
Fia:

Hi all!

The simple code in the strategy tester, in visualization mode, instead of Zig_Zag you get a miracle in the picture (attached).

Provided that in CopyClose(_Symbol,PERIOD_H1... the period in this function is not equal to period selected in the strategy tester window (if it is equal, then all is fine, what is the connection?))

Is it a bug? And if so, where to go with this in the service desk through a private message (or here the message is enough)?

...
In service desk already have a similar message. But write too.
 
tol64:
There's already a similar message in Service Desk. But write too.
Thank you, I just did, maybe they'll fix it sooner...
 
How do I delete a screenshot uploaded to the wall anonymously, it shows my accounts...
 
vadynik:
How do I delete a screenshot uploaded to the wall anonymously, it shows my accounts...

Just move your mouse to the desired graphic and you will see the command "Delete".


 
Rone:

Hello.


It goes something like this.
Files:
Reason: