Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

A 3 line script that tells you how many bars are on your chart - script for MetaTrader 5

Views:
1931
Rating:
(2)
Published:
2025.02.12 18:56
Updated:
2025.02.19 09:51
rates_total.mq5 (0.98 KB) view
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

The following code is deceptively simple and straightforward.

And yet it is also quite useful, especially if you would like to know how many bars are on your chart.

This is always going to be equal to or less than any constraint you have specified through Tools/Options/Charts and Max Bars in Chart, of course, and dependent on the data either downloaded from your broker, or uploaded by you, using a custom symbol, for instance.

I use the built-in iBars function in this instance. All you do is drag the script onto the chart, and look in the experts tab of the Toolbox

You can also look at the top left corner of the chart window because I added a Comment line


Intrabar Volume Flow Intrabar Volume Flow

An indicator which visualizes how volume changes over time within each bar. It shows tick volume in a rolling histogram format.

Calendar-Based Backtesting: an Event-Driven Trading EA Calendar-Based Backtesting: an Event-Driven Trading EA

This Script & EA enables coders to backtest their news based strategies which use the MQL5 Calendar.

Print massive information (PrintXYZ) from the terminal Print massive information (PrintXYZ) from the terminal

PrintXYZ() library to print massive information from the terminal.

Collect Data (Date, Time and Close Price) Collect Data (Date, Time and Close Price)

A simple starting-point script to collect data and send to a CSV in oldest-newest ordering. In this example only the close price data is collected.