Dear Rahul,
thanks again for your help here. i think the logic is very simple and clear. actually, i tried the following codes to capture the open price. Idea is that to set inital Opening price 0 and wait to capture the open price when the time condition is met.
However, i run into a problem where security.open returns the recent value, meaning the price of last trade of previous day, NOT THE OPEN PRICE of CURRENT day.
Is there a quick fix?
if (DateTime.Compare(processingDay, data.Time.Date ) == 0)
{
for(int i = 0; i < EquitySymbols.Length; i ++)
{
if (Decimal.Equals(OpeningPrice[i],0m) && Securities[EquitySymbols[i]].Open > 0m)
OpeningPrice[i] = Securities[EquitySymbols[i]].Open;
}
}
many thanks
H