Hope you are well, I have a quick question!
I am developing an indicator that can use Tick Replay to get the Delta values of bars.
I have already developed the Bid/Ask Delta.
I am having issues calculating the UpDownTick Delta.
I have tried all the combinations I could think of, closest I came to the actual numbers was this:
if (marketDataUpdate.MarketDataType == MarketDataType.Last)
{
if (marketDataUpdate.Price >= marketDataUpdate.Ask){
delta++;
lastPrice = 1;
}
else if(marketDataUpdate.Price <= marketDataUpdate.Bid){
delta--;
lastPrice = -1;
}
else
delta += lastPrice;
}
Losing my mind here. Would appreciate some guidance!
Thanks
Comment