Binary Tick Writer

 

Greetings,

WHAT:

This ea will write binary files that can be accessed by other applications in real time. Plus you can easily access the end of the file. Change it to suit yourself. I will continue to improve it over time.

WHY: * Export data to another application for analysis or trading.

* Build price based bars eg Renko, Range, P&F ect in real time.

HELP: * I can steer you in the right direction or help/write an app to format the data into something you want if required.

Format:

Date: Integer - yyyymmdd (System Local - I set my local time to EEST (Athens) so that I have no Sat or Sunday)

Time: Integer - time in secs since midnight - system local

Bid: Integer;

Ask Integer;

I do not use doubles for the prices as I always find ints easier to work with and occupies half the disk space. Convert to doubles if you need/want to. I suggest just for display. These files will grow endlessly of course so check them now and then. I am only a beginner at MT4 programming so if you want to fix all my errors then please do. I have had it running for more than a month with no problems. Also console executables for conversion to/from ascii. These have to be run nonstop during trading hours of course.

UPDATE:

Here is a new version. TickWriterBin_01

SymbolList: Default = "AUDUSD,EURCHF,EURGBP,EURJPY,EURUSD,GBPJPY,GBPUSD,USDCAD,USDCHF,USDJPY";

Symbols should be separated by a comma. Although if you mess up and leave a space in it will not matter. Just edit that line in the file and recompile

to suit your own preferences.

SleepFor Default = 500: Which is 1/2 second.

AllowDuplicates Defaut = False: This will not write duplicate ticks if the bid and ask are the same as the previous.

IsRounded: Default = True: This will round 5 digit prices to 4 digits. If the Ceil(price) prev. Thus no ghost prices. 4 Digit users should set it to False.

ShowList Defalt = True: Show the symbol list on the screen?

extern bool DEBUG = False; // Just prints some debugging information for the rounding.

The reason for rounding to 4 digits is that these files grow to be monsters otherwise. Suit yourself.

I have not tested it very much please advise me of any bugs. The old version was a dog. Delete it.

The bin.rar file contains the console applications asctofxh.exe and fxhtoasc.exe to covert to and from binary and ascii use -h to see help

Cheers

Files:
bin.rar  316 kb
 

Can you explain what application this could be used for? For example, could it be used with an Excel spreadsheet and actually insert the values cell after cell? If so, I have been looking for something like this for literally YEARS.

Thanks,

Ms_Mel

 

using data

Hello,

This data is in binary format, not text. This means it is not readable. If you try to open one in a text editor you will see what I mean. Then create a human readable file by using the fxhtoasc.exe that I have provided. Now you can read the data and have a think about what it is you want to do and if this looks useful for you. You can convert it into anything you want with simple programs and you can export it into other trading platforms for trading and backtesting etc. This can also be done in real timel. There is nothing that you cannot do. If you cannot do it yourself then it should not be a problem to find someone to help you for free or otherwise. I am a bit busy but I can help out for minor things.

The MT4 ea is terrible. It is a quick patch. It will not log its connection state nor do comprehensive error checks. All these I have yet to fix. I started a few today just to clean it up and I will post a better version sometime. However it has worked non stop for me. If you give me some idea of what it is you want to do in the spreadsheet then I may be able to suggest a more appropriate solution that can make use of this data. A spreadsheet will turn into a monster with the amount of data that gets churned out.

cheers

 

new version

see first post

 

Here are the conversion exe

asctofxh.exe and fxhtoasc.exe to covert to and from binary and ascii

console applications use -h to see help

 

Mr Moderator please move

Mr Moderator please move to "To Tools & Utilities"

 

Thankyou, painless.

I'm impressed with your approach!

I'm myself trying to construct and backtest a renko EA.

Would it be possible to ask you to share a datafile with historic tick data? I just need for backtesting purposes.

 

Data File

pm me if you want one. Mine are already too large too post here.