Customising Publisher

 

Hi guys, this is my first thread in this cool forum, excuse my Aussie spelling, and being new I hope I posted this post in the right section. I am trying to customise Publisher in MT4 and am wondering if anyone can point me in the right direction with getting some .gifs of charts.

I want to be able to display all of my MT4 and VPS data one the webpage. I am sick of logging into remote computers when I just want a quick overview. I can view basic html pages on my mobile phone too, so can check trading on the run.

Currently I have done some pretty heavy modifications to my statement that is published and it looks really cool. I renamed detailedstatement.htm to statement.htm (in mt4/templates etc) so that the profit chart and stats were displayed. With some html editing skills, I then overwrote the function with XXXXX

Account: Name: Currency:

by editing the .htm file in notepad, so that privacy information was removed.

I then did similar for , moved a few things around, and adjusted the header of the document not to show that information either. I then moved the html around so that CLOSED TRANSACTION list was at the bottom. I must say it looks pretty cool so far, I am impressed to have gone this far. I am tempted to play around with colours and everything, however functionality is what I am after atm.

I edited out the question that I had just regards how to insert EA's (not sure function name is right) into the detailed statement, as I since realised due to the way the columns are set up and imported to in the .html code, that this would be quite difficult to set up, so I am happy to leave this part for now - unless anyone knows of any easy way.

Now all I want is some decent screenshots of charts in action uploaded to link with a personal website to view all my MT4 and VPS data to save remotely loggin in all the time. Here are the possibilities that I can think of, but I am stuck with all of them.

1. get MT4 to take screenshots

a) by writing a bit of code to make my own non trading EA

b) by writing a script into an indicator that is called upon by an EA

I can find the seperate bits of code, but not experienced joining them together.. It'd be great to use MT4 to do this, as there might be a chance I can incorporate into statement.htm - has anyone done this?

2. get windows to take screenshots and send via built in ftp command, using a VB script run as scheduled task.

3. Using a screenshot program, however the only screenshot program that I can find that takes screenshots at intervals, and has ftp is IcyScreen, but I need four copies, and that would be $200.

These last two options would be handy to take screenshots of entire VPSs with everything maximised, and have that image ontop of or underneath the statement.htm on a more complete overview.html website or something - I will look into how to insert an existing .htm webpage into a custom .html webpage of my own choosing, so I can display the statement and a few pictures of my own choosing.

 

... I just found this post in ForexTSD (link here https://www.mql5.com/en/forum/general) which sort of covers question 1, however I didn't find anything totally suitable for my purposes.

Of the FTP ones though, EliteFPT kept the connection open (perhaps cause FTPTime=0 ?), and it only printed the WindowScreenShot("EquityGraph.gif",820,500). Is there a way to change EquityGraph.gif to CurrentChart (what are other options here please for callable functions for pictures)? The other FTP EA was ok, however it was already compiled, so I was unable to change it from taking screenshots with different file names.

The rest of the files offered in that post were screenshot based EAs without FTP. These screenshot EAs would be handy to detect indicators repainting though, some of them looked cool. I guess I could use an FTP uploader in combination and set it to upload from the directory that they make. I could fiddle with the code on the MQ4 files to make them FTP too, however am still learning how to insert some FTP code at the end.

Ideally it'd be great if MT4 had a callable function name to take .gif's of the open charts (instead of just EquityGraph), that I could just add into the statement.htm file and use publisher.

 

Haha this thread here in the good old overclockers forum sort of covers questions/options 2 and 3

http://www.overclockers.com/forums/archive/index.php/t-653449.html

I will look into Zscreen (looks excellent so far, I am so thankful for open source programmers out there) rather than trying to schedule VBscripts with windows screenshot. Making progress finally. This will be excellent to take snapshots of the entire VPS etc.

I am still stuck with Option 1 though, as I would still like MT4 to take screenshots of my charts, and I be able to put that into my custom statement, rather than that Equity Graph taking up valueable realestate. If anyone knows a list of callable functions that I can substitute into the code WindowScreenShot("XXXXXXX.gif",820,500), it would give me a heap to play with in both MT4, and possibly the statement.htm file itself directly.

 

I am happy to share the new statement file I spent countless hours on, lol. I removed all of the personal information from it, and I ended up getting sidetracked with the colours afterall while stuck on some of the screenshot parts of the project.

So here it is (attached).... (remember you need to rename the file as "statement.htm" and put it in your "MT4 directory/templates folder".... for it to work. Also if you don't want to overwrite the original, remember to rename the existing "statement.htm" to "statement.htm.old" first, so you can rename it back later, then move my renamed funky statement in there).

Oh yeah, it looks basic when you view it, however when you use it, it automatically imports the data to the right spots, and inserts the Equity Graph there after the template is used by MT4. I just want more in there still, hehe

I need to remove from the top too, as it seems to need to be put elsewhere in the .html document for the function call to work. Any suggestions welcome, or a point in the right direction of another post if this stuff is old hat.

Also I finished my research from a point I mentioned above, so here's a tip for others traders also wanting to display a MT4 statement.htm within another .html webpage with your own pictures and things, one just had to use the IFRAME comment in the .html. So I just referred to the .htm page that publisher sends out in my custom .html file. The solution was simple, however it took me a while to work that out, so there's a tip for anyone's stuck doing similar.

Files:
 

Still stuck getting decent screenshots of the charts.

Found this link:https://www.mql5.com/en/forum/general so exploring that now.

Zscreen was great for taking timed screenshots of the VPS and uploading via FTP when a session is on, however when the remote connection is disabled, the GUI is disabled, so it takes a blank screenshot. I don't want to have to modify an API call to leave it open. I considered installing UltraVNC as a service just to keep the desktop GUI open. I worked out the watermark is on the picture even though the rest is blank, so this serves for letting me know as have 'server online @ date' etc .

I am curious if screenshtos will work inside MT4 now since I am primarily using disconnected VPSs. I am going to find an EA from the post I listed in the first post that just takes a screenshot of the whole chart, and use Cobian backup to fpt the shots over to my website. If windows screenshot is disabled in mt4 due to the GUI being down in windows, I will hit the same problem with blank screenshots I can imagine....

On my own with this thread it seems, so just jotting these notes down for anyone else who is stuck on this in years to come...

 

I am sidetracked again on templates, and all I can say atm is WOW! Good on you RickD if you are still around in this forum. I found this link: https://www.mql5.com/en/forum/173168

I thought I was good above... RickD and other modders have an awesome way to export statements.

I like the new rewritten version: https://www.mql5.com/en/forum/174822 because it imports from a seperate report.htm so I can still use my statement.html from above for normal exporting. I might mod this report.htm to suit myself too. I found the earlier versions of this script easier to sort by pairs (symbols), howerver looking into the !Report_v3 now.

Love a way to graph pair totals against each other. I am impressed this guy really understood how the statement system works in MT4. This solved my COMMENTS into the statement problem, yet to work out how to export PIPs instead of currency still. Might use Cobian to export these seperate report.htm's into my website folder, and display them underneath the original template statement, using the IFRAME command again. Seeing these files has opened my mind with what is possible with publishing statements, good work guys.

 

Ah just an update for future readers, as when I search for these topics, my thread is starting to come up first on the search list, lol.

Ok Screenshots from MT4 charts on a VPS work fine. They don't suffer same problem windows screenshot based programs do on a VPS when it is disconnected!

I ended up using a combination of Screenshot EAs and Screenshot Indicators. In some situations I already had an EA running on a chart, so used a Screenshot Indicator underneath (couldn't write a screenshot indicator with ftp priveledges though, even though based on same specs as EA version).

I found a good indicator to do my history from the threads above, thanks heaps guys. In this situation I use a Screenshot EA.

I then use Cobian backup (another awesome open source program, donate to these guys if you like their programs) to upload any non-ftp based screenshot indicator leftovers. In hindsight I should of avoided Screenshot FTP altogether, as running into "FTP Error, max number of connectinos already open", so should of just used local screenshots and Cobian.

I am not entirely sure how to fix the leaving FTP connection open in EliteFTP, so I reduced its update intervals for the time being. Fixing Elite FTP to not leave connection open is my next task. I might explore the thread above from codesguru. There is an attachment and a link there with details on using a .dll file for better FTP. Cobian sort of does a lot of that for me though, it was the one free open source program I could find that did you could schedule FTP at intervals, and was very flexible for options. Between Cobian and Zscreen I came across two very cool programs. I hope these tips helps save others hours looking, lol.

So yeah problems all solved.....

*If someone knows of an EA or indicator that I can plonk on one blank chart, and it will take screenshots of all of the charts, please please let me know. Seeing how the code works, I think this would be hard or impossible to code though, without using a VB windows screenshot script which would show a blank screenshot from a disconnected VPS anyway.

 

thanks for the like!

Cheers to the one member that posted a like to me, I appreciate that, it makes me feel my post was not in vane...

Yeah I much prefer the nice colours of the template.

I really jumped into coding MQ4 too, so I've added a few other downloads here: http://richardfx.com/data/downloads.html

God Bless, I really loved CodersGuru MultiClose Script (and his other work, as a coder I appreciate it), however I wanted to write one that had a choice of either ALL PAIRS, or CURRENT PAIR... my version is quite different, a little bulky (as there were a few combinations possible), and suffers if there is it slips past MaxSlippage, even though I inserted a check to check no orders left... anyway it is pretty cool... you guys are welcome to the code that is on offer there.... and of course this sexy statement.

Also while on my website, to illustrate how far I went with this thread.....if you click on a chart, you will see the work of my endevours....

Just use login and password: Guest. I had to make a login, else all the webrobots were sucking up all my website's bandwith, as I am already drilling it with my FTP uploads. I aim to upload fresh charts for the 80-90 odd charts there on 15-30 minute intervals... the m5 charts are still useful to see the moves, even though somewhat slow to update... I am pushing my low budget resources atm, I could do it 5 minute updates eventually if useful to anyone.

I made a really clever website, of crosslinking the webpages, so that if you click on a pair, it will show that pair of all timeframes, and if you click on a timeframe, it will show all pairs.... I wish I could copyright my website properly, as I have never seen any other websites do it like this.... All charts have indicators on them too, which is the best part... It was mainly designed for me, so I can look at any chart on my mobile phone, without it taking up a lot of bandwith...

If it wasn't for the "one like", I would not continue talking to myself on this thread lol... Check it out though, there are some useful tools for download (I tried searching but ended up writing fresh versions), as well as the cool updated charts.

anyway I hope others find my website useful too

Reason: