Simple bar spread indicator as reported by the OnCalculate data – indicator MetaTrader 5

Bar Spread
This is a very simple MQL5 code for an indicator to plot the values of the spread[] data (in points) as reported by the OnCalculate event handler. These are the same spread data values that would be returned when collecting MqlRates data via the CopyRates function. Simple bar spread indicator as reported by the OnCalculate … Read more

New Bar Event – library MetaTrader 5

New Bar Event - library for MetaTrader 5
Allows you to determine the occurrence of a new bar event in a multicurrency Expert Advisor. In a multicurrency Expert Advisor, the event of a new bar formation can occur at different times for different instruments. But since the EA always works on the chart of one instrument, it becomes necessary to correctly determine in … Read more

Check if there are any new bar – library MetaTrader 5

Check if there are any new bar - library for MetaTrader 5
1、There is only one class function without additional variables. Please declare class CCheck before use class CCheck   { public:    bool              isNewBar(const string symbol,const ENUM_TIMEFRAMES period);      }; 2、Program variables are used to store corresponding data, while historical bar variables need to be statically modified for data storage //— Static variables used to save history bar … Read more