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

 
Gupalyuk:
I've already broken my eyes, I can't find where brackets are missing, I get errors like '(' - unbalanced left parenthesis test.mq4 31 8 (starting from the line where TrendDetection() is called)

I need help, I am still just learning...


#define BULL 1;
#define BEAR 2;

There is an error in the first two lines. Remove ;
 
AlexeyVik:

The Volga GAZ 21 also works. And even the president drives one, but for some reason no one buys it for use. They only buy it as an antique.


I see, then I won't fix the old ones.
 
Mislaid:
Ошибка в первых двух строках. Уберите ;
Thank you! (Laughs) I hadn't noticed the elephant.)
 
Hello. I am writing, or rather adding an indicator to mq4, I have the following problem: an indicator buffer of the double type is assigned a normalized value of the double type calculated by subtracting the price of Low from High, but it periodically assigns the value equal to 2147483647,0 to the indicator buffer, but another buffer array of the same type, which calculates the average of the first buffer takes exorbitantly large values. How could it be? Who faced this problem?
 
Alexandr527:
Hello. I am writing, or rather adding an indicator to mq4, and I have the following problem: an indicator buffer of the double type is assigned a normalized value of the double type calculated by subtracting the price of Low from High, but it periodically assigns the value equal to 2147483647,0 to the indicator buffer, but another buffer array of the same type, which calculates the average of the first buffer takes exorbitantly large values. How could it be? Who encountered such a thing?

This is the value of EMPTY_VALUE

Look for where it slips through.

 
Hello Dear Sir, Can you help me please? I need an EA that will close part of an open order after reaching a certain level in pips. For example, close 0.2 lot after reaching a profit of 100p, close 0.5 lot after reaching another 50p, and close 0.3 lot after reaching another 50p (total 200p).
 
Good afternoon, please direct me to where to find an explanation of my question (I assume I am not the first to ask it) and what to do. I have installed MT4 on my smartphone, but the charts are 20 min late - I compare it with the MT4 readings on my PC.
 
Hello!

I ran into a problem in the function that will take a screenshot of the chart 30 ticks after closing an order. I do not know how to skip arrays that have already reached 0 in the loop. Can you give me some advice or suggest another method?

int CloseFoto=0,FotoCount=0,FotoTime[500];
//******************************************************************************  
void foto()
  {
// 
   if(CloseFoto!=TicketCloseLastPos(SSymb,-1,ExpertMagicNumber))
     {
      FotoCount++;
      CloseFoto=TicketCloseLastPos(SSymb,-1,ExpertMagicNumber);
      FotoTime[FotoCount]=30;
     }


   for(int i=1; i<=FotoCount;i++)
     {
      FotoTime[i]--;   
      if(FotoTime[i]==0)
        { //  30 tiks ok
         // screnshots
        }
     }
  }
 
abeiks:
Hello!

I ran into a problem in the function that will take a screenshot of the chart 30 ticks after closing an order. I do not know how to skip arrays that have already reached 0 in the loop. Can you give me some advice or suggest another way?

If I understood correctly, the photo needs one at the end of 30 ticks, and not for each of 30 following ticks after the position is closed?

Wouldn't it then be easier to time the photo? Say, after 30 seconds from the order closing time?

 
evillive:

If I understand correctly, you need one photo after 30 ticks, not for each of the next 30 ticks after the position is closed?

Wouldn't it then be easier to take a photo by time? Say, after 30 seconds from the order closing time?

The photo needs one after 30 ticks. The chart will be ticks so it will be 30 ticks. But in any case, we should work with the array. If other orders are closed within 30 seconds, we will have to count 30 seconds from the other orders as well.
Reason: