MetaTrader Trading Tools
Showing 6 results in this view

ShowTradeLines Service

The service provides more descriptive and intuitive representation of open positions and related deals on charts than it's offered by the terminal by default. Specifically you can see the time(s) and price(s) of opening trade and optionally other deals, such as partial close or adding volume to a position in a netting account.

The service monitors account state for open positions and creates graphical objects on an active chart (shown on top or maximized) if its symbol corresponds to at least one of existing positions.

Inputs

  • TimeInterval (seconds) - 5 by default;
  • LinePrefix - common prefix for on chart objects, such as "TradeTag";
  • LineColorProfit - color for lines of profitable positions (clrDodgerBlue);
  • LineColorLoss - color for lines of lossy positions (clrCoral);
  • LineStyle - drawing style of lines (STYLE_DASHDOT);
  • LineWidth - width of lines (1);
  • LineType - type of lines - OBJ_TREND (default) or OBJ_VLINE;
  • ShowDeals - option to show arrows for deals (true);
  • KeepLinesOnCharts - option to keep graphical objects on chart after position is closed (false);
  • Logging - output or not main events to log (true);

The service registers all objects added on chart in the list of the global variables. This helps the program to detect which objects to remove when a position is closed and KeepLinesOnCharts is false. If KeepLinesOnCharts is true, the service keeps corresponding objects on charts (they are left for manual control by user), but in any case the relevant global variables (describing closed positions and their deals) are removed upon position closure.

All objects receive textual descriptions with most important properties of positions and deals, which can be seen in tooltips (on mouse hover) and right on the chart (if corresponding option is enabled in the chart's settings).

EVZ Reader

It can download data once and be removed or update each 1-5-10 minutes. Since it is a service, it can always be active in the background without interfering with charts. 

32912008.08.04,008.93,008.61,009.27,009.272008.08.05,009.50,009.01,009.60,009.202008.08.06,009.20,009.20,009.46,009.302008.08.07,009.30,009.23,009.92,009.912008.08.08,009.91,009.91,011.54,011.23

VPS Trailing Stop Service

Place the file into Services Terminal Folder. 

The picture above shows an example of setting up a new sell order with the corresponding comment - 1800 points.

The picture above shows the result of sell order the corresponding comment - 1800 points.

The picture above shows an example of setting up a graphical object of a horizontal line - 450 points. 

The picture above shows an example of the result of creating a horizontal line.

To use Real SL Trailing - when you open a trade order in the comment indicate the real stop loss distance in points. 

To use Virtual SL Trailing - create horizontal line on same symbol chart then rename it to the name you used before launching the program and in the description of the object indicate the virtual stop loss distance in points. 

!!! Be careful !!!

When placing an object on chart use correct SL distance depending on trade direction.

To disable virtual trailing just delete created horizontal line.

To disable real trailing you have to stop this program.

This code is designed to manage only one open position per symbol.

To manage a large number of open positions for a single symbol, you need to edit the code.

    Swap Monitor

    This is a service, which periodically inspects actual swaps for specified symbols and saves new values (if changes detected) into CSV-files. The files are created in folders under the names of corresponding symbols and splitted by months - for example, the file 202410.csv is for October of 2024. Every line in a CSV-file stores a datetime, long swap and short swap. 

    Also the service check swaps of existing positions and alerts their changes (if any).

    The source code can run as a script on a chart if the directive #property service is commented out. But it's recommended to install the program as a service.

    The code base does not support services as one of available MQL5 program types, this is why the program is published as a script.

    Period Converter Mod

    The service creates a custom symbol with non-standard timeframe. 

    U.S. dollar index

    TheUS Dollar Index (USDX, DXY) is a measure of the value of the US dollar relative to a basket of six major world currencies. It is calculated as a weighted geometric mean of the dollar's exchange rates against these currencies:

    • EURUSD (euro) - weight -0.576
    • USDJPY (Japanese Yen) - weight 0.136
    • GBPUSD (British pound) - weight -0.119
    • USDCAD (Canadian dollar) - weight 0.091
    • USDSEK (Swedish krona) - weight 0.042
    • USDCHF (Swiss Franc) - weight 0.036

    Calculation formula:

    The coefficient 50.14348112 is the historical base and the degrees are the weights of the currencies in the basket.

    This service implements data flow for a synthetic instrument - dollar index. It creates a custom symbol (USDX.synthetic), calculates its price based on current currency quotes from the basket, updates bars and ticks. It works in an infinite loop, updating data every tenth millisecond.

      You can read more about this Service in the article"

      When launched, the service automatically creates a synthetic symbol of the dollar index (USDX.synthetic) based on the quotes of the currency basket, opens its chart and updates ticks and bars of this instrument. The user can analyse the chart of this index, use it in indicators and test strategies. The service is designed to assess the strength of the dollar and build trading systems based on it.