Use external weekly data for indicator

 

Hi, I'm a newbie to MQL5.

I can access the external weekly data in MT no problem. But i'm not sure how to put the data into an indicator.

There's new entry in the data every Tuesday, labelled with the date. What kind of algorithm Do I use to create an indicator that suits different time frames (monthly, weekly, daily)?

Do I use CopyTime() to get the bar dates first and loop through the data to find the closest entry? Or is there better way to do it?

Please help.

Much appreciated.

 
lamont:

Hi, I'm a newbie to MQL5.

I can access the external weekly data in MT no problem. But i'm not sure how to put the data into an indicator.

There's new entry in the data every Tuesday, labelled with the date. What kind of algorithm Do I use to create an indicator that suits different time frames (monthly, weekly, daily)?

Do I use CopyTime() to get the bar dates first and loop through the data to find the closest entry? Or is there better way to do it?

Please help.

Much appreciated.

Why don't you simply copy desired weekly data (desired week)?