Connection Monitor with login action

MQL5 Indicadores Sripts

Tarea técnica

Name: Paranoid Connection Monitor

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.

System Description

The average tick interval is calculated over number of ticks (TicksInAverage) in the Indicator. The interval and time of the last tick (TimeOfLastTick) is then made available for the Script. To my restricted knowledge MQL4 does not support events triggered in Script from an Indicator. That would be better than my algorithm below which I use here for the sole purpose describing the function, not necessarily the code that I would like have.


User sets variables: TicksInAverage, TimeOutFactor


The initialisations are not addressed here.


AvgInterval() Returns latest value TicksInAverage in Indicator

TimeOfLastTick() Return latest value TimeOfLastTick in Indicator

SkipNextTick() Communicates to Indicator

TakeAction() It's a timeout. Take action. Function contain code both to do a login and rescan. The choice is made before compiling by turning one or the other section of code to comments (//).


Variable TimeLeft, TimeCpy

Loop { TimeLeft = AvgInterval() x TimeOutFactor - current time - TimeOfLastTick()

if TimeLeft<0

{ TimeCpy=TimeOfLastTick()

TakeAction()

SkipNextTick(TRUE)

whilst TimeCpy==TimeOfLastTick() {sleep(AvgInterval())}

}

else

{ sleep(TimeLeft)

}

}



The Indicator would have a function off:


AvgInterval() calculates average interval and communicates it to Script

TimeOfLastTick() communicates time of last tick to Script

SkipNextTick() communicate from Script if next tick should be skipped

Variables Interval

loop

{ Interval = tick time – TimeOfOldTick

TimeOfLastTick()

if FALSE==SkipNextTick()

{ AvgInterval(Interval)

}

TimeOfOldTick= tick time

}



Preliminary Requirements Specification

  • Name: Paranoid Connection Monitor

  • To work on windows 2003 and written in MQL4. 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

  • A method of restarting the terminal in case of longer connection loss shall be described by coder and necessary tools provided. This may not have anything to do with the actual Paranoid Connection Monitor it self. But should be provided as extra guard.


Solicitudes similares
I am looking for a serious marketer with experience in promoting trading tools or Expert Advisors for MetaTrader 5. The product is an automated MT5 trading EA focused on Gold trading, with risk-management tools and trading filters designed to improve trade quality. For credibility, I will provide: An Investor Account for a live/demo account where the EA has been running for a while Backtest reports for the EA Clear
Gold Precision Pro 30 - 100 USD
I want the indicator to be built professionally and carefully because the strategy is strong, but it requires advanced and clean programming. The indicator should work mainly on XAUUSD M15 and should generate more than 2 high-quality signals per day, ideally around 2 to 4 signals maximum, without flooding the chart. The logic must not be random. Each signal must be based on: HTF Bias from H1/H4, Liquidity Sweep
Good day, I would like to have an expert advisor for my MT4 indicator (Major key alert) that can scan and provide push notification messages for entry opportunities across different time frames when a when a signal is identified
Modify an existing EA 30 - 50 USD
This is to modify my Semi Auto EA -Looking for developer modify my existing EA to Pending Order EA (BS/BL/SL/SS). Relevent with Heiken Ashi Smooth ,Moving Average , Acceleration. Concept MAster and Slave. Ready to give previous soucre code as guide. Work to do - 1)To modify this EA to Pending Order. 2) to add new feature - Risk Management/moneymanagement 3) To modify 4 slave to 7 slave will give the previous to
I have a indicator working good but have some bug for arrow placement . budget is fixed 30 used . only experience developer apply. i want to arrow get put on just above the candle high and candle low
I am looking to get this Indicator but i don't know which indicator is it , if anyone know about it let me know , images are attached , this is used for Binary Pairs
Pip Scalper Bot 60+ USD
i want a trading bot that is aleast 98% sure,and cam also do scalping 99% correct using smart money concept, ICT, ALL technical analysis on it and also put risk management on it
Greetings I need MT5 developer that has expertise in developing a custom indicator for mt5 boom and crash based on my exact details and requirements which would be discuss later. Kindly bid for this project if it is something you can handle for me
Hello, I have a Ctrader indicator with the source code, I was wondering if this possible to convert it to Quantower. Hello, I have a Ctrader indicator with the source code, I was wondering if tis possible to convert it to Quantower., i need an expert who can convert it perfectly
I’m looking for an experienced NinjaTrader developer to complete an existing custom indicator. The project is already partially built and is well organized, completely functional, and well documented. The former developer experienced some personal difficulties and unfortunately cannot continue. Key Requirement (Read Carefully): You MUST have direct, hands-on experience with NinjaTrader and NinjaScript (C#) . This is

Información sobre el proyecto

Presupuesto
50 - 150 USD
Plazo límite de ejecución
de 1 a 20 día(s)