[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 958

 
artmedia70:

You write without punctuation - the idea is poorly grasped...

If I understand correctly, if you cross your level and the price goes above (for Buy) or below (for Sell) that level by no more than 25 pips, and then the price returns with a reverse cross of that level in the opposite direction, it should be considered a rebound from the level. If the price crosses more than 25 pips, it should be considered a breakout. Is it so?

Until you write down exactly what you need, nobody will help you. But it's very easy to help - the problem is for nursery school...

Opening the bar 1.6023, closing 1.6087, rebound at 1.6075 -1.6125 only within this range and so on at every level of 1.5000, 1.5100, 1.5200 and so on.

 

Good afternoon!

Trying to write to a file using the code below.

As it says in the documentation the file will not be overwritten if the combination of options FILE_READ | FILE_WRITE is used.

But it is overwritten and thus there is always only one line in the file. What could be the problem?

int start()
{
   int fd, fr;
   string FileName = "rates.csv";
   fd = FileOpen(FileName, FILE_READ | FILE_WRITE | FILE_CSV, ";");
   if(fd < 1)
   {
      Print("Файл не найден: ", GetLastError());
      return(false);
   }
   else
      fr = FileWrite(fd, Close[0], Open[0], High[0], Low[0]);
   FileClose(fd);
   return(0);
}
 
fevrall:

Good afternoon!

I'm trying to write to a file using the code below.

As it says in the documentation the file will not be overwritten if the combination of options FILE_READ | FILE_WRITE is used.

But it is overwritten and thus there is always only one line in the file. What could be the problem?


they must have forgotten to do that:

https://docs.mql4.com/ru/files/FileSeek

?

 
IgorM, you are right! Thank you!
 
artmedia70:

Artemida70, please answer a problematic question for me.
1.Last time I logged onto the forum, I accidentally made several identical posts.
I saw that, but didn't know how to delete the extra posts. The moderator reprimanded me for this oversight. Please tell me how to delete redundant posts from the forum, I myself for this situation is embarrassing.
2. When I compile a program gives me an error message, which specifies the line number and number of characters where the error is located. Is it possible to number lines, without numbering lines in the program it is difficult to find errors.

THANK YOU

 

Hello, Mr. Expert Advisors.

When switching to mql4 from mql5 (as paradoxical as it may seem), while rewriting an Expert Advisor which was already created, I noticed that there is no function OrderGetInteger(ORDER_STATE) in mql5. If it is implemented in mql4, please give me a link. If there is no such a built-in function, please share the code for solving this problem (remind me: order state - set/open/CL/TR/deleted, etc.).

Thank you for your consideration.

 
boris.45:

Artemida70, please answer the problematic questions for me.
1.Last time I went to the forum, I accidentally made several identical posts.
I saw it, but didn't know how to delete the extra posts. The moderator reprimanded me for this oversight. Please tell me how to delete redundant posts from the forum, I myself for this situation is embarrassing.


As you can see, I cannot edit or delete Victor's post. I can either edit or delete my own post.

2.When compiling the program, an error message is given, indicating the line number and the number of the character where the error is located. Is it possible to number the lines, without numbering the lines in the program it is difficult to find errors.


Double click on the icon I marked with an arrow and ... ...oh, my God! ... the cursor will go to the exact same line and symbol...

 
slipkorn:

Hello, Mr. Expert Advisors.

When switching to mql4 from mql5 (as paradoxical as it may seem), while rewriting an Expert Advisor which was already created, I noticed that there is no function OrderGetInteger(ORDER_STATE) in mql5. If it is implemented in mql4, please give me a link. If there is no such a built-in function, please share the code for solving this problem (remind me: order state - set/open/CL/TR/deleted, etc.).

Thank you for your consideration.

I think you will find examples of how to solve the problem in this thread. Or you can write them yourself... :)
 

Friends help .... It's not working properly.

I want the colour green for the set minutes ( 45 min. to 15 min. - green and from 16 min. to 44 min. - colour red) change colour.

Here's what I do ...

Why isn't it working properly !!!!!!

 if (Minute()>=45 && Minute()<=15)
   {
         colorC = LimeGreen;
   }
   
   if (Minute()>=16 && Minute()<=44)
   {     
          colorC = Red;
   }

 
itum:

Friends help .... It's not working properly.

I want the colour green for the set minutes ( 45 min. to 15 min. - green and from 16 min. to 44 min. - colour red) change colour.

Here's what I do ...

Why isn't it working properly !!!!!!


try it this way:

int minuta=TimeMinute(TimeCurrent());
if (minuta>44 && minuta<14) colorC = LimeGreen;   else colorC = Red;
Reason: