Ask and Bid Question

 

How do I obtain the Bid and Ask of a specific currency pair on a specific timeframe, so that I can calculate the spread.

 
Yellowbeard:
How do I obtain the Bid and Ask of a specific currency pair on a specific timeframe, so that I can calculate the spread.

Use

MarketInfo(symbol,timeFrame,MODE_ASK) for ask

MarketInfo(symbol,timeFrame,MODE_BID) for bid

and that way you can get ask and bid for any symbol. But be aware that it will return only current bid and ask - there is no way to get historical bid and ask values

________________

PS: regardless what time frame you use, bid and ask should always be the same, so you cn use 0 instead of timeFrame parameter of the function

 

Thanks! Current is just what I'm looking for.

Your right. No matter what timeframe your on, the Bid and Ask is always current.

Reason: