Download MetaTrader 5
To add comments, please log in or register
Do you keep a blog? Place a link to MQL5.community there and make money!
Bert
28
Bert 2016.04.09 13:25 

Hi,

In the onCalculate() I have the compleet data set from the current chart with:

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[])

 and

   ArraySetAsSeries(ExtLowHighBuffer,false);
   ArraySetAsSeries(ExtHighLowBuffer,false);
   ArraySetAsSeries(ExtOpenBuffer,false);
   ArraySetAsSeries(ExtCloseBuffer,false);
   ArraySetAsSeries(BuyBuffer,false);
   ArraySetAsSeries(SellBuffer,false);
   ArraySetAsSeries(open,false);
   ArraySetAsSeries(high,false);
   ArraySetAsSeries(low,false);


That is working perfectly....

Say I'm in the Daily-chart then this is the data for the Daily. In this case I also want to work with the complete dataset from the eg. H1 or M5-charts. How can I get this data in ones into my Indicator?

Thanks.

whroeder1
13656
whroeder1 2016.04.09 14:39  
bertje: I also want to work with the complete dataset from the eg. H1 or M5-charts. How can I get this data in ones into my Indicator?

  1. Timeseries and Indicators Access - MQL4 Reference
  2. ArrayCopyRates - Array Functions - MQL4 Reference
Note that these are all time series. Don't set your buffers to false. Don't use the variables, use the Predefined Variables - MQL4 Reference
Bert
28
Bert 2016.04.11 07:48  

Thanks,

You said, don't set your buffers to false. Why? I set them to false because I needed this to invert the order of the rates...

In the manual I only can destilate that it just change the indexing.

Alain Verleyen
Moderator
28701
Alain Verleyen 2016.04.11 10:37  
bertje:

Thanks,

You said, don't set your buffers to false. Why? I set them to false because I needed this to invert the order of the rates...

In the manual I only can destilate that it just change the indexing.



You can set your buffers "to false". You have to pay attention to your indexing, don't mix "as series" and "not as series".

Usually it's simpler to use buffers as series ("to true"), but it depends of your needs.

Bert
28
Bert 2016.04.12 08:53  

Thanks....

Am I right that I can't use the Arrayfunctions as ArrayBSearch, ArrayMaximum, if I use buffers NOT as series ("to false")?

Alain Verleyen
Moderator
28701
Alain Verleyen 2016.04.12 09:15  
bertje:

Thanks....

Am I right that I can't use the Arrayfunctions as ArrayBSearch, ArrayMaximum, if I use buffers NOT as series ("to false")?


Of course.
Bert
28
Bert 2016.04.12 09:20  
Thanks!
/
To add comments, please log in or register