How to Start with Metatrader 5 - page 110

 
Sergey Golubev:

and the following article - 



I'm new, can you help me?

 
armynnoow:

I'm new, can you help me?


There is one post for newbies (about "where do I start from") - 

Forum on trading, automated trading systems and testing trading strategies

How to Start with Metatrader 5

Sergey Golubev, 2017.10.03 06:39

Just for newbies (if you are new to this website for example) - it is strongly recommended to read the following articles/posts/threads - 

============

1. User Memo 

Forum on trading, automated trading systems and testing trading strategies

How to Start with Metatrader 5

Sergey Golubev, 2016.12.30 17:26

Just some reminding about how to insert code to the post (for new users/newbies) - read here, and read whole the article: MQL5.community - User Memo

============

2. How to make a search on the forum/mql5 portal

============

3. Summaries

3.1. How to Start with MT5, a summary ! (incl the previous thread:How to start with MetaTrader and forex, the beginning) 
    MetaTrader 4 Help - Client Terminal – User Guide 
    MetaTrader 5 Help - Trading Platform — User Manual

3.2. All (not yet) about Strategy Tester, Optimization and Cloud

3.3. ASCTREND SYSTEM summary (incl 2 good EAs)

3.4. BRAINTRADING SYSTEM HowTo

3.5. PriceChannel Parabolic system (incl 2 versions of the EA)

3.6. Market Condition Evaluation (2 EAs were created)

3.7. Ichimoku

3.8. Financial and trading videos - Table of Contents

3.9. All about Calendar tab and Macro Economic Events

3.10 All about MQL5 Wizard : create robots without programming

============

4. First key article:
MetaTrader 5 - More Than You Can Imagine! 

============

5. The second key article:
Limitless Opportunities with MetaTrader 5 and MQL5 

============

6. How to add the broker to MT5:

6.1. MetaTrader 5 Help - Open an Account

6.2. MetaTrader 5 Android OS Help - Opening a Demo Account 

6.3. MetaTrader 5 iPhone/iPad Help - Connecting to an Account and Opening a Demo Account

============

7. Signals

============

8. Market

============

9. MQL5 VPS for MT4/MT5

9.1. How to subscribe to VPS https://www.mql5.com/en/forum/187872#comment_4851530 

9.2. You can move your VPS subscription from one account to another 
https://www.mql5.com/en/forum/172120#comment_4166892

9.3. MQL5 VPS description
https://www.mql5.com/en/forum/172553#comment_4185979 

9.4. Monitor VPS 
https://www.mql5.com/en/forum/188920#comment_4800677 

9.5. Synchronize - 
https://www.mql5.com/en/forum/211508 

============

10. Brokers

10.1. Find a Server by the Broker's Name:
https://www.mql5.com/en/forum/9950/page88#comment_3981953  
https://www.mql5.com/en/forum/214820

10.2. Help for beginners
https://www.mql5.com/en/forum/214904

10.3. US brokers
https://www.mql5.com/en/forum/12423/page500#comment_4736742

============

11. Promotion:
https://www.mql5.com/en/forum/9950/page88#comment_3982032  
https://www.mql5.com/en/forum/9950/page88#comment_3982030  
https://www.mql5.com/en/forum/9950/page88#comment_3982036  

============

12. Freelance, decompilation, the rules, examples of the decompiled code:
https://www.mql5.com/en/forum/203200 

============

13. General rules and best pratices of the Forum

13.1. Thread with the discussion

13.2. Forum rules

============

14. The thread about threadswhat's going around the forum everywhere  
Good thread if you are looking for something new and modern (and free one)

============

15. MT5, mql5, mql5.com suggestions for improvement thread

============

16. How to subscribe to topic or  invite a person into the topic - the thread

============


 

MetaEditor (which is updated together with Metatrader) was upgraded a lot.
A lot!
More code protection, projects, and more and more.

You can try to find it by yourself, or wait for the releases which will be published during the week.

Just for information.

 

It is very interesting update especially for MetaEditor so seems I will need to learn about it - 

------------------

Forum on trading, automated trading systems and testing trading strategies

MetaTrader 5 Platform Beta Build 1700: Projects in MetaEditor and Synthetic financial instruments

MetaQuotes Software Corp., 2017.12.05 14:33

MetaTrader 5 Platform Beta Build 1700: Projects in MetaEditor and Synthetic financial instruments

The beta version of the updated MetaTrader 5 platform will be released on 6 December 2017. We will update our public MetaQuotes-Demo server located at access.metatrader5.com:443. We invite all traders to join testing in order to evaluate the updated platform features and to help developers fix errors.

To update the MetaTrader 5 platform up to build 1700, connect to access.metatrader5.com server:443.

The final build of the new MetaTrader 5 platform will be released after the public beta test.

End of Support for Older Terminal Versions
Support for older versions of desktop and mobile terminals will end upon the release of the new platform version:
  • Client Terminal: versions below 730, November 23, 2012
  • Mobile Terminal for iPhone: versions below 1171, November 11, 2015
  • Mobile Terminal for Android: versions below 1334, August 5, 2016
Unsupported terminal builds will not be able to connect to new server versions. We strongly recommend that you update your terminals in advance.

MQL5 Storage Operation Protocol Changes
To support new shared projects, we have updated the protocol of operation with the MQL5 Storage. Therefore, you will need to perform a checkout of all data from the storage after the platform update. Data stored at the MQL5 Storage will not be lost or affected during the update.

Before updating the platform to the new version, we recommend that you perform the Commit operation to send all local changes to the MQL5 Storage.

The update will feature the following changes:

  1. Full-featured projects are now available in MetaEditor. The program development process has become more convenient.

    Now the main MQ5 program file does not appear as the project. The project is a separate "MQPROJ" file, which stores program settings, compilation parameters and information about all used files. Main project settings can be accessed from a separate dialog box, so there is no need to specify them in the source code via #property now.

    A separate tab in the Navigator is provided for a convenient work with the project. All files, such as include, resource, header and other files are arranged into categories on this tab. All files are automatically added to the project navigator. For example, if you include a new MQH file, it will automatically appear in the "Dependencies" section of the navigator.

    Support for new projects has also been implemented in the updated MQL5 Storage online repository. It is a convenient option for developing large projects through collaboration with other members of the MQL5.community.

    New Shared Projects section is provided for group projects. A project created in this section is immediately sent to the storage: you can grant permissions to other users and start collaboration right away.





    When you compile a project in Shared Projects, an executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. You can easily launch the program on a chart without having to copy files manually.


    What's New in the MQL5 Storage Operation
    To implement support for new shared projects, we have modified the protocol of operation with the MQL5 Storage. Therefore, you will need to perform a checkout of all data from the storage after the platform update. Data stored at the MQL5 storage will not be lost or affected during the update.
    Before updating the platform to the new version, we recommend that you perform the Commit operation to send all local changes to the MQL5 Storage.
    The 'Checkout from Storage' command is now only available in Shared Projects. For other catalogs in the MQL5 folder the 'Activate MQL5 Storage' and 'Update from Storage' commands are used:

    • If you haven't used the MQL5 Storage in the current MetaEditor instance, click 'Activate MQL5 Storage' in the context menu of the Navigator window. All catalogs and files available in your storage will be uploaded to your local computer.
    • If you are already working with the storage, click 'Update files from Storage' in the context menu of the root MQL5 element in the Navigator to receive all data from the storage.


    New Projects: Examples of Creation and Operation Details
    A new project entity has been added in MetaEditor. A project is an mqproj file that stores common program properties and information about all used files. Now, program properties can be conveniently managed from a separate MetaEditor dialog instead of manual modification of properties in the source code (using #property directives).

    If you have available code, you can easily test new projects by using the 'New Project from Source' command.




    In the directory where the selected file is located, a new project file with the same name and the mqproj extension will be created. The main program properties specified in the source code via #property will be automatically added to the project, including the name, copyright, version, link to the developer's site and program description.
    The set of program properties in the project file is given a higher priority, than properties specified in the program code. If properties are specified both in the project and in the source file, properties from the project will be used.




    Two new options for compiling MQL5 programs have been added to project properties:

    • Enable additional optimization: applications with the optimization disabled are compiled faster, but execute more slowly.
    • Check floating point dividers: applications with the check disabled work a little faster, because the zero divide error is not checked during code execution.

    To work with projects, use a separate Project tab in the Navigator window. All files used in a project are displayed on this tab in a convenient form. When a project is generated from a source file, all used include files (specified using the #include directory in the main MQ5 file and in its include files) are automatically added to the Dependencies section.

    When a new include file is added to the source code, it also appears in the project Navigator. Used header files are added to the Headers section; images, sounds and other MQL5 programs used in the project as resource are added to the Resources section. MQ5 files with the source code are displayed in the Sources section. In the 'Settings and files' section, you can add other files, such as set files for testing and chart templates.

    Use context menu commands to add existing files to a project or to delete files from it. Be careful when deleting files, since you can remove a file from the project (remove the binding) or completely delete it from the hard disk:



    Creation of a new project is as easy as the creation of a normal MQL5 program. Click 'New Project', select the type of new program and specify properties (such as name, event handlers, etc) in the MQL5 Wizard.

    To obtain an executable EX5 file, you can open the project and press F7 (the compilation command) or open the main MQ5 file of the program and compile it.

    Shared Projects in MQL5 Storage: Operation Details
    Shared projects are managed from a separate Shared Projects section. If you have not connected the storage yet, execute the 'Activate MQL5 Storage' command from the context menu of the desired folder. MetaEditor will check if your storage contains any saved data and if there are any share projects available to you. All available data will be retrieved from the storage and uploaded to your computer (the checkout operation). Available group projects appear in the Shared Projects section. To retrieve the projects, execute "Checkout from Storage" in the context menu.

    To create a new group project, select the Shared Projects folder and click "New Project":



    Then complete standard MQL5 steps: set the type, name and properties of the desired program. For group projects, you should use clear and understandable names, so that other participants could easily find them. Only Latin letters without spaces can be used in project names.

    A created object is immediately added to the MQL5 Storage. Standard Library files used in the project are not added to the storage, and you can add them manually.

    To allow other participants to work with the project, open its properties. From here you can grant permissions to selected users by specifying their MQL5.community login, as well as set common parameters for the group work:

    • Private project
    • Free to join project
    • Join by request project



    When you compile a group project, the executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. It allows you to instantly run the program in the terminal without having to copy it manually to the proper directory.

  2. Terminal: Now, the trading platform allows creating synthetic financial instruments, i.e. symbols based on one or more existing instruments. The user should set the formula for calculating quotes, after which the platform will generate ticks of the synthetic instrument in real time, and also will create its minute history.

    How It Works
    • You create a synthetic instrument and set formula for price calculation.
    • The platform calculates ticks at a frequency of 10 times per second, provided that the price of at least one of the instruments used in the formula has changed.
    • The platform also calculates the history of one-minute bars (for the last two months) based on minute bars of instruments used in its formula. All new bars (current and subsequent ones) are built in real time based on the generated ticks of the synthetic instrument.
    For example, you can create an instrument showing the dollar index (USDX). It uses the below formula:
    50.14348112 * pow(ask(EURUSD),-0.576) * pow(USDJPY,0.136) * pow(ask(GBPUSD),-0.119) * pow(USDCAD,0.091) * pow(USDSEK,0.042) * pow(USDCHF,0.036)
    Note: the USDEUR and USDGBP pairs are used in the source dollar index formula. Since only reverse pairs are available in the platform, a negative power and Ask instead of Bid are used in the synthetic symbol formula.

    The platform will calculate in real time the price of the new instrument based on the quotes of the other six symbols provided by your broker. The price changes will be visualized in the Market Watch window and on the chart:



    Create a new custom symbol, open its specification and enter the formula:



    For convenience, the formula editor shows a list of possible options as you type the names of symbols and functions.

    Calculation of ticks and one-minute bars of a synthetic instrument starts when this instrument is added to the Market Watch. Also, all symbols required for the synthetic price calculation are automatically added to the Market Watch. An entry about the calculation start will be added to the platform journal: Synthetic Symbol USDX: processing started.
    • Calculation of a synthetic instrument stops after it is removed from the Market Watch.
    • Symbols that are currently used for calculating synthetic symbol prices cannot be hidden from the Market Watch.

    Real-Time Calculation of Quotes
    Every 100 ms (i.e. ten times per second) the prices of symbols used in calculation are checked. If at least one of them has changed, the price of the synthetic symbol is calculated and a new tick is generated. Calculation is performed in parallel in three threads for Bid, Ask and Last prices. For example, if the calculation formula is EURUSD*GBPUSD, the price of the synthetic symbol will be calculated as follows:

    • Bid = bid(EURUSD)*bid(GBPUSD)
    • Ask = ask(EURUSD)*ask(GBPUSD)
    • Last = last(EURUSD)*last(GBPUSD)

    The availability of changes is checked separately for each price. For example, if only the Bid price of a source instrument has changed, only the appropriate price of a synthetic instrument will be calculated.

    Creating a History of Minute Bars
    In addition to collecting ticks in real time, the platform creates a minute history of the synthetic instrument. It enables traders to view synthetic symbol charts similar to normal ones, as well as to conduct technical analysis using objects and indicators.

    When a trader adds a synthetic instrument to the Market Watch, the platform checks whether its calculated minute history exists. If it does not exist, the history for the last 60 days will be created, which includes about 50,000 bars. If a lower value is specified in the 'Max. bars in chart' parameter in platform settings, the appropriate restriction will apply.

    If some of bars within this period have already been create, the platform will additionally generate new bars. A deeper history is created if the user tries to view an older time period on the chart (by scrolling it back or accessing it from an MQL5 program).

    The history of one-minute bars of a synthetic instrument is calculated based one one-minute bars (not ticks) of instruments used in its formula. For example, to calculate the Open price of a 1-minute bar of a synthetic symbol, the platform uses the Open prices of symbols used in its formula. High, Low and Close prices are calculated in a similar way.

    If the required bar is not available for any of the instruments, the platform will use the Close price of the previous bar. For example, three instruments are used: EURUSD, USDJPY and GBPUSD. If in the calculation of a bar corresponding to 12:00 the required bar of USDJPY is not available, the following prices will be used for calculation:

    • Open: EURUSD Open 12:00, USDJPY Close 11:59, GBPUSD Open 12:00
    • High: EURUSD High 12:00, USDJPY Close 11:59, GBPUSD High 12:00
    • Low: EURUSD Low 12:00, USDJPY Close 11:59, GBPUSD Low 12:00
    • Close: EURUSD Close 12:00, USDJPY Close 11:59, GBPUSD Close 12:00

    If the minute bar is not available for all of the instruments used in the formula, the appropriate minute bar of the synthetic instrument will not be calculated.

    Drawing New Minute Bars
    All new bars (current and subsequent ones) of the synthetic instrument are created based on generated ticks. The price used for building the bars depends on the value of the Chart Mode parameter in the specification:




    What Operations Can Be Used in the Symbol Formula
    Price data and some properties of existing symbols provided by the broker can be used for calculating synthetic prices. Specify the following:

    • Symbol name — depending on the synthetic price to be calculated, the Bid, Ask or Last of the specified instrument will be used. For example, if EURUSD*GBPUSD is specified, Bid is calculated as bid(EURUSD)*bid(GBPUSD), and Ask = ask(EURUSD)*ask(GBPUSD).
    • bid(symbol name) — the bid price of the specified symbol will be forcedly used for calculating the Bid price of the synthetic instrument. This option is similar to the previous one (where the price type is not specified).
    • ask(symbol name) — the Ask price of the specified symbol will be used for calculating the Bid price of the synthetic instrument. Bid price of the specified instrument will be used for calculating Ask. The Last price of the specified symbol will be used for calculating Last. If ask(EURUSD)*GBPUSD is specified, the following calculation will be used:
      • Вid = ask(EURUSD)*bid(GBPUSD)
      • Ask = bid(EURUSD)*ask(GBPUSD)
      • Last = last(EURUSD)*last(GBPUSD)
    • last(symbol name) — the Last price of the specified symbol will be used in the calculation of all prices of the synthetic instrument (Bid, Ask and Last). If last(EURUSD)*GBPUSD is specified, the following calculation will be used:
      • Вid = last(EURUSD)*bid(GBPUSD)
      • Ask = last(EURUSD)*ask(GBPUSD)
      • Last = last(EURUSD)*last(GBPUSD)
    • volume(symbol name) — the tick volume of the specified instrument will be used in the formula. Make sure that volume information is provided by the broker for this symbol.
    • point(symbol name) — the minimum price change of the specified instrument will be used in calculations.
    • digits(symbol name) — the number of decimal places in the specified symbol price will be used in the formula.

    If a symbol has a complex name (contains hyphens, dots, etc.), it must be written in quotation marks. Example: "RTS-6.17".
    The following arithmetic operations can be used in the formula: addition (+), subtraction (-), multiplication (*), devision (/) and remainder of division (%). For example, EURUSD+GBPUSD means that the price is calculated as the sum of EURUSD and GBPUSD prices. Also you can use the unary minus to change the sign, for example: -10*EURUSD.

    Mind the calculation priority of arithmetic operations:

    • The operations of multiplication, division and remainder are performed first; then addition and subtraction operations are performed.
    • The operations are performed from left to right. If the formula uses several operations that have the same priority (for example, multiplication and division), the operation on the left will be performed first.
    • You can use brackets ( and ) to change the priority of operations. Operations in brackets have the highest priority in the calculation. The left-to-right principle also applies for them: operations in brackets on the left are calculated first.

    You can use constants in the formula:

    • Numerical (integer and float). Example: EURUSD*2+GBPUSD*0.7.
    • Symbol properties _Digits and _Point. They add to the formula appropriate properties of the custom symbol from the specification. _Digits means the number of decimal places in the instrument price; _Point means the smallest change in the symbol price.

    You can also use in the formula all mathematical functions supported in MQL5, except for MathSrand, MathRand and MathIsValidNuber: Only short names are used for all functions, such as fabs(), acos(), asin() etc.

  3. Terminal: A new option has been implemented, allowing to add quotes of custom instruments in real time. Now, it is possible to develop an MQL5 Expert Advisor that would be feeding quotes of the specified custom symbol. The CustomTicksAdd function is used for that.
    int  CustomTicksAdd(
       const string           symbol,       // Symbol name
       const MqlTick&         ticks[]       // The array with tick data that should be applied to the custom symbol
       );
    The CustomTicksAdd function allows feeding quotes as if these quotes were received from a broker's server. Data is sent to the Market Watch window instead of being directly written to the tick database. Then, the terminal saves ticks from the Market Watch to the database. If a large volume of data is passed in one call, the function behavior changes, in order to save resources. If more than 256 ticks are transmitted, data is divided into two parts. A larger part is recorded directly to the tick database (similar to CustomTicksReplace). The second part consisting of the last 128 ticks is sent to the Market Watch, from where the terminal saves the ticks to a database.

  4. MQL5: New online service MQL5 Cloud Protector has been added to provide additional protection for MQL5 programs. Protection is similar to the option used in the largest store of trading applications MetaTrader Market, where the EX5 product files submitted by sellers are additionally compiled to native code.

    Now, this type of protection is available to all platform users. To protect your files, execute the following command in MetaEditor: Tools—MQL5 Cloud Protector. The only difference of MQL5 Cloud Protector from the mechanism used in the Market, is that the file is not linked to the user's computer. Protected via MQL5 Cloud Protector files can be run on any computers similar to common EX5 files.
    MQL5 Cloud Protector is a secure service. Additional protection is only applied to a compiled file. The source code is not passed to the service. At the first step, a program is compiled to an EX5 file on the user's computer; after that the compiled file is sent over an encrypted channel to the service, where it is protected and returned to the user.



  5. Terminal: The Market Watch window now additionally features the High and Low prices. These columns are hidden by default. They can be enabled using the context menu:




    If a symbol chart is constructed using Bid prices (as per specification settings), Bid High and Bid Low prices are shown for this symbol. If a symbol chart is constructed using Last prices, Last High and Last Low prices are shown for this symbol.

    If Market Watch contains at least one symbol whose chart is drawn based on Last prices, the Last column is automatically enabled in addition to High/Low.

  6. Terminal: Now it is possible to edit the tick history of custom financial instruments. Click 'Symbols' in the Market Watch context menu, select a custom symbol and request the required data interval in the Ticks tab.

    • Double-tap to change the value.
    • Use the context menu to add or delete entries
    • If you need to delete multiple bars/ticks at once, select them with the mouse, holding down Shift or Ctrl+Shift.



    For convenience, modified entries are highlighted as follows:

    • Green background indicates a modified entry
    • Gray background means a deleted entry
    • Yellow background shows an added entry

    To save the changes, click "Apply Changes" at the bottom of the window.

  7. Terminal: Added display of time in millisecond in the Quotes window.




  8. Terminal: Scanning of available servers in the new account opening dialog has become faster.
  9. Terminal: Fixed display of the Trendline graphics object with the Ray Left and Ray Right options enabled.
  10. Terminal: Optimized operation with a large amount of internal emails (hundreds of thousands).
  11. Terminal: Optimized terminal operation with a large amount of trading instruments (50,000 or more).
  12. MQL5: New functions for working with custom financial instruments have been added.

    Function Action
    CustomSymbolCreate Create a custom symbol with the specified name in the specified group
    CustomSymbolDelete Delete a custom symbol with the specified name
    CustomSymbolSetInteger Set the integer type property value for a custom symbol
    CustomSymbolSetDouble Set the real type property value for a custom symbol
    CustomSymbolSetString Set the string type property value for a custom symbol
    CustomSymbolSetMarginRate Set the margin rates depending on the order type and direction for a custom symbol
    CustomSymbolSetSessionQuote Set the start and end time of the specified quotation session for the specified symbol and week day
    CustomSymbolSetSessionTrade Set the start and end time of the specified trading session for the specified symbol and week day
    CustomRatesDelete Delete all bars from the price history of the custom symbol in the specified time interval
    CustomRatesReplace Fully replace the price history of the custom symbol within the specified time interval with the data from the MqlRates type array
    CustomRatesUpdate Add missing bars to the custom symbol history and replace existing data with the ones from the MqlRates type array
    CustomTicksAdd Adds data from an array of the MqlTick type to the price history of a custom symbol. The custom symbol must be selected in the Market Watch window.
    CustomTicksDelete Delete all ticks from the price history of the custom symbol in the specified time interval
    CustomTicksReplace Fully replace the price history of the custom symbol within the specified time interval with the data from the MqlTick type array

  13. MQL5: Added support for templates for the union data type.
  14. MQL5: The SYMBOL_VISIBLE trading instrument property has been added. Call of SymbolInfoInteger(symbol, SYMBOL_VISIBLE) returns false if the specified symbol is not visible in the Market Watch.
  15. MQL5: Added new CHARTEVENT_MOUSE_WHEEL property. The event is called when the mouse wheel is scrolled or pressed on the chart (if CHART_EVENT_MOUSE_WHEEL=true for the chart).
  16. MQL5: The following chart properties have been added:

    • CHART_EVENT_MOUSE_WHEEL — enabling/disabling generation of CHART_EVENT_MOUSE_WHEEL (mouse scroll and click event on the chart). Possible values: 0 and 1.
    • CHART_CROSSHAIR_TOOL — enable/disable the possibility to switch cursor to the Crosshair mode by a middle click. Possible values: 0 and 1.
    • CHART_CONTEXT_MENU — enable/disable the use of right click to display the context menu of the chart. Possible values: 0 and 1.

  17. MQL5: Now, drawing buffers with the DRAW_NONE style are not taken into account when calculating the indicator window scale.
  18. MQL5: Added the CHARTEVENT_CHART_CHANGE event generation when setting the CHART_SCALEFIX (fixed scale) property for the chart.
  19. MQL5: The ArraySwap function has been added, allowing to quickly swap the contents of dynamic arrays.
    bool  ArraySwap(
       void&  array1[],      // The first array
       void&  array2[]       // The second array
       );
    The function accepts dynamic arrays of the same type and the same dimensions. For multidimensional arrays, the number of elements in all dimensions except the first one should match.

  20. Signals: Fixed indication of order filling type in case of forced closing of positions opened according to a Signal. The 'Stop if the account is lower than XXX USD' option is provided in signal copying options: if equity drops below a specified level, copying of trade signals is automatically terminated, all positions are closed. Earlier, an incorrect filling type could be set for position closing orders in case of forced closure. Now the terminal checks allowed filling types in symbol settings and indicates a proper option.
  21. Tester: The behavior of the HistoryOrderSelect function in the Strategy Tester now corresponds to the same function in the client terminal.
  22. Tester: The behavior of the CopyTicks and CopyTicksRange functions in the Strategy Tester now corresponds to the same functions in the client terminal.
  23. Tester: Optimized display of graphics objects during visual testing.
  24. Tester: Fixed display of testing results of exchange instruments (with the exchange risk management model). Now, the chart only shows the equity, while the balance and the deposit load are not shown. The trading status of such accounts is evaluated based on the equity level. The balance only shows the amount of money on the account and ignores the trader's assets and liabilities. Deposit load (margin/equity) is not displayed, because in the exchange calculation mode margin is equal to the current discounted value of the asset/liability, and it changes along with equity.
  25. MetaEditor: Added the ability to easily insert properties and resources to program code. For example, you can quickly add an included file to code. Use command "Insert—MQH as #incude", and select the desired include file. The #include directive with the proper path to the selected file will be inserted to program code.



    The same menu allows adding to program code files in the form of a binary or text array. Among others, you can transfer chart templates with Expert Advisors or indicators: insert your template in the program code as an array, and save it to disk then using the FileSave function. After that the template can be applied on the desired chart right from an Expert Advisor using the ChartApplyTemplate function.
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
    //--- Template file as a binary array
       unsigned char my_template[]=
         {
          0xFF,0xFE,0x3C, ... ,0x00 // The data array in this example is shortened
         };
    //--- Saving and applying the template
       if(FileSave("my_template.tpl",my_template))
         {
          Print("Custom template saved in \\MQL5\\Files");
          if(ChartApplyTemplate(0,"\\Files\\my_template.tpl"))
             Print("Custom template applied to the current chart");
          else
             Print("Failed to apply custom template");
         }
       else
          Print("Failed to save custom template");
      }

  26. MetaEditor: Added an option for converting strings between ASCII, HEX and Base64 formats. Select a line in the source code and click the desired command in the Edit—Convert menu:




  27. MetaEditor: Fixed case-insensitive search in files.
  28. MetaEditor: Fixed a debugger error that could occur when calculating expressions similar to x.y[0][1].z.
  29. MetaEditor: Fixed code navigation using Forward and Back buttons.
  30. The user interface is now also available in Dutch.
  31. Updated documentation.


The update will be available through the LiveUpdate system.


 

Very interesting article was published today - 

----------------‌

How to trade on an external cryptocurrency exchange via MetaTrader 5 

Not so long ago, the MQL5 language developers have introduced the updated functionality featuring the ability to develop custom symbols and charts. The broad traders' community has not yet had time to appreciate the power of this innovation, but even an easy and unobtrusive brainstorm shows an enormous potential hidden in the custom symbols. Together with other MQL tools, they allow you to implement many of the most daring and interesting ideas.

From now on, MetaTrader 5 is not just a terminal that interacts with one DC. Instead, it is a self-sufficient analytical platform able to connect to various exchanges via the API, as well as visualize price movements and trade flows. A small set of new features turns the terminal into an open system rather than a toolbox containing a limited number of trading tools. In my opinion, custom tools can also become powerful analytical capabilities.

Let's illustrate the new language features using the popular subject of cryptocurrencies as an example. I believe, it will further strengthen the community's interest in custom symbols. 

Who might benefit from the article:

  • cryptocurrency exchange traders;
  • investors familiar with MetaTrader 5 and portfolio investments;
  • freelance programmers who can now execute the customers' orders related to cryptocurrency trading in a simpler (and cheaper) way;
  • everyone who follows the new MetaTrader 5 and MQL5 language features.
 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Build 1730: Projects in MetaEditor and Synthetic financial instruments

MetaQuotes Software Corp., 2017.12.20 13:49

New MetaTrader 5 Build 1730: Projects in MetaEditor and Synthetic financial instruments

The MetaTrader 5 platform update will be released on December 21, 2017.

End of Support for Older Terminal Versions
Support for older versions of desktop and mobile terminals will end upon the release of the new platform version:
  • Client Terminal: versions below 730, November 23, 2012
  • Mobile Terminal for iPhone: versions below 1171, November 11, 2015
  • Mobile Terminal for Android: versions below 1334, August 5, 2016
Unsupported terminal builds will not be able to connect to new server versions. We strongly recommend that you update your terminals in advance.

MQL5 Storage Operation Protocol Changes
To support new shared projects, we have updated the protocol of operation with the MQL5 Storage. Therefore, you will need to perform a checkout of all data from the storage after the platform update. Data stored at the MQL5 Storage will not be lost or affected during the update.

Before updating the platform to the new version, we recommend that you perform the Commit operation to send all local changes to the MQL5 Storage.

The update will feature the following changes:

  1. Full-featured projects are now available in MetaEditor. The program development process has become more convenient.

    Now the main MQ5 program file does not appear as the project. The project is a separate "MQPROJ" file, which stores program settings, compilation parameters and information about all used files. Main project settings can be accessed from a separate dialog box, so there is no need to specify them in the source code via #property now.

    A separate tab in the Navigator is provided for work convenience within the project. All files, such as include, resource, header and other files are arranged into categories on this tab. All files are automatically added to the project navigator. For example, if you include a new MQH file, it will automatically appear in the "Dependencies" section of the navigator.

    Support for new projects has also been implemented in the updated MQL5 Storage online repository. Now, it has become much more convenient to develop large projects through collaboration with other members of the MQL5.community.

    New Shared Projects section is provided for group projects. A project created in this section is immediately sent to the storage: you can grant permissions to other users and start collaboration right away.




    When you compile a project in Shared Projects, an executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. You can easily launch the program on a chart without having to copy files manually.


    What's New in the MQL5 Storage Operation

    To implement support for new shared projects, we have modified the protocol of operation with the MQL5 Storage. Therefore, you will need to perform a checkout of all data from the storage after the platform update. Data stored at the MQL5 storage will not be lost or affected during the update.

    Before updating the platform to the new version, we recommend that you perform the Commit operation to send all local changes to the MQL5 Storage.

    The 'Checkout from Storage' command is unavailable now. Instead, the 'Activate MQL5 Storage' and 'Update from Storage' commands are used to receive data:

    • If you haven't used the MQL5 Storage in the current MetaEditor instance, click 'Activate MQL5 Storage' in the context menu of the Navigator window. All catalogs and files available in your storage will be uploaded to your local computer.
    • If you are already working with the storage, click 'Update files from Storage' in the context menu of a certain project or the root MQL5 element in the Navigator window to receive data from the storage.

    New Projects: Examples of Creation and Operation Details

    A new project entity has been added in MetaEditor. A project is an mqproj file that stores common program properties and information about all used files. Now, program properties can be conveniently managed from a separate MetaEditor dialog instead of manual modification of properties in the source code (using #property directives).

    If you have available code, you can easily test new projects by using the 'New Project from Source' command.




    In the directory where the selected file is located, a new project file with the same name and the mqproj extension will be created. The main program properties specified in the source code via #property will be automatically added to the project, including the name, copyright, version, link to the developer's site and program description.

    The set of program properties in the project file is given a higher priority, than properties specified in the program code. If properties are specified both in the project and in the source file, properties from the project will be used.




    Two new options for compiling MQL5 programs have been added to project properties:

    • Enable additional optimization: applications with the optimization disabled are compiled faster, but execute more slowly.
    • Check floating point dividers: applications with the check disabled work a little faster, because the zero divide error is not checked during code execution.

    To work with projects, use a separate Project tab in the Navigator window. All files used in a project are displayed on this tab in a convenient form. When a project is generated from a source file, all used include files (specified using the #include directory in the main MQ5 file and in its include files) are automatically added to the Dependencies section.

    When a new include file is added to the source code, it also appears in the project Navigator. Used header files are added to the Headers section; images, sounds and other MQL5 programs used in the project as resource are added to the Resources section. MQ5 files with the source code are displayed in the Sources section. In the 'Settings and files' section, you can add other files, such as set files for testing and chart templates.

    Use context menu commands to add existing files to a project or to delete files from it. Be careful when deleting files, since you can remove a file from the project (remove the binding) or completely delete it from the hard disk:




    Creation of a new project is as easy as the creation of a normal MQL5 program. Click 'New Project', select the type of new program and specify properties (such as name, event handlers, etc) in the MQL5 Wizard.

    To obtain an executable EX5 file, you can open the project and press F7 (the compilation command) or open the main MQ5 file of the program and compile it.


    Shared Projects in MQL5 Storage: Operation Details

    Shared projects are managed from a separate Shared Projects section. If you have not connected the storage yet, execute the 'Activate MQL5 Storage' command from the context menu of the desired folder. MetaEditor will check if your storage contains any saved data and if there are any share projects available to you. All available data will be retrieved from the storage and uploaded to your computer (the checkout operation). Available group projects appear in the Shared Projects section. To retrieve the projects, execute "Checkout from Storage" in the context menu.

    To create a new group project, select the Shared Projects folder and click "New Project":




    Then complete standard MQL5 steps: set the type, name and properties of the desired program. For group projects, you should use clear and understandable names, so that other participants could easily find them. Only Latin letters and numbers without spaces can be used in project names.

    A created object is immediately added to the MQL5 Storage. Standard Library files used in the project are not added to the storage, and you can add them manually.

    To allow other participants to work with the project, open its properties. From here you can grant permissions to selected users by specifying their MQL5.community login, as well as set common parameters for the group work:

    • Private project
    • Free to join project
    • Join by request project




    When you compile a group project, the executable EX5 file is automatically copied to the local Experts, Indicators or Scripts directory depending on the program type. It allows you to instantly run the program in the terminal without having to copy it manually to the proper directory.


    Public Projects in MQL5 Storage: Participation in Development

    As mentioned above, each group project in MQL5 Storage has publicity settings: the project can be private or open to other users. Now, all projects you can freely join are displayed in the separate "Public Projects" tab.

    Everyone can find an exciting project and take part in its development. Simply click Join and receive the project from the storage.




    Each joined user gets read-only rights. Contact the project author to be able to submit your changes. To know his or her login, open the project properties via the context menu.

  2. Terminal: Now, the trading platform allows creating synthetic financial instruments, i.e. symbols based on one or more existing instruments. The user should set the formula for calculating quotes, after which the platform will generate ticks of the synthetic instrument in real time, and also will create its minute history.


    How It Works

    • You create a synthetic instrument and set the formula for price calculation.
    • The platform calculates ticks at a frequency of 10 times per second, provided that the price of at least one of the instruments used in the formula has changed.
    • The platform also calculates the history of one-minute bars (for the last two months) based on minute bars of instruments used in its formula. All new bars (current and subsequent ones) are built in real time based on the generated ticks of the synthetic instrument.

    For example, you can create an instrument showing the dollar index (USDX). It uses the below formula:

    50.14348112 * pow(ask(EURUSD),-0.576) * pow(USDJPY,0.136) * pow(ask(GBPUSD),-0.119) * pow(USDCAD,0.091) * pow(USDSEK,0.042) * pow(USDCHF,0.036)

    Note: the USDEUR and USDGBP pairs are used in the source dollar index formula. Since only reverse pairs are available in the platform, a negative power and Ask instead of Bid are used in the synthetic symbol formula.

    The platform will calculate in real time the price of the new instrument based on the quotes of the other six symbols provided by your broker. The price changes will be visualized in the Market Watch window and on the chart:




    Create a new custom symbol, open its specification and enter the formula:




    For convenience, the formula editor shows a list of possible options as you type the names of symbols and functions.

    Calculation of ticks and one-minute bars of a synthetic instrument starts when this instrument is added to the Market Watch. Also, all symbols required for the synthetic price calculation are automatically added to the Market Watch. An entry about the calculation start will be added to the platform journal: Synthetic Symbol USDX: processing started.
    • Calculation of a synthetic instrument stops after it is removed from the Market Watch.
    • Symbols that are currently used for calculating synthetic symbol prices cannot be hidden from the Market Watch.

    Real-Time Calculation of Quotes
    Every 100 ms (i.e. ten times per second) the prices of symbols used in calculation are checked. If at least one of them has changed, the price of the synthetic symbol is calculated and a new tick is generated. Calculation is performed in parallel in three threads for Bid, Ask and Last prices. For example, if the calculation formula is EURUSD*GBPUSD, the price of the synthetic symbol will be calculated as follows:

    • Bid = bid(EURUSD)*bid(GBPUSD)
    • Ask = ask(EURUSD)*ask(GBPUSD)
    • Last = last(EURUSD)*last(GBPUSD)

    The availability of changes is checked separately for each price. For example, if only the Bid price of a source instrument has changed, only the appropriate price of a synthetic instrument will be calculated.

    Creating a History of Minute Bars
    In addition to collecting ticks in real time, the platform creates a minute history of the synthetic instrument. It enables traders to view synthetic symbol charts similar to normal ones, as well as to conduct technical analysis using objects and indicators.

    When a trader adds a synthetic instrument to the Market Watch, the platform checks whether its calculated minute history exists. If it does not exist, the history for the last 60 days will be created, which includes about 50,000 bars. If a lower value is specified in the 'Max. bars in chart' parameter in platform settings, the appropriate restriction will apply.

    If some of bars within this period have already been create, the platform will additionally generate new bars. A deeper history is created if the user tries to view an older time period on the chart (by scrolling it back or accessing it from an MQL5 program).

    The history of one-minute bars of a synthetic instrument is calculated based one one-minute bars (not ticks) of instruments used in its formula. For example, to calculate the Open price of a 1-minute bar of a synthetic symbol, the platform uses the Open prices of symbols used in its formula. High, Low and Close prices are calculated in a similar way.

    If the required bar is not available for any of the instruments, the platform will use the Close price of the previous bar. For example, three instruments are used: EURUSD, USDJPY and GBPUSD. If in the calculation of a bar corresponding to 12:00 the required bar of USDJPY is not available, the following prices will be used for calculation:

    • Open: EURUSD Open 12:00, USDJPY Close 11:59, GBPUSD Open 12:00
    • High: EURUSD High 12:00, USDJPY Close 11:59, GBPUSD High 12:00
    • Low: EURUSD Low 12:00, USDJPY Close 11:59, GBPUSD Low 12:00
    • Close: EURUSD Close 12:00, USDJPY Close 11:59, GBPUSD Close 12:00

    If the minute bar is not available for all of the instruments used in the formula, the appropriate minute bar of the synthetic instrument will not be calculated.

    Drawing New Minute Bars
    All new bars (current and subsequent ones) of the synthetic instrument are created based on generated ticks. The price used for building the bars depends on the value of the Chart Mode parameter in the specification:





    What Operations Can Be Used in the Symbol Formula
    Price data and some properties of existing symbols provided by the broker can be used for calculating synthetic prices. Specify the following:

    • Symbol name — depending on the synthetic price to be calculated, the Bid, Ask or Last of the specified instrument will be used. For example, if EURUSD*GBPUSD is specified, Bid is calculated as bid(EURUSD)*bid(GBPUSD), and Ask = ask(EURUSD)*ask(GBPUSD).
    • bid(symbol name) — the bid price of the specified symbol will be forcedly used for calculating the Bid price of the synthetic instrument. This option is similar to the previous one (where the price type is not specified).
    • ask(symbol name) — the Ask price of the specified symbol will be used for calculating the Bid price of the synthetic instrument. Bid price of the specified instrument will be used for calculating Ask. The Last price of the specified symbol will be used for calculating Last. If ask(EURUSD)*GBPUSD is specified, the following calculation will be used:
      • Вid = ask(EURUSD)*bid(GBPUSD)
      • Ask = bid(EURUSD)*ask(GBPUSD)
      • Last = last(EURUSD)*last(GBPUSD)
    • last(symbol name) — the Last price of the specified symbol will be used in the calculation of all prices of the synthetic instrument (Bid, Ask and Last). If last(EURUSD)*GBPUSD is specified, the following calculation will be used:
      • Вid = last(EURUSD)*bid(GBPUSD)
      • Ask = last(EURUSD)*ask(GBPUSD)
      • Last = last(EURUSD)*last(GBPUSD)
    • volume(symbol name) — the tick volume of the specified instrument will be used in the formula. Make sure that volume information is provided by the broker for this symbol.
    • point(symbol name) — the minimum price change of the specified instrument will be used in calculations.
    • digits(symbol name) — the number of decimal places in the specified symbol price will be used in the formula.

    If a symbol has a complex name (contains hyphens, dots, etc.), it must be written in quotation marks. Example: "RTS-6.17".
    The following arithmetic operations can be used in the formula: addition (+), subtraction (-), multiplication (*), devision (/) and remainder of division (%). For example, EURUSD+GBPUSD means that the price is calculated as the sum of EURUSD and GBPUSD prices. Also you can use the unary minus to change the sign, for example: -10*EURUSD.

    Mind the calculation priority of arithmetic operations:

    • The operations of multiplication, division and remainder are performed first; then addition and subtraction operations are performed.
    • The operations are performed from left to right. If the formula uses several operations that have the same priority (for example, multiplication and division), the operation on the left will be performed first.
    • You can use brackets ( and ) to change the priority of operations. Operations in brackets have the highest priority in the calculation. The left-to-right principle also applies for them: operations in brackets on the left are calculated first.

    You can use constants in the formula:

    • Numerical (integer and float). Example: EURUSD*2+GBPUSD*0.7.
    • Symbol properties _Digits and _Point. They add to the formula appropriate properties of the custom symbol from the specification. _Digits means the number of decimal places in the instrument price; _Point means the smallest change in the symbol price.

    You can also use in the formula all mathematical functions supported in MQL5, except for MathSrand, MathRand and MathIsValidNumber: Only short names are used for all functions, such as fabs(), acos(), asin() etc.

  3. Terminal: A new option has been implemented, allowing to add quotes of custom instruments in real time. Now, it is possible to develop an MQL5 Expert Advisor that would be feeding quotes of the specified custom symbol. The CustomTicksAdd function is used for that.
    int  CustomTicksAdd(
       const string           symbol,       // Symbol name
       const MqlTick&         ticks[]       // The array with tick data that should be applied to the custom symbol
       );
    The CustomTicksAdd function allows feeding quotes as if these quotes were received from a broker's server. Data is sent to the Market Watch window instead of being directly written to the tick database. Then, the terminal saves ticks from the Market Watch to the database. If a large volume of data is passed in one call, the function behavior changes, in order to save resources. If more than 256 ticks are transmitted, data is divided into two parts. A larger part is recorded directly to the tick database (similar to CustomTicksReplace). The second part consisting of the last 128 ticks is sent to the Market Watch, from where the terminal saves the ticks to a database.

  4. MQL5: New online service MQL5 Cloud Protector has been added to provide additional protection for MQL5 programs. Protection is similar to the option used in the largest store of trading applications MetaTrader Market, where the EX5 product files submitted by sellers are additionally compiled to native code.

    Now, this type of protection is available to all platform users. To protect your files, execute the following command in MetaEditor: Tools—MQL5 Cloud Protector. The only difference of MQL5 Cloud Protector from the mechanism used in the Market, is that the file is not linked to the user's computer. Protected via MQL5 Cloud Protector files can be run on any computers similar to common EX5 files.
    MQL5 Cloud Protector is a secure service. Additional protection is only applied to a compiled file. The source code is not passed to the service. At the first step, a program is compiled to an EX5 file on the user's computer; after that the compiled file is sent over an encrypted channel to the service, where it is protected and returned to the user.



  5. Terminal: The Market Watch window now additionally features the High and Low prices. These columns are hidden by default. They can be enabled using the context menu:




    If a symbol chart is constructed using Bid prices (as per specification settings), Bid High and Bid Low prices are shown for this symbol. If a symbol chart is constructed using Last prices, Last High and Last Low prices are shown for this symbol.

    If Market Watch contains at least one symbol whose chart is drawn based on Last prices, the Last column is automatically enabled in addition to High/Low.

  6. Terminal: Now it is possible to edit the tick history of custom financial instruments. Click 'Symbols' in the Market Watch context menu, select a custom symbol and request the required data interval in the Ticks tab.

    • Double-tap to change the value.
    • Use the context menu to add or delete entries.
    • If you need to delete multiple bars/ticks at once, select them with the mouse, holding down Shift or Ctrl+Shift.




    For convenience, modified entries are highlighted as follows:

    • Green background indicates a modified entry
    • Gray background means a deleted entry
    • Yellow background shows an added entry

    To save the changes, click "Apply Changes" at the bottom of the window.

  7. Terminal: Added display of preliminary accounts in the Navigator tree.

    Traders can send a request to a broker to open a real account straight from desktop terminals. The user needs to fill in a simple request form with contact details. A special preliminary account is created for the trader after that. Then, the broker contacts the trader to formalize relations and turn the real account from the preliminary one.




  8. Terminal: Added display of time in millisecond in the Quotes window.





  9. Terminal: Scanning of available servers in the new account opening dialog has become faster.
  10. Terminal: Fixed display of the Trendline graphics object with the Ray Left and Ray Right options enabled.
  11. Terminal: Optimized operation with a large amount of internal emails (hundreds of thousands).
  12. Terminal: Optimized terminal operation with a large amount of trading instruments (50,000 or more).
  13. Terminal: Added optimization of the tick history of custom financial instruments executed after editing history.
  14. MQL5: New functions for working with custom financial instruments have been added.

    Function Action
    CustomSymbolCreate Create a custom symbol with the specified name in the specified group
    CustomSymbolDelete Delete a custom symbol with the specified name
    CustomSymbolSetInteger Set the integer type property value for a custom symbol
    CustomSymbolSetDouble Set the real type property value for a custom symbol
    CustomSymbolSetString Set the string type property value for a custom symbol
    CustomSymbolSetMarginRate Set the margin rates depending on the order type and direction for a custom symbol
    CustomSymbolSetSessionQuote Set the start and end time of the specified quotation session for the specified symbol and week day
    CustomSymbolSetSessionTrade Set the start and end time of the specified trading session for the specified symbol and week day
    CustomRatesDelete Delete all bars from the price history of the custom symbol in the specified time interval
    CustomRatesReplace Fully replace the price history of the custom symbol within the specified time interval with the data from the MqlRates type array
    CustomRatesUpdate Add missing bars to the custom symbol history and replace existing data with the ones from the MqlRates type array
    CustomTicksAdd Adds data from an array of the MqlTick type to the price history of a custom symbol. The custom symbol must be selected in the Market Watch window.
    CustomTicksDelete Delete all ticks from the price history of the custom symbol in the specified time interval
    CustomTicksReplace Fully replace the price history of the custom symbol within the specified time interval with the data from the MqlTick type array

  15. MQL5: Added Generic Data Collections to the Standard Library. They contain classes and interfaces for defining collections based on templates. The new strongly typed collections provide a greater application development convenience and high data handling performance.

    The library is placed to the Include\Generic folder of the terminal's working directory.

  16. MQL5: Added support for templates for the union data type.
  17. MQL5: The SYMBOL_VISIBLE trading instrument property has been added. Call of SymbolInfoInteger(symbol, SYMBOL_VISIBLE) returns false if the specified symbol is not visible in the Market Watch.
  18. MQL5: Added new CHARTEVENT_MOUSE_WHEEL property. The event is called when the mouse wheel is scrolled or pressed on the chart (if CHART_EVENT_MOUSE_WHEEL=true for the chart).
  19. MQL5: The following chart properties have been added:

    • CHART_EVENT_MOUSE_WHEEL — enabling/disabling generation of CHARTEVENT_MOUSE_WHEEL (mouse scroll and click event on the chart). Possible values: 0 and 1.
    • CHART_CROSSHAIR_TOOL — enable/disable the possibility to switch cursor to the Crosshair mode by a middle click. Possible values: 0 and 1.
    • CHART_CONTEXT_MENU — enable/disable the use of right click to display the context menu of the chart. Possible values: 0 and 1.

  20. MQL5: Now, drawing buffers with the DRAW_NONE style are not taken into account when calculating the indicator window scale.
  21. MQL5: Added the CHARTEVENT_CHART_CHANGE event generation when setting the CHART_SCALEFIX (fixed scale) property for the chart.
  22. MQL5: The ArraySwap function has been added, allowing to quickly swap the contents of dynamic arrays.
    bool  ArraySwap(
       void&  array1[],      // The first array
       void&  array2[]       // The second array
       );
    The function accepts dynamic arrays of the same type and the same dimensions. For multidimensional arrays, the number of elements in all dimensions except the first one should match.

  23. MQL5: Added the new property TERMINAL_RETRANSMISSION — percentage of resent network packets (re-transmits) in the TCP/IP protocol for all running applications and services on the given computer. Packet loss occurs even in the fastest and correctly configured networks. In this case, there is no confirmation of packet delivery between the recipient and the sender. Therefore, lost packets are resent.

    The terminal does not calculate this value. It is requested from the operating system once per minute. It is not an indication of the connection quality between a particular terminal and a trade server, since the percentage is calculated for the entire network activity, including system and background activity.

    The TERMINAL_RETRANSMISSION property is added to the ENUM_TERMINAL_INFO_DOUBLE enumeration, the TerminalInfoDouble function is used to obtain it.
  24. MQL5: Optimized working with trade history.
  25. Signals: Fixed indication of order filling type in case of forced closing of positions opened according to a Signal. The 'Stop if the account is lower than XXX USD' option is provided in signal copying options: if equity drops below a specified level, copying of trade signals is automatically terminated, all positions are closed. Earlier, an incorrect filling type could be set for position closing orders in case of forced closure. Now the terminal checks allowed filling types in symbol settings and indicates a proper option.
  26. Tester: The behavior of the HistoryOrderSelect function in the Strategy Tester now corresponds to the same function in the client terminal.
  27. Tester: The behavior of the CopyTicks and CopyTicksRange functions in the Strategy Tester now corresponds to the same functions in the client terminal.
  28. Tester: Optimized display of graphics objects during visual testing.
  29. Tester: Fixed display of testing results of exchange instruments (with the exchange risk management model). Now, the chart only shows the equity, while the balance and the deposit load are not shown. The trading status of such accounts is evaluated based on the equity level. The balance only shows the amount of money on the account and ignores the trader's assets and liabilities. Deposit load (margin/equity) is not displayed, because in the exchange calculation mode margin is equal to the current discounted value of the asset/liability, and it changes along with equity.
  30. MetaEditor: Added the ability to easily insert properties and resources to program code. For example, you can quickly add an included file to code. Use command "Insert—MQH as #incude", and select the desired include file. The #include directive with the proper path to the selected file will be inserted to program code.




    The same menu allows adding to program code files in the form of a binary or text array. Among others, you can transfer chart templates with Expert Advisors or indicators: insert your template in the program code as an array, and save it to disk then using the FileSave function. After that the template can be applied on the desired chart right from an Expert Advisor using the ChartApplyTemplate function.
    //+------------------------------------------------------------------+
    //| Script program start function                                    |
    //+------------------------------------------------------------------+
    void OnStart()
      {
    //--- Template file as a binary array
       unsigned char my_template[]=
         {
          0xFF,0xFE,0x3C, ... ,0x00 // The data array in this example is shortened
         };
    //--- Saving and applying the template
       if(FileSave("my_template.tpl",my_template))
         {
          Print("Custom template saved in \\MQL5\\Files");
          if(ChartApplyTemplate(0,"\\Files\\my_template.tpl"))
             Print("Custom template applied to the current chart");
          else
             Print("Failed to apply custom template");
         }
       else
          Print("Failed to save custom template");
      }

  31. MetaEditor: Added an option for converting strings between ASCII, HEX and Base64 formats. Select a line in the source code and click the desired command in the Edit—Convert menu:




  32. MetaEditor: Fixed case-insensitive search in files.
  33. MetaEditor: Fixed a debugger error that could occur when calculating expressions similar to x.y[0][1].z.
  34. MetaEditor: Fixed code navigation using Forward and Back buttons.
  35. The user interface is now also available in Dutch.
  36. Updated documentation.

The update will be available through the Live Update system.


 

Форум по трейдингу, автоматическим торговым системам и тестированию торговых стратегий

Обсудим совместные проекты в редакторе - зачем они и куда движутся

Renat Fatkhullin, 2017.12.28 16:51

I completely forgot - we are releasing a new communication system for communication in January.

This is an analogue of the Telegram, including channels and groups (public and private).

It will be possible to launch thematic groups, including paid ones.

For example, distribute the anallytical content by subscription. Great emphasis on data exchange from terminals. This will make it much faster and more convenient to exchange charts, profiles, settings, programs, etc.

 
Sergey Golubev:
Mr Sergey, don't you think this will create a lot of separation and isolation to ward free knowledge on the forum. Because now people will have to subscribe in order to gain knowledge !
 

Regarding MT5 its now robust and promising. I'm planing to migrate to MT5 as on next year, I quickly want to ask regarding "Synthetic formula and custom symbol", let say my broker does not provide the custom symbol I choose to create, can I open trades on those symbol and make profit / losses and will it be added/deducted to my balance?

 

Creating a custom news feed for MetaTrader 5 


MetaTrader 5 has many useful features that a trader would need, regardless of their trading style, including a possible access to a live news feed. It provides traders with invaluable context that may have some effect on the markets. The only limitation is the scope of the news provided. I believe, traders could benefit from having access to a more flexible news feed that allows the ability to not only choose the kind of news but also its source.