question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What limits the number of candles returned by CopyRates()?

See original GitHub issue

I’m not sure this is an issue, but is seem like the CopyRates function is only able to receive 3086 candles. Since my terminal MaxBars are set to 512,000, I believe it is a broker issue.

  INFO: CopyRates: Symbol    :  EURUSD
  INFO: CopyRates: TimeFrame :  M5
  INFO: CopyRates: Requested :  10000 candles
  INFO: CopyRates: Received  :  3086 candles
  INFO: CopyRates: ErrorCode :  0

This is approximately (3086 candles * (1 hr/12 candles) * (1 day/24 hr) = 10 days of trading data. This also coincide with the chart scroll back.

Is there a way to see a priori, how much data is available on the chart, given a TF?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
KptKuckcommented, Dec 2, 2020

@eabase grafik MT5 !!!

1reaction
KptKuckcommented, Nov 29, 2020

I think I just have a really shitty broker. So I’ll close this for now.

MT5 Python Example Count is at 250000. no problem grafik

Read more comments on GitHub >

github_iconTop Results From Across the Web

CopyRates - Timeseries and Indicators Access
CopyRates. Gets history data of MqlRates structure of a specified symbol-period in specified quantity into the rates_array array. The elements ordering of ...
Read more >
How to get the IBands Indicator data on a sell trade
My strategy picked out close[8] which was at 1.69230 how can i find out on which candle in the m5 chart was at...
Read more >
learn mql5 tutorial basics - SIMPLE SPREAD FILTER - YouTube
Otherwise, if the close price for candle one is below the close price ... If the signal equals sell and positions total returns...
Read more >
CopyRates - Timeseries and Indicators Access
CopyRates. Gets history data of MqlRates structure of a specified symbol-period in specified quantity into the rates_array array. The elements ordering of ...
Read more >
Is there any function for testing Candle Bar closed in MQL5?
Use CopyRates() or SeriesInfoInteger(_Symbol,_Period,SERIES_LASTBAR_DATE) . static is a keyword in MQL4/5 with very specific properties. Many ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found