Is there an indicator (oscillator?) that shows the amount of time that the price stayed at the last hit bid or ask per bar?
If the last trade was at the ask and it sits there for a period of time, add that to the Ask time accumulation. Do the same for bid.
Just a random thought.
Comment