[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 322

 

I run some functions as a test script to see if there are any compilation errors and which ones to check if they work or not in the terminal. I took today the Pre-calculation function of bars in the window:

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

int start()
  {
      int A = 100;
//+------------------------------------------------------------------+  
      if(Bars < A)             // Недостаточно баров
      {      
      Alert("Недостаточно баров в окне инструмента.");
      return;                  // Выход из start()
      }


  return(0);
  }
//+------------------------------------------------------------------+  

Naturally the message *Not enough bars* comes out, but on a new tick I understand this message will appear again indefinitely.

Now I add a variable and add an if statement, and in a future error block Bloc_Error, I put a switch statement and get this:

int start()
  {
      int A = 100;
      bool Work=true;   
//+------------------------------------------------------------------+      
      int Bloc_Error    // Пользовательская функция
//+------------------------------------------------------------------+      
    switch()           // Преодолимые ошибки:
      {
      case 3:          // Неверные параметры:
      Work=false;
      return(0);
      }

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

      if(Bars < A)   // Недостаточно баров
      {      
      Alert("Недостаточно баров в окне инструмента.");
      return;                  // Выход из start()
      }
      if( Work==false)          // Ошибка   
      {      
      Alert("Эксперт не работает.");     
      return;                  // Выход из start   
      }
//+------------------------------------------------------------------+   
  return(0);
   }
The question is what I've done wrong in the switch statement, why isn't the message *Expert doesn't work* popping up, and for the EA to really stop working?????
 
I started to learn the language, of course I have a lot of questions, and it's kind of hard to learn from books. I started with a textbook by Sergei Kovalev, a respected forum member, and some of the articles on this forum... After much theory, began practice, created a template and outline of the first expert, divided it into blocks, and now one function after another to understand how it works, believe me if you diver rather than a programmer, it's not easy to break down everything in my head, and to comprehend what to do. What is not a problem for a professional, for me the real problem so far: today I sat all day and could not solve the problem!
 
Daiver2 писал(а) >>

I run some functions as a test script to see if there are any compilation errors and which ones to check if they work or not in the terminal. I took today the Pre-calculation function of bars in the window:

Naturally the message *Not enough bars* comes out, but on a new tick I understand this message will appear again indefinitely.

Now I add a variable and add an if statement, and in a future Bloc_Error error handler block , I put a switch statement and get this:

The question is what have I done wrong here in the switch statement, why isn't the message *Expert doesn't work* popping up, and for the EA to actually stop working?????

asking the same questions in different branches is considered bad form...

 
DDFedor писал(а) >>

Asking the same questions in different threads is considered bad form...

I'm just lost, I don't understand which branch to ask a question, I haven't seen any forum with so many branches, I feel like there are as many questions as there are branches, so I chose the most frequented ones...

 
Daiver2 писал(а) >>

I'm just lost, I don't know which thread to ask, I've never seen a forum with so many threads, I feel there are as many questions as there are threads, so I've chosen the most visited...

Hang out here, there's always someone passing by...

 
DDFedor писал(а) >>

Hang out here, there's always someone passing by...

>> Thank you!

 
Daiver2 писал(а) >>
I have started to learn the language, of course I have a lot of questions, and it's kind of hard to learn from books. I started with a tutorial by Sergei Kovalev, a respected forum member, and some articles from this forum... After much theory, began practice, created a template and outline of the first expert, divided it into blocks, and now one function after another to understand how it works, believe me if you diver rather than a programmer, it's not easy to break down everything in my head, and to comprehend what to do. What is not a problem for a professional, for me the real problem so far: today I sat all day and could not solve the problem!

That's why you make mistakes on purpose.

 

Hi all!

Has anyone heard of the automatic TAKE PROFIT advisor?

Has anyone used it?

On the site where they sell this advisor, all the reviews are great, but it's not possible to talk to anyone because the site doesn't give a form of communication with people who write reviews there. You can only correspond with the seller.

Help please. Maybe someone has come across this advisor?

 

Dear, - stay away from websites like this...

Especially if there are no online account details to demonstrate its (advisor's) work...

 
rid писал(а) >>

Dear, - stay away from websites like this...

Especially if there are no online account details where his (advisor's) work is demonstrated...

Can I post the address of the site here on the forum, you would look at!

Please don't refuse.

Reason: