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

 
Zhunko:

Redrawing what? Graphic objects or a graphic update?

We are talking about updating indicator buffers and redrawing indicator charts, not objects.
 

Hello! Could you please tell me if it is possible to write to a binary file in this way?

We have a file with the contents "11111 22222 33333 55555".

I need to insert the string of the form "44444 " between 33333 and 55555

I try to use FileWriteString operator, but the output is erased with fives. i.e. in my case, the process goes no further than erasing ones with twos, twos with threes, etc.

all these 11111 etc. are conditional, it is only interesting to understand whether full insertion is possible without mashing what is after the place of insertion?

thanks.

 
Have you written the correct function to find the opening price of the last open order?

Thank you.

double LastOpenPrice()
{
  double MyLastOpenPrice=0;
  for(int Cnt=0;Cnt<OrdersTotal();Cnt++)
  { 
    OrderSelect(Cnt,SELECT_BY_POS,MODE_TRADES);
    if(OrderMagicNumber()==Magic)
    {
      MyLastOpenPrice=OrderOpenPrice();
    }
  }
  return(MyLastOpenPrice);
}

 

When testing on the minutes I noticed a "bug" - The price breaks through the grey line of the indicator, although none of the opening prices do not break through (the red line is an artificial line). Can you advise what kind of test.


 
rustein:
Have you written the correct function to find the opening price of the last open order?

Thank you.


OrdersTotal()-1
 
rustein:
Have you written the correct function to find the opening price of the last open order?

Thank you.


No. Where do you have the open time comparison?
 
Thanks for the tips, I'll get to the bottom of it.
 
Gravitus:

Hello! Could you please tell me if it is possible to write to a binary file in this way?


The only way to insert information between an already existing file is to create a new file and overwrite the initial part of the old file, then write the new (inserted) information, and finally add the rest of the old file. There are no options!

SZY There is actually an option. To write everything in the original file, but first you need to memorize the contents from the insertion point to the end, write the insertion and add the memorized information. The advantage is that you don't need to create another file. The disadvantage is that the original file is permanently lost.

 
YOUNGA:

When testing on the minutes I noticed a "bug" - The price breaks through the grey line of the indicator, although none of the opening prices do not break through (the red line is an artificial line). Can you advise what kind of test.


So it's not the opening price that has broken through, it's the minimum price.
 
rustein:
Thanks for the tips, I'll get to the bottom of it.
Already sorted.:-)