The index is counting bullish and bearish candles over a specified period on a given symbol and timeframe. For each bullish candle, it counts +1 and computes the index by the sum of updays diveded by the total period multiplied by 100 (for normalization). So the index is in the range of 0 to 100.
Here is the code of the indicator:
#Param "LookBack",12 ' Number of lookback periods
If C > C Then
PsychIndex = Sum(UpDay,LookBack) / LookBack * 100
Status changed from New to In progress
Status changed from In progress to Fixed
Attachment PsychologyIndex.zip added