Termos de Referência
I am looking for someone who is good in C and MQL4 and can join them. If you are not he, maybe you could help by pointing me in the right direction to find such person.
I wish to have a connection monitor with login action coded.
Purpose: Prevent disconnections of terminal or long breaks in tick stream
Why: The terminal automatically attempts to login if it notices it is disconnected. The time before terminal find it self disconnected is depending on TCP/IP settings of the operating system. The time is long and a lot can happen.
This software would calculate the average tick interval and if tick is not received in a time depending on the average, it performs a login of the terminal (or rescan).
Challenges:
To my knowledge there is no function for login in MQL4. But the solution can be found here http://forum.mql4.com/15325#101492
Indicator start() function is called up on arrival of a new tick. Therefore an Indicator can not wait nor perform a task (e.g. login) if a tick does not arrive. I think this could be solved with a Script polling General Variables to which an Indicator writes.
General system Description - how I thought it could work
The average tick interval is calculated
over number of ticks (set by user, TicksInAverage) in a Indicator. The interval
and time of the last tick is then made available for
the Script. The Script monitors if the time since last tick exceeds the average interval X time out factor (set by user TimeOutFactor).
To work on windows 2003 and written in MQL4 and C. Expert Advisor, Indicator and/or script
Risks to unsuccessful login or rescan shall be addressed by coder. E.g. Does simulated key strokes pose a risk and why. This Requirements Specification may be edited accordingly.
A login or rescan shall take place when average tick interval X a factor (TimeOutFactor) is exceeded. The initiation of login or rescan shall take place before average tick interval X (TimeOutFactor+1) provided enough CPU speed.
The average tick interval shall be calculated using a certain amount of ticks (TicksInAverage)
The average tick interval shall not take into account interval in between two ticks separated by a login or rescan
A log file shall be written (text or CSV) containing following information separated with Tab or “;” . Date, Login Start , average tick interval, Login end time. E.g.:
19/02/2012 Interval 0.3 Start 19:03:32 End 19:03:47
Login is considered completed / ended after first received tick
User can set varibales TimeOutFactor, TicksInAverage, variable for choosing in between rescan or login