Download MetaTrader 5
To add comments, please log in or register
Make screenshots in MetaTrader and manage them in the gallery!
CipherPips
393
CipherPips 2015.08.28 21:42 

I'm new to MQL4, although I have several years of classical programming experience.

I have a profile with multiple charts - due to 1M, 1W, 1D, 4H, 1H and 15M periodicity requirements of the data for the indicators on each chart.

My desire is to create one EA that will receive and/or process data from all 6 charts and create Alerts to certain conditions.

Where do I begin? 

whroeder1
13624
whroeder1 2015.08.29 01:07  

Don't use ArrayCopyRates which is broken in build 840 (service desk notified.)

You'll need to use the functions and not the predefined variables.

Easier is to use an range of magic numbers and just put it on multiple charts.

CipherPips
393
CipherPips 2015.08.29 05:02  
WHRoeder:

Don't use ArrayCopyRates which is broken in build 840 (service desk notified.)

You'll need to use the functions and not the predefined variables.

Easier is to use an range of magic numbers and just put it on multiple charts.

So if I'm understanding correctly, if I put an EA together, I can create 6 charts and set the parameters I need using the Chart Operators functions and process data in the EA referencing each of the six charts?

 Sounds too easy!

 What am I missing?

 Thank you for the heads up on the ArrayCopyRates function!

CipherPips! 

szgy74
266
szgy74 2015.08.29 08:58  
CipherPips:

I'm new to MQL4, although I have several years of classical programming experience.

I have a profile with multiple charts - due to 1M, 1W, 1D, 4H, 1H and 15M periodicity requirements of the data for the indicators on each chart.

My desire is to create one EA that will receive and/or process data from all 6 charts and create Alerts to certain conditions.

Where do I begin? 

 

  


You can retrieve the data from the charts directly (without having the charts opened), with different period parameters in iCustom or other function calls.

For example:


   double fMA = iMA(Symbol(), PERIOD_H1, 10, 0, MODE_EMA, PRICE_CLOSE, shift);
   double fMA = iMA(Symbol(), PERIOD_M15, 10, 0, MODE_EMA, PRICE_CLOSE, shift);
/
To add comments, please log in or register