New MetaTrader 5 Platform build 1860: MQL5 functions for operations with bars and Strategy Tester improvements
Thank you for officially support these functions in MQL5 core.
In the next release, can you please add predefined time series variables for MQL5 such as: Open, High, Low, Time, etc..., so that we can use them in other event such as OnTimer, OnChartEvent, etc...
This will help in the below context.
Suppose that in OnCalculate(), I have an Update() function in which I use Open and Close.
- In Mql4, if I want to use Update() in OnTimer() or OnChartEvent(), a simple copy-paste will do the work.
- In Mql5, if I want to use Update() in OnTimer() or OnChartEvent(), I have to take care of the time series Open and Close first - mostly by using functions CopyOpen() and CopyClose(), then pass these time series variables to Update(). Which is a bit more complicated.
I believe this will benefit many developers.
I done a deposit but i can see my funds
Why post here? Your question (unclear as it is is not relevant to this topic.
Deposited funds where?
You CAN see your funds, so what is the problem?
Answer the question and I will move your post to a relevant topic.
@bashaash hi I am new can you guide me please
Forum on trading, automated trading systems and testing trading strategies
Want to start use trading robot
Sergey Golubev, 2020.01.23 12:54
2. How to host an automated trading robot on Metatrader (how to attach EA to the chart for trading)
3. Do you Autotrade?
4. Where Do I start from?
5. MetaTrader 5 Help - Trading Platform — User Manual
6. How to make a search on the forum
7. MetaTrader 5 Help - Open an Account
8. Find a Server by the Broker's Name:
When will the documentation be updated about iTime, iOpen, iHigh, iLow, iClose, iVolume, iBars, iBarShift, iLowest, iHighest, iRealVolume, iTickVolume, iSpread?
What is the problem and what needs to be updated ?
- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
New MetaTrader 5 Platform build 1860: MQL5 functions for operations with bars and Strategy Tester improvementsThe MetaTrader 5 platform update will be released on June 15, 2018.
The update will be available through the Live Update system.
- Terminal: The account opening dialog has been completely redesigned. Now, you may select a broker from the list and then choose the desired account type. This update has made the list of brokers more compact, since now it only displays company names instead of showing all available servers.
- MQL5: The speed of MQL5 applications has increased due to the additional source code optimization during compilation. Recompile your programs in the new MetaEditor version to make them run faster.
Unfortunately, new programs will not be compatible with previous terminal versions due to this additional optimization. Programs compiled in MetaEditor version 1860 and later cannot be launched in terminal versions below 1860. Programs compiled in earlier MetaEditor versions can run on new terminals.
- MQL5: New functions: iTime, iOpen, iHigh, iLow, iClose, iVolume, iBars, iBarShift, iLowest, iHighest, iRealVolume, iTickVolume, iSpread. These functions are similar to those used in MQL4. The functions provide for an easier transfer of code of trading applications to the fifth generation platform.
- Terminal: The history of deals now displays the values of Stop Loss and Take Profit. Stop Loss and Take Profit values for entry and reversal deals are set in accordance with the Stop Loss and Take Profit of orders, which initiated these deals. The Stop Loss and Take Profit values of appropriate positions as of the time of position closing are used for exit deals. The latter allows saving and showing information about Stop Loss and Take Profit of a position as of the moment of its closure. This information was not stored in earlier versions, since positions disappear after closure, while the history of positions in the terminal is generated based on deals.
- Terminal: The history of positions now displays the values of Stop Loss and Take Profit. Stop Loss and Take profit values of deals, which open and close appropriate positions, are specified for such positions.
- Terminal: Now, the current volume of pending orders is shown on the chart, instead of the initially requested volume.
- Terminal: The updated terminal features optimized and faster rendering of the Market Depth feature in the extended mode with the enabled spread display.
- Terminal: Processing of trade request execution results has been optimized. This optimizations leads to a much faster processing in some cases.
- Terminal: Fixed error in Trailing Stop operation, which could occasionally lead to sending of several Stop Loss modification requests for the same position.
- Terminal: Fixed setting of minimum and maximum volume, as well as volume step in custom symbol settings.
- Terminal: Fixed error, due to which the "Fix Scale" option could be ignored, when applying a template to a symbol chart.
- Terminal: Fixed occasional incorrect accumulation of tick history.
- MQL5: New TesterHideIndicators function has been added. The function sets the show/hide mode for indicators used in Expert Advisors. The function is intended for managing the visibility of used indicators only during testing. Set to true if you need to hide created indicators. Otherwise use false.
- MQL5: Added generation of the CHARTEVENT_CLICK event at a click on trade levels on the chart.
- MQL5: Fixed and optimized operation of CopyTicks functions.
- MQL5: Fixed value returned by the SymbolInfoDouble function for the SYMBOL_PROP_LIQUIDITY_RATE property.
- MQL5: Fixed copying of string arrays with overlapping memory.
- MQL5: Fixed allocation of a string array in the FileReadArray array.
- MQL5: Fixed errors in the MQL5 Standard Library.
- Tester: The system for working with the optimization cache has been updated. The cache stores data about previously calculated optimization passes. The strategy tester stores the data to enable resuming of optimization after a pause and to avoid recalculation of already calculated test passes.
- Tester: Added possibility to manually set the deposit currency and leverage for testing and optimization. In earlier versions, the currency was set in accordance with the connected account. Therefore, one had to switch to other accounts in order to change the currency. The leverage size could only be selected from a predefined list, now any value can be specified.
- Tester: Removed ban on the use of OpenCL in testing agents. Earlier, OpenCL devices were only allowed when testing on local agents. Now, agents are allowed to use all available OpenCL devices (such as processor, video card) when working in the local network and in the MQL5 Cloud Network.
- MetaEditor: Optimized and accelerated work with the MQL5 Storage.
- MetaEditor: Fixed resuming of debugging process after a pause in the MQH file.
- MetaEditor: Fixed source code highlighting in the editor.
- MetaEditor: Fixed navigation through search results.
- MetaEditor: Fixed mass text replace function. In some cases, only the first occurrence was replaced instead of all of them.
- Documentation has been updated.
Company logos are additionally shown in the list to make the search easier and more efficient. If the desired broker is not shown in the list, type the company name or the server address in the search box and click "Find your broker".
Descriptions of account types have been added to the dialog to help beginners choose the right account. Also, to align with the General Data Protection Regulation (GDPR), the updated dialog may contain links to brokers' agreements and data protection policies:
The possibilities for opening real accounts have been significantly expanded. The functionality for uploading ID and address confirmation documents, which was earlier presented in mobile terminals, is now available in the desktop version. Now, MiFID regulated brokers can request any required client identification data, including information on employment, income, trading experience, etc. The new functionality will help traders to open real accounts faster and easier, without unnecessary bureaucratic procedures.
Earlier, most of tasks performed through these functions could be implemented using Copy* functions. However, users had to implement their own functions in order to find the High/Low values on the chart and to search for bars based on their time. Now, these tasks can be easily executed using iHighest, iLowest and iBarShift functions.
Returns the Open time of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the Open price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the High price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the Low price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the Close price of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the tick volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the number of bars of a corresponding symbol and period, available in history.
Search bar by time. The function returns the index of the bar corresponding to the specified time.
Returns the index of the smallest value found on the corresponding chart (shift relative to the current bar).
Returns the index of the largest value found on the corresponding chart (shift relative to the current bar).
Returns the real volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the tick volume of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Returns the spread value of the bar (indicated by the 'shift' parameter) on the corresponding chart.
Changes in the optimization cache storage format
In earlier versions, optimization cache was stored as one XML file. All Expert Advisor optimization passes with the specified testing settings were added to this file. Therefore, the same file stored results of optimizations with different input parameters.
Now, the optimization cache is stored as separate binary files for each set of optimized parameters. Strategy Tester operations involving the optimization cache have become significantly faster due to the new format and smaller file size. The acceleration can be especially noticeable when you resume a paused optimization pass.
Viewing results of earlier optimizations
Now, the results of earlier optimizations can be viewed right in the Strategy Tester, so there is no need to analyze huge XML files using third-party software. Open the "Optimization results" tab, select an Expert Advisor and a file with the optimization cache:
The list contains all optimization cache files existing on the disk for the selected Expert Advisor. Optimization date, testing settings (symbol, timeframe, interval) and input parameters are shown for each file. You can additionally filter optimization results by the trade server, on which the results were obtained.
Recalculation of the optimization criterion on the fly
An optimization criterion is a certain variable parameter, the value of which determines the quality of a tested set of inputs. The higher the value of the optimization criterion, the better the testing result with the given set of parameters is considered to be.
Earlier, only one criterion selected before optimization start was calculated during optimization. Now, you can change the optimization criterion on the fly when viewing results, and the Strategy Tester will automatically recalculate all values.
Manual use of the optimization cache
In earlier versions, optimization cache was stored as an XML file, which could be opened and analyzed using third-party software. Now it is stored in closed binary files. To get data in XML format, export them using the context menu of the "Optimization Results" tab.
Please note that cross rates for converting profit and margin to the specified deposit currency must be available on the account, to ensure proper testing.