Hi
i got your id from kit api forum.
i saw discussion with MAG regarding 5 minutes candle formation.
could you please help me in that?
i'm working on banknifty
i have azure webjob which will continuously listen data from
private void OnTick(Tick TickData)
{
ProcessTick(TickData);
}
and inside ProcessTick i want to generate 5 minutes candle OHLC and there only i will check 5munites high cross my CPR value ot not if yes i will take trade.
private void ProcessTick(Tick tickData)
{
var candleTickData = new List();
var tickDataHis = new CandleTickData()
{
InstrumentID = tickData.InstrumentToken,
Close = tickData.LastPrice,
High = tickData.LastPrice,
Low = tickData.LastPrice,
Open = tickData.LastPrice,
TimeStamp = tickData.Timestamp.HasValue ? tickData.Timestamp.Value : DateTime.Now,
Volume = tickData.Volume
};
candleTickData.Add(tickDataHis);
// TODO:->Logic here to generate and process 5 min candle OHLC
}
thanks in advance.
October 2020