Errors, bugs, questions - page 628

 
stringo:
Is the file Unicode or ANSI? If the latter, then when opening a file, you need to explicitly write the FILE_ANSI flag
even with ANSI it's the same ... 0 is returned and there's nothing in the array
 
openlive:
Even with ANSI it's the same ... 0 is returned and the array is nonsense.

Sorry, we didn't see it right away. The FileReadArray function is not applicable to your file.

Arrange element by element reading from CSV, like in 4

 
and which file you can work with
 
openlive:
and which file you can work with
Look at the help for functions to read and write arrays to a file.
 
alexvd:
Look at the help for functions to read and write arrays to a file.
help -
two-dimensional i.e. FileReadArray function doesn't work with multidimensional arrays... but in C++ please help write. help code C++
 
openlive:
Help -
binary i.e. FileReadArray function doesn't work with multidimensional arrays...

Who told you that?

Try modifying your own example to work with a binary file and you'll be happy.

 

Cannot display trade levels(CHART_SHOW_TRADE_LEVELS) on the chart object. Any other property to change in this case comes out.

---

For example, knowing the object name, get its identifier and then change the object property-(a):

subchart_id=ObjectGetInteger(0,chartname,OBJPROP_CHART_ID); // получим идентификатор объекта-графика
//---
ChartSetInteger(subchart_id,CHART_SHIFT,true);
ChartSetInteger(subchart_id,CHART_SHOW_TRADE_LEVELS,true);
The indentation is enabled, but the trade levels that currently exist on the same symbol are not displayed.

---

What could be the problem?

 
alexvd:

Who told you that?

Try modifying your own example to work with a binary file and you'll be happy.

I haven't worked with binary files, at least give me a hint how to create one and add data to it
 
openlive:
not working with binary files, at least give me a hint on how to create one and add data to it
For example
 
denkir:
For example
//zadaem ramer svechi OHLC
double o=1.0, h=1.0, l=1.0, c=1.0;
   int handle=FileOpen("databin.dat",FILE_WRITE|FILE_BIN);
   FileWriteDouble(handle,o);
   FileWriteDouble(handle,h);
   FileWriteDouble(handle,l);
   FileWriteDouble(handle,c);
   FileClose(handle);
  
//zapolnayem massiv iz bin faila  
double mas[1][4];
   int handle1=FileOpen("databin.dat",FILE_READ|FILE_BIN,';');
   int numb=FileReadArray(handle1,mas); 
   FileClose(handle1);
//result
  for (int i=0;i<1;i++){
  Print(handle,mas[i][0],mas[i][1],mas[i][2],mas[i][3]);}

I tried an example, it still shows different values

2012.02.01 12:54:02 (EURUSD,H1) 11.0 1.0 1.0 1.0

why 11 I do not understand

Reason: