Bar and rate information utility that displays how many bars there are for any user-selected symbol in all timeframes and displays "replication rate" information availability for any bar - MetaTrader 5 script


This utility is not a transaction information utility. It only works for those using Bars (or iBars if they are nearly equal) and the CopyRates function for multiple time ranges. Testing was mostly done with the utility using the Basket Viewer and clicking on each symbol in its list to toggle the chart symbols and see what is displayed.
This utility allows the user to use the current chart symbol (default) or any symbol entered in their market watch and see the number of bars reported by the Bars function for each chart time frame, and displays the results of the CopyRates function for any valid Bar number entered by the user. By default, the utility displays replication rate information for the oldest bar in each time range.
This is a dual indicator https://www.mql5.com/en/code/26330 , to obtain its information about valid bars using the "SeriesInfoInteger" function. The SeriesInfoInteger function appears to be getting column information, but both report columns are available and CopyRates cannot get their information, at least from the current version of Terminal.
The image below shows a typical startup of this indicator, with many 4401 "Terminal data not available" errors appearing in the chart, followed shortly afterwards by fewer errors when the terminal initializes data. Scroll below to see instructions for numbering controls:

1) "Rates and Columns" - Select and drag to move the display to a different location on the chart.
2) This is the Bar Number input box. Enter a column number to see if replication rate information is available for that column.
3) "Symbol" - Click to switch the measure number to the "oldest" default, or the last entered measure number.
4) This is the symbol input box. Enter any symbol into the market quote to display that symbol.
5) Click the MN1 CopyRates message to turn writing logs on and off. When enabled, errors returned from Bars and CopyRates will be written to the log.
During my testing, Bars will report values greater than 100,000, but CopyRates never seems to get bar number data greater than 99,999. The image below shows the CopyRates 4401 error at bar 100,0000, and the success at bar 99,9999:

Attachment download
📎 bars_and_mqlrates_tf_status.mq5 (50.8 KB)
Source: MQL5 #26316
Bar and rate information utility that shows how many bars there are for any user-selected symbol in all timeframes and shows "copy rate" information availability for any bar - MetaTrader 5 script before using it
This page has been supplemented with structured instructions, focusing on the purpose of trading scripts, MT4/MT5 platform compatibility, testing procedures and risk control. Before downloading or deploying, it is recommended to first determine whether it is consistent with your own variety, cycle and account environment.
Suitable for who to use
- Users who want to quickly screen trading scripts and are willing to do simulation verification first.
- People who need to compare MT4/MT5 EAs, indicators, scripts or source code projects.
- Traders who wish to record backtests, parameters and risk boundaries before placing a trade.
Testing and risk control suggestions
- First verify the default parameters in the strategy tester or demo account, and then adjust the symbol, period, spread and trading period one by one.
- Scalping, grid, martin, and high-frequency strategies should focus on observing maximum drawdowns, consecutive losses, slippage, and trading frequency.
- It is not recommended to run any document directly on the real disk. At least observe the simulated disk performance for 2-4 weeks first.
FAQ
Can MT4 and MT5 be used interchangeably?
Usually cannot be used directly. EX4/MQ4 corresponds to MT4, EX5/MQ5 corresponds to MT5, and the source code needs to be compiled in the corresponding MetaEditor.
Is this resource guaranteed to be profitable?
cannot. EAs, indicators and scripts can only be used as trading tools, and the results depend on parameters, market environment, spreads, slippage and risk control.
What else can I continue to watch?
Forex EA download , foreign exchange indicator download , EA evaluation , MQL5 CodeBase .
English Search Notes
This page is also optimized for English search intent around bar and rate information utility that shows how many bars there are for any user-selected trading symbol in all timeframes and shows the availability of "copy rate" information for any bar - MetaTrader 5 script . Related search terms include: trading script, MT4 script, MT5 script. Test any Forex EA, Expert Advisor, MT4/MT5 indicator, script or MQL source code with historical data and a demo account before live trading.
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •