to real time tick by tick mt4 at excel..
good morning to all,
I would like to save to a excel file line tick by tick the value of the last contract with the volumes and with time ..
if possible with the timing at the desired time, every 5 seconds ... there is an EA that does this work with ...
I do not want to use too dde ...
Do you mean using excel in realtime alongside with MT4 /5 EA? iam working that now. Have look at the previous job.
thank you
explain better than I do not understand?
thank you
thanks again kindness
good morrning,
this EA work pwell but problem is this no save in the my pc "C:\\Utenti\\mack\\Desktop\\\cartel221.xlsx",cartella) , and if i work one new file excel for other work.. thisAE go at write in the new file always ,,,,and
no leaave me work in the excel.. if i no open one new session of excel..
#property version "1.00" #property strict //Importo le funzioni dalla libreria. #import "mt4excel.dll" bool ExcelOpen(); bool ExcelClose(); bool ExcelOpenFile(char &FileName[]); bool ExcelSave(); bool ExcelSaveAs(char &FileName[]); bool ExcelAddSheet(char &Name[]); double ExcelGetValueCell(int X,int Y); string ExcelGetTextCell(int X,int Y); string ExcelGetFormulaCell(int X,int Y); bool ExcelSetValueCell(int X,int Y,double Value); bool ExcelSetTextCell(int X,int Y,char &Value[]); string ExcelGetLastErrorText(); #import //+------------------------------------------------------------------+ //| Variabili globali | //+------------------------------------------------------------------+ int Riga; //+------------------------------------------------------------------+ //| Expert initialization function | //+------------------------------------------------------------------+ int OnInit() { ExcelOpen(); //Apro il file. //Preparo i vettori. char valuta[],data[],orario[],ask[],bid[],volume[]; //Trasformo le stringhe in vettori di caratteri. StringToCharArray("Valuta",valuta); StringToCharArray("Data",data); StringToCharArray("Orario",orario); StringToCharArray("Ask",ask); StringToCharArray("Bid",bid); StringToCharArray("Volume",volume); //Scrivo il nome di ogni colonna. ExcelSetTextCell(1,1,valuta); ExcelSetTextCell(1,2,data); ExcelSetTextCell(1,3,orario); ExcelSetTextCell(1,4,ask); ExcelSetTextCell(1,5,bid); ExcelSetTextCell(1,6,volume); //Aggiorno la riga. Riga=1; return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Expert deinitialization function | //+------------------------------------------------------------------+ void OnDeinit(const int reason) { //Preparo il vettore. char cartella[]; //Trasformo la stringa in un vettore di caratteri. StringToCharArray("C:\\Utenti\\marco1234\\Desktop\\\cartel221.xlsx",cartella); //Salvo il file nella cartella specificata. ExcelSaveAs(cartella); //Chiudo il file. ExcelClose(); } //+------------------------------------------------------------------+ //| Expert tick function | //+------------------------------------------------------------------+ void OnTick() { //Preparo i vettori. char simbolo[],data[],orario[]; //Trasformo le stringhe in vettori di caratteri. StringToCharArray(Symbol(),simbolo); StringToCharArray(TimeToStr(TimeCurrent(),TIME_DATE),data); StringToCharArray(TimeToStr(TimeCurrent(),TIME_MINUTES|TIME_SECONDS),orario); //Scrivo i dati sul file. ExcelSetTextCell(Riga,1,simbolo); ExcelSetTextCell(Riga,2,data); ExcelSetTextCell(Riga,3,orario); ExcelSetValueCell(Riga,4,Ask); ExcelSetValueCell(Riga,5,Bid); ExcelSetValueCell(Riga,6,Volume[0]); //Aggiorno la riga. //Riga++; } //+------------------------------------------------------------------+
some more coding needs to be done to allow you save to your pc. have you got skype for more details.
good morning to all,
I would like to save to a excel file line tick by tick the value of the last contract with the volumes and with time ..
if possible with the timing at the desired time, every 5 seconds ... there is an EA that does this work with ...
I do not want to use too dde ...
thanks in advance to all and good day