For this indicator, I have assumed that the more market participants there are, the higher the volatility.
If the volatility is high, then the direction of the price is better.
During range phases, there are therefore logically fewer participants.
To highlight this point, I went to retrieve the information in trading units on 1Tick.
The indicator calculates the number of trades per minute and averages the last 95,000 units per minute.
If the number of transactions is lower than the average, we will see this type of graph in the red rectangle.
If the number of transactions is above the average, then the graph will be as in the blue rectangle.
We can see that the “Blue” phase is much more directional than the “Red” phase.
This indicator works only on 1Tick with 200 K of historical data.
I also provide this link to discuss this indicator with possible updates: https://www.prorealcode.com/topic/transaction-volume-indicator/
//
//=/===============/=//=/===============/=//=/ Nervosité
//
defparam drawonlastbaronly = true
//
//=/===============/=//=/===============/=//=/ Minute signal
//
//=/ signal chaque minutes
signal = 0
//=//
if openminute > openminute[1] then
signal = 1
endif
//=//
if signal[1] = 1 then
signal = 0
endif
//
//=/===============/=//=/===============/=//=/ Decompte de l'espace minute
//
//=/ Decompte
ho = 1
if signal = 0 then
ho = ho[1] + 1
endif
//=//
if ho < ho[1]-1 then
ha = ho[ho]
endif
//=//
if ha < ho then
ha = ho
endif
//
//=/===============/=//=/===============/=//=/ Moyenne des pics de transaction
//
//=/ Moyenne des transaction
MxT = average[95000](ha)
drawhline(MxT) coloured (R,G,B)
//
//=/===============/=//=/===============/=//=/ Coloration
//
if ha => Mxt then
R = 0
G = 153
B = 255
//=//
elsif ha < MxT then
R = 102
G = 102
B = 102
endif
//
//=/===============/=//=/===============/=//=/ Visuel
//
//=/ Rectangle
if ha => MxT then
drawrectangle(barindex[95000],MxT,barindex,0) coloured(0,153,255,100) bordercolor(0,0,0,0)
//=//
elsif ha < MxT then
drawrectangle(barindex[95000],MxT,barindex,0) coloured(199,19,19,100) bordercolor(0,0,0,0)
endif
//
//=/===============/=//=/===============/=//=/ end
//
return ha coloured (R,G,B) as "Transaction"