Using EMAs in a script to filter trends causes #4806 and #4022 - page 2

 
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
Documentation on MQL5: Timeseries and Indicators Access / Organizing Data Access
  • www.mql5.com
Organizing Data Access - Timeseries and Indicators Access - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
Alain Verleyen:
There is a script to download data right in the documentation.

I saw that in this script "Sleep" is used and this can't be used in an indicator. My scanner is an indicator and scans every 30 minutes a lot of charts for some patterns and key levels which I determine by zigzags.

I didn't see any chance to implement this script into my indicator and so I hoped for another solution which can be built in the indicator. But obviously there is no other possibility to load the history. Either I will download the history with this script manually or I try to implement a part of it into my indicator without using the Sleep command.

Thanks a lot for your help!

 
Marbo:

I saw that in this script "Sleep" is used and this can't be used in an indicator. My scanner is an indicator and scans every 30 minutes a lot of charts for some patterns and key levels which I determine by zigzags.

I didn't see any chance to implement this script into my indicator and so I hoped for another solution which can be built in the indicator. But obviously there is no other possibility to load the history. Either I will download the history with this script manually or I try to implement a part of it into my indicator without using the Sleep command.

Thanks a lot for your help!

One last question:

I wanted to download the history of all my selected M15 charts. I only need the data from 2021 but although I used 01.01.2021 as the start date, I see data from 2019 or even 2017 are downloaded.

I don't need so much data and therefore I would like the script only to download from the input-date and not from the first available date. Could you please show me what I have to modify?

The loops with SeriesInfoInteger() are a bit too confusing for me...