Zum Inhalt springen
View in the app

A better way to browse. Learn more.

#T/N/X/T

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Library zum CSV/Excel File schreiben

Geschrieben

Hallo Zusammen,

 

kennt ein Mitglied eine Library zum CSV/Excel File schreiben.

Ich würde die Library gerne in einen Indikator einbauen

und damit definierte Informationen

zur weiteren Auswertung in ein separates File schreiben.

Featured Replies

Geschrieben

Hallo Zusammen,

 

kennt ein Mitglied eine Library zum CSV/Excel File schreiben.

Ich würde die Library gerne in einen Indikator einbauen

und damit definierte Informationen

zur weiteren Auswertung in ein separates File schreiben.

 

...keine Library, aber ein kleines Beispiel, um aus einem EA direkt eine .csv-Datei zu schreiben:

http://forum.mql4.com/44166

 

ciao,

zentrader

Geschrieben

Ich habe mir für die Ausgabe diese Funktion geschrieben,

vielleicht ist es auch das was du suchst

 

void write_in_csv_file(string text,            // Ausgabetext
                      string output_file,     // Ausgabedatei
                      bool new_file = false)  // bei true wird die Datei überschrieben
{
  int handle; 
  
  if(new_file) 
       handle = FileOpen(output_file, FILE_CSV|FILE_WRITE);           // ueberschreibe File
  else handle = FileOpen(output_file, FILE_CSV|FILE_READ|FILE_WRITE); // weiterschreiben

  if(handle > 0) {
     if(!FileSeek(handle,0,SEEK_END)) Print("  ERROR FileSeek() ", GetLastError());
     if(FileWrite(handle, text) < 0)
        Print("  ERROR FileWrite() ",output_file,"  ", GetLastError());
     FileClose(handle);
  }
  else Print("  ERROR FileOpen()", output_file, "  ", GetLastError());
}

Geschrieben

... kennt ein Mitglied eine Library zum CSV/Excel File schreiben.

In der MQL4-Codebase gibt es eine Delphi-Library "mt4excel.dll".

Ich habe die Library nicht ausprobiert, aber vielleicht ist es das was Du suchst ?

 

mt4excel.dll is a library written in Delphi. At calling the DLL, the COM library is initialized.

At calling, an OLE object is created, MS Excel is opened, a new book and page are created by template or an existing Excel file is opened (depending on the function).

...

siehe Codebase-Artikel: http://codebase.mql4.com/3672

Geschrieben

Nachtrag:

 

Im o.g. Codebase-Artikel wird in den Kommentaren auf eine kommerzielle Lösung hingewiesen:

 

http://www.fxdialogue.com/

http://www.fxdialogue.com/en/mexcel-trader

 

Da soll es ein Excel Plug-In for MetaTrader 4 geben, womit Accountdaten, Kurse, Indikatorwerte von MT4 nach Excel und Orderaufgabe von Excel nach MT4 möglich sein soll.

Geschrieben
  • Autor

Als erstes vielen Dank für die Vorschläge ;=)

 

Ich werde als erstes das "Excel Plug-In for MetaTrader 4" prüfen.

Sollte ich nicht zum Erfolg kommen würde ich die Funktion

void write_in_csv_file(.........) nutzen.

 

Zum Test "Excel Plug-In for MetaTrader 4" werde ich ein Feedback einstellen.

Dein Kommentar

Du kannst jetzt schreiben und Dich später registrieren. Wenn Du ein Konto hast, melde Dich jetzt an, um unter Deinem Benutzernamen zu schreiben.

Gast
Auf dieses Thema antworten...

Account

Navigation

Suche

Suche

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.