Scope question: Building an EA that processes data from multiple charts within a profile

Back to topics list To post a new topic, please log in or register
avatar
2
CipherPips 2015.08.28 23: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? 

 

  

avatar
12985
WHRoeder 2015.08.29 03: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.

avatar
2
CipherPips 2015.08.29 07: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! 

avatar
285
szgy74 2015.08.29 10: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);

Back to topics list  

To add comments, please log in or register