How to find out the prices of the last 5 bars?

 

Hi,

I hope I do not a double post.

I want to write the last weeks prices of a couple symbol into a file. So with

price = MarketInfo(symbol1, MODE_BID);

I can find out the current price. Thats good.

But how can I find out the prices of the last e.g. 5 bars? Note that I cannot use the predfined "Bid" array, as I want to find out the price of other symbols than the "current" Symbol (of the window the EA is running in)

Thanks for your help,

McM

 
mcmurphy120:

[...]

But how can I find out the prices of the last e.g. 5 bars? Note that I cannot use the predfined "Bid" array, as I want to find out the price of other symbols than the "current" Symbol (of the window the EA is running in)

The predefined variable 'Bid' is not an array. U can use one of the Timeseries access functions (iOpen(), iClose(), etc.).
 
gordon:
The predefined variable 'Bid' is not an array. U can use one of the Timeseries access functions (iOpen(), iClose(), etc.).

Thanks a lot!

Sorry for my double post I just wrote...

Reason: