Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 861

 

Even so:

WHY?

int init()
 {
   //handle=FileOpen("COT - U.S. DOLLAR CONCATENATE.csv",FILE_READ|FILE_CSV);
   //if(handle==-1)Print("Не удается загрузить файл");
   if(init_data()==false)error=true;
   if(error==false)load_data();
   if(error==false)count_data();
   //if(error==true)Print("---------->>>>>>> ERORR!!! <<<<<<<<<--------------");
  // setparam();
   Print ("Инит завершён успешно, error = ",error);
   return (0);
 }
//+------------------------------------------------------------------+
//| Завершение работы робота                                         |
//+------------------------------------------------------------------+

int deinit()
{
   Print (" Завершение работы робота "); 
   return (0);
}
int start()
{
  // if(iTime(Symbol(),0,0) == prevtime) return(0);    //ждем нового бара
 //  prevtime = iTime(Symbol(),0,0);                   //если появился новый бар , включаемся    
   Print (" Старт после нового бара"); 
   setparam();
 
evillive:
Why isn't it coming out, it says it's successful?
So it doesn't go into the de-enit?
 
evillive:
I can't get it to work, it says it compiled successfully?

Why does it not print further in de-init and startup PRINTS? The expo compiles successfully - no errors.


HELP ME OUT HERE? PLEASE!

 

Why doesn't the tester go into de-init and start?

Build 765



...
bool result;
int  orderIndex, ticket; //  i,
static datetime prevtime = 0;       // по ценам открытия
/*
int init()
 {
   //handle=FileOpen("COT - U.S. DOLLAR CONCATENATE.csv",FILE_READ|FILE_CSV);
   //if(handle==-1)Print("Не удается загрузить файл");
   if(init_data()==false)error=true;
   if(error==false)load_data();
   if(error==false)count_data();
   if(error==true)Print("---------->>>>>>> ERORR!!! <<<<<<<<<--------------");
  // setparam();
   Print ("Инит завершён успешно, error = ",error);
   return (0);
 }
 */
//+------------------------------------------------------------------+
//| Завершение работы робота                                         |
//+------------------------------------------------------------------+

int deinit()
{
   Print (" Завершение работы робота "); 
   return (0);
}
int start()
{
  // if(iTime(Symbol(),0,0) == prevtime) return(0);    //ждем нового бара
 //  prevtime = iTime(Symbol(),0,0);                   //если появился новый бар , включаемся    
   Print (" Старт после нового бара"); 
   setparam();
...
 

Got it. Everything has to be glamorous now... :-)


void OnTick() 


int init()
 {
   //handle=FileOpen("COT - U.S. DOLLAR CONCATENATE.csv",FILE_READ|FILE_CSV);
   //if(handle==-1)Print("Не удается загрузить файл");
   if(init_data()==false)error=true;
   if(error==false)load_data();
   if(error==false)count_data();
   if(error==true)Print("---------->>>>>>> ERORR!!! <<<<<<<<<--------------");
   setparam();
   Print ("Инит завершён успешно, error = ",error);
   return (0);
 }

 
//int start()
void OnTick() 
{
  // if(iTime(Symbol(),0,0) == prevtime) return(0);    //ждем нового бара
 //  prevtime = iTime(Symbol(),0,0);                   //если появился новый бар , включаемся    
   Print (" Старт после нового бара"); 
 

Good afternoon, gentlemen programmers!

I'm writing ZigZag. There are 2 problems:
1. Inadequate rendering of the last ray (see picture in GREEN).
2. For the indicator to draw new fractures, you have to forcibly restart the indicator.

What can it be? I've already racked my brains :)

the ZigZag beam is hanging(

 
Shuba:

Good afternoon, gentlemen programmers!

I'm writing ZigZag. There are 2 problems:
1. Inadequate rendering of the last beam (see picture in GREEN).
2. For the indicator to draw new fractures, it is necessary to restart the indicator forcibly.

What can it be? I've already racked my brains :)

Show code
 

The first problem seems to have been solved by inserting buffer zeroing.

But the second problem is still a mess...

The code is in the attached file.

Files:
my_zz.mq4  16 kb
 

The second issue has also been dealt with. The discussion and code options herehttps://www.mql5.com/ru/forum/127756 helped.

 
Good evening!
Please help me to write a simple indicator (Expert Advisor) for breakdown of horizontal levels.
I've written everything, but I can't find any errors. The alerts do not work.

The idea for the indicator:
- setting two horizontal levels (can be moved manually to the desired level).
- When price crosses the top level from bottom to top, an alert is triggered.
- When price crosses the bottom level from top to bottom, an alert will be triggered.