Codes

Function for calculating lot size from risk per deposit for MetaTrader 5

The function calculates the lot size of an open position. The opening price of a deal, the price of stop loss level and the risk per deal in per cent of the deposit are passed as parameters

Functions for X to time, Y to price and vice versa for MetaTrader 5

Functions for use instead of ChartXYToTimePrice and ChartTimePriceToXY, working correctly and quickly over the entire range of input parameters

Function for checking whether the market is open for trading at the moment by the current symbol for MetaTrader 5

The function can be useful to not overload the server with trade requests at times when the market is closed for trading

Function for converting the number of seconds to years, months, days, hours, minutes, seconds for MetaTrader 5

It is taken into account that there are 30 days in a month, 365 days in a year The script demonstrates the counter of time until the beginning of the new year