GrumpyDuckMan:
I would like to import to a Excel spread sheet for further analysis. How do I make the file available?
(Note: I am not deleting previous entries)
- Makes no sense. Open it in Excel, It's available like any other file. It's in <Data Folder>\files since 17.02.2014
Data Structure in MetaTrader 4 Build 600 and Higher - MQL4 Articles 17.02.2014 - You are writing one string. If you make it a CSV (not TXT) then you can write multiple items per line with the appropriate separator, (see below.)
- You are overwriting each time because you never seek to the end.
int APPEND = FILE_CSV|FILE_WRITE|FILE_READ; string nameOPT = WindowExpertName() + ".OPT"; int handleOPT = FileOpen(nameOPT, APPEND, '~'); if(handleOPT < 1){...} FileSeek(handleOPT, 0, SEEK_END);
Hello whroeder1,
It works. Thank you
void Market_Watch() { CurrentSymbol = SymbolName(Next_Symbol,TRUE); // 23 pairs in watch window CurrAsk = MarketInfo(CurrentSymbol,MODE_ASK); CurrBid = MarketInfo(CurrentSymbol,MODE_BID); Spread = MarketInfo(CurrentSymbol,MODE_SPREAD); READplus = iADX(NULL,TIMEFRAME,14,PRICE_CLOSE,MODE_PLUSDI,SHIFT); READminus = iADX(NULL,TIMEFRAME,14,PRICE_CLOSE,MODE_MINUSDI,SHIFT); CurrentADX = iADX(NULL,TIMEFRAME,14,PRICE_CLOSE,MODE_MAIN,SHIFT); StochMain = iStochastic(CurrentSymbol,TIMEFRAME,14,3,3,MODE_SMMA,0,MODE_MAIN,SHIFT); StochSignal = iStochastic(CurrentSymbol,TIMEFRAME,14,3,3,MODE_SMMA,0,MODE_SIGNAL,SHIFT); Preiod_IMA = iMA(CurrentSymbol,TIMEFRAME,14,1,MODE_SMMA,PRICE_CLOSE,SHIFT); RSI_14 = iRSI(CurrentSymbol,TIMEFRAME,14,PRICE_CLOSE,SHIFT); MoneyFlow = iMFI(CurrentSymbol,TIMEFRAME,30,SHIFT); if(Next_Symbol==0) { Next_Symbol=23; } WriteToFile(); } //------------------------------------------------------------------+ void WriteToFile() { FileHandle=FileOpen(subfolder+"\\RunTest.csv",Append,','); if(FileHandle!=INVALID_HANDLE) { FileSeek(FileHandle,0, SEEK_END); string DataName = CurrentSymbol; FileWrite(FileHandle,CurrentSymbol,CurrAsk,CurrBid,Spread,CurrentADX, READplus,READminus,StochMain,StochSignal,Preiod_IMA,RSI_14,MoneyFlow); } else Print(Error,GetLastError()); FileClose(FileHandle); Next_Symbol--; Market_Watch(); } //+-----------------------------------------------------------------+
Hello again,
Just a quick one.
Is FileSeek Offset used only in "Filename.txt"?
FileSeek(FileHandle,255, SEEK_END);
I can't see any difference changing its value with "Filename.CSV"
Hello again,
Just a quick one.
Is FileSeek Offset used only in "Filename.txt"?
I can't see any difference changing its value with "Filename.CSV"
Hello Hohammad,
Excuse me if my current newbie understanding in incorrect.
FileSeek(FileHandle,0, SEEK_END); string DataName = CurrentSymbol; FileWrite(FileHandle,CurrentSymbol,CurrAsk,CurrBid,Spread,CurrentADX, READplus,READminus,StochMain,StochSignal,Preiod_IMA,RSI_14,MoneyFlow);
Code above:
FileSeek is looking for the handle to finish. The pointer counts until end of line. It restarts and processes for the next line, after the pointer index is incremented next.
Hello again,
After trying to graph my results today with 25 pairs for 12 hours with a 1 hour timeframe proved information. My test was not really any sort of success, just very messing graphs.
I will try again with 1 pair over 12 hours.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone,
I have had this on the back burners for some time now.
I have removed some parts of the code so that it is hopefully easier to read. (note: Full code isn't functioning)
I would like to import to a Excel spread sheet for further analysis.
How do I make the file available?
(Note: I am not deleting previous entries)