export stop price in Excel

 

Hi everybody,

I'd like to insert in my expert a function that writes in an Excel file the initial stops of my trades.

Could you help me?

Thank you!

 
Alberto_jazz:

Hi everybody,

I'd like to insert in my expert a function that writes in an Excel file the initial stops of my trades.

Could you help me?

Thank you!


truly excel you can not write from metatrader, but CSV files you can read and write: https://docs.mql4.com/files

if its neccesary to have excel file (format) i guess you need to write some dll.

 

Thank you for the answer.

I’m trying with the following expert, but the expert writes the variable Open[0] every time in the same cell.

int start()
{

int handle;

handle=FileOpen("Prova.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
FileWrite(handle, Open[0]);
FileClose(handle);
}


}

Is there the possibility to obtain an array of Open[0] prices in a column?

Thank you!

 
Alberto_jazz:

Thank you for the answer.

I’m trying with the following expert, but the expert writes the variable Open[0] every time in the same cell.

int start()
{

int handle;

handle=FileOpen("Prova.csv", FILE_CSV|FILE_WRITE, ';');
if(handle>0)
{
FileWrite(handle, Open[0]);
FileClose(handle);
}


}

Is there the possibility to obtain an array of Open[0] prices in a column?

Thank you!

Hi

Here is what you are looking for:

https://www.mql5.com/en/code/8175