can mql5 be used to login to a web site using username and password and download a page after the login page?
If you intent on working with html, you're much better off writing a python script to parse the web-page and then save the extracted data to a friendly file format in the /files folder for EA processing.
Well, if so, then is there a way for mql5 to listen to the folder changes and run a code? i.e. automate the whole process.
Yes for this mql5 offers the function OnTimer(). Place the cursor on OnTimer in the editor and press F1 - start reading.
Beside that you can use a RamDisk (instead of writing it to the hd) but then you have to use the file-functions of Windows' kernel32.dll (with a W( in the function names not an A(!!)