Can we get Ask/Bid price at a specific time (detailed to seconds) ?

 

Please help on building a function like: double BidAtTime (int time)

(where time is the number specified the time, detailed to seconds (example 2012 June 15, 14:28:19).

If you hesitate to help with the complete coding, then just guide me on the algorithm


Description of the idea:

BidAtTime (time) returns Bid price at the time specified.


If no quote at the timespecified, it returns Bid of the last quote

(Ex: No quote at 12:00:18 then return Bid at 12:00:15 when last quote came)


If time specified in market-close-time, returns 0;

 

Do you read any of the other posts on this Forum ?

Timestamps of the Open/High/Low/Close prices

 
sonthanhthuytu:

Please help on building a function like: double BidAtTime (int time)

(where time is the number specified the time, detailed to seconds (example 2012 June 15, 14:28:19).

If you hesitate to help with the complete coding, then just guide me on the algorithm

Description of the idea:

BidAtTime (time) returns Bid price at the time specified.

If no quote at the timespecified, it returns Bid of the last quote

(Ex: No quote at 12:00:18 then return Bid at 12:00:15 when last quote came)

If time specified in market-close-time, returns 0;

You asked a lot of Qs that can be answered by just Googling or experiment yourself. Use GetTickCount().