Auftrag beendet
Spezifikation
Is anyone able to develop a simple MT4 EA which logs swap rates to a csv file for each day and the date & time it changes (ie logs each day's swap so you can see if changes over time or multiple times in a day or even if the broker changes it without warning)? My broker changes the swap rate up to twice per week and I'd like to monitor the rates.
I would also like the EA to have the option to send an email notification if the swap rate changes and the date & time of the change.
It would have a parameter to specify which currency pairs are to be logged and email alerted.
To find the swap you go to the Market Watch window --> right mouse click then choose specification. You will then see swap long and swap short for each symbol.
I would like the EA to specify that the csv be saved to an online service like Dropbox or Google Drive. The reason for this is that I would need the EA also to operate up to a triple redundancy so that if the EA stops functioning on my PC (eg if Windows does an update or the computer freezes). I want to do this by having up to three different PC/VPS in a different locations with the EA running and monitoring the primary EA in the first location. The secondary EA will then kick-in when the primary EA stops transmitting a signal. The third would start if the the other two stop. To do this I need the client terminals on all PCs to be able to transmit data between them so the EAs know which EA is in command and the current status of the EA in command. The EA would have options to have the second and third instances running, so it would not be mandatory.
As it is up to a triple redundancy it would work across two or three independent instances of the EA with 2 or 3 different VPS (depending on if 2 or 3 instances of the terminal are chosen) - but only log data once according to the rules. The primary machine would record the data and the second (if two chosen) or third machine (if three chosen) would monitor to see if they are required. The third machine would only apply if both the primary and secondary machines were down. Once the primary machine is up and running again it would takeover duties to log data.
Attached is a basic MT4 script which I found which manually saves to a csv file (which over-writes that file if you do it again), but I was wanting the EA under this job to log each time it changes (ie appends the data to an existing csv file) so you can then see the changes made by the broker over time.
There was an MT4 version which writes to telegram which I've attached which may assist with starting things.
Thanks in advance