You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
On MT4: Unless the current chart is that specific symbol(s)/TF(s) referenced, you must handle 4066/4073 errors before accessing candle/indicator values. To avoid getting zero.
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26.4 2019.05.20
Same index for both symbols. You must check each symbol for its bar count. To avoid getting zero.
Do not assume an index on the current chart is the same as on other charts. Always use iBarShift.
could you please help me on this. I have wrote below to calculate previous candles:
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
int Countrd_bars=prev_calculated;
for (int i=rates_total-Countrd_bars-1;i>=0;i--)
{
is it correct?