I know how to export historical data from mt4, but what if I need live tick data?
How to program an EA for mt4 to export tick data to a txt file?
Look at http://docs.mql4.com/files and http://docs.mql4.com/predefined/variables
Set up a loop with short sleep and write ask/bid to file if changed