[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 446

 
FAQ:

Is it a five-digit broker?

Give me more information, what kind of broker? If not, you'll be like a blonde and a car...

The broker ishttp://fxstart.org/trader/conditions/

Interbank quotes

The code is standard:

ticket_buy=OrderSend(Symbol(), OP_BUY, value, MarketInfo(Symbol(), MODE_ASK), 0,

MarketInfo(Symbol(), MODE_BID)-sl_tp*point, MarketInfo(Symbol(), MODE_ASK)+sl_tp*point, "Purchase made", 777, 0, Green);

 

I am just curious - if the order is not being placed, there must be a mistake? And you probably could not read it and correct it?

/*place an order with a zero take and stop, and then correct it, it's like they introduced ESP execution*/

 
FAQ:

I am just curious - if the order is not being placed, there must be a mistake? And you probably can't read it and correct it?

/*Put an order with zero take and stop, and then correct it.

I'm not trying to do this, but the logs are clean!

"If this is a question of stops, it's just akind of contingency insurance

 
vall:

that's the thing - the logs are clean!

"If the question is about stops, it'san insurance option in case of emergency

You put an order without stops and takeovers and watch whether it opened or not!

Setting of stops and take's in your brokerage company on this type of trading account is possible ONLY through modification of zero values set before.

 
Roman.:

Place an order without stops and takeovers and watch whether it opened or not!

Setting stops and take's in your DC on this type of trading account is possible ONLY by modifying their previously set zero values.


Thank you, that helps.

it turns out you need to open an account with 0 and then modify by introducing stops?

 
vall:

Thank you, that helps.

So you have to open an account from 0 and then modify it by entering stops?

I would have to open an order with zero values of these parameters, and then modify them by modifying the open order.

 
Roman.:

open an order with zero values of these parameters, then modify them by modifying the open order.


Thank you, are the stops set to the accuracy of the chart symbols, i.e. 0.00001 or to the accuracy of 0.0001?
 

The logs are clean, because no one will do the error detection and error handling for you.

Спасибо, стопы устанавливаются в точностью до символов графика, т.е. 0,00001 или с точностью до 0,0001?

MarketInfo is in your hands.

 
Vinin:

No one is willing to deal with your question. Although you could have answered your question a long time ago, if you wanted to, of course.
That's what I believe... Believe me, sometimes willingness alone is not enough to answer your own question
 

Good afternoon... Question about FileIsEnding and FileIsLineEnding functions. In order to understand how FileIsEnding and FileIsLineEnding functions work, I wrote the following script:

//+------------------------------------------------------------------------------------------+
//+------------------------------------------------------------------------------------------+
//|                         script program start function                                    |
//+------------------------------------------------------------------------------------------+
#property show_inputs                                                    //выводим перед запуском скрипта окно свойств
extern int  position=0;                                                  //внешняя переменная: смещение файлового указателя ОТ НАЧАЛА ФАЙЛА (в БАЙТАХ)
//---------------------------------------------------------------------------------------- 1 -
int start()                                                              //функция start
  {                                                                      //начало start
   double Timestart=GetTickCount();                                      //переменная, с помощью которой вычисляется время (в милисекундах) начала выполнения эксперта 
   string name="Копия Запись чисел в файл.csv";                          //имя создаваемого файла
   bool h;                                                               //переменная: значение функции FileIsEnding
   bool h_l;                                                             //переменная: значение функции FileIsLineEnding
   int error;                                                            //переменная: ошибка
   int handle=FileOpen(name,FILE_CSV|FILE_WRITE,';');                    //открываем заданный файл n записываем туда данные
   int запись=FileWrite(handle,DoubleToStr(1.3584,4));                   //записываем цены OHLC в файл csv (в преобразованном виде, т.е в виде текста)
   FileClose(handle);                                                    //закрываем файл
//---------------------------------------------------------------------------------------- 2 -
   handle=FileOpen(name,FILE_CSV|FILE_READ,';');                         //открываем заданный файл
   bool pos=FileSeek(handle,position,SEEK_SET);                          //смещаем от начала вправо указатель файла
   double чтение=FileReadNumber(handle);                                 //считываем число из текущей позиции (уже измененной функцией FileSeek) файлового указателя
   int size=FileSize(handle);                                            //вычисляем размер заданного файла
   h=FileIsEnding(handle);                                               //устанавливаем текущее значение переменной h
   h_l=FileIsLineEnding(handle);                                         //устанавливаем текущее значение переменной h_l
   error=GetLastError();                                                 //значение ошибки, производимой функцией FileIsEnding
   if(error!=0)Alert("Текущая ошибка ",error);                           //если код текущей ошибки не равен 0, то получаем номер текущей ошибки
   FileClose(handle);                                                    //закрываем файл
//----------------------------------------------------------------------------------------- 3 -
   Comment("Размер файла ",name," составил ",size," байт",
           "\nФункция FileSeek вернула: ",pos,
           "\nФункция FileReadNumber(handle) вернула: ",чтение,
           "\nФункция FileIsLineEnding(handle) вернула: ",h_l,
           "\nФункция FileIsEnding(handle) вернула: ",h,
           "\nСкрипт выполнялся всего ",GetTickCount()-Timestart," миллисекунд, из них: ",MathFloor((GetTickCount()-Timestart)/1000)," секунд ",((GetTickCount()-Timestart)/1000-MathFloor((GetTickCount()-Timestart)/1000))*1000," миллисекунд");//печать сообщения на экран
//----------------------------------------------------------------------------------------- 4 -
   return(0);                                                             //выход из start
  }                                                                       //конец start
//-------------------------------------- КОНЕЦ START -------------------------------------- 5 -

In block 1-2, I opened and wrote the number 1.3584 (which the DoubleToStr function converts to text) to the file.

In block 3-4, I opened the file and read the number written there.

The intended purpose of the extern int position external variable is to try to understand how FileIsEnding and FileIsLineEnding functions work and what a file pointer is by moving the file pointer using FileTell function.

The MQL4.community book says that the file pointer is an analogue of the text cursor.

BUT, running the script several times and changing each time the external variable postiton to 1 (i.e., thereby moving the file pointer 1 byte to the right of the beginning of the file), the Comment function outputs a number of messages, e.g:

if postiton=7, the message would look like this:


if postiton=8, the message would look like this:


I understand that since string constants take up 8 bytes in PC memory and there is only 1 converted number in the file, then shifting the file pointer 8 bytes to the right will give me a 4099 error (which means that the end of the file has been reached). I also understand that the FileIsEnding function returned 1 (true) for the same reason (file end reached). But I don't understand why the FileIsLineEnding function returned 0 (false, which means that the file pointer has not reached the end of the line). After all, based on the analogy given in the MQL book (a file pointer is roughly the same as a text cursor), I reasoned that the end of the file is also the end of the string. But given that FileIsEnding and FileIsLineEnding have different values when the file pointer reaches the end of the file, I'm stumped in terms of WHAT IS A FILE Pointer

Question:

1. What is a file pointer?

2. Why don't the end of a line and the end of a file coincide (when a file pointer reaches the end of a file)?

P.S. In order not to clutter up the forum, thank you in advance for the answer