This is a trend indicator conceptualized by Tuschar Chande. It is a method of rating the trend by comparing the current day’s close to the close x days ago.
If today’s close is greater than close x days ago, score = 1
If today’s close is less than the close x+1 days ago, score = -1
Tuschar Chande suggested comparing the close to the closes from 11 to 20 days ago.
Therefore,
Trendscore = 10 day sum of the scores from days 11 to 20.
The trend score for this case will oscillate between +10 to -10.
(description found on internet).
//PRC_ChandesTrendScore | indicator
//06.02.18
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
SmoothingPeriod = 5
// --- end of settings
score = 0
for i = 11 to 20 do
if close>close[i] then
score=score+1
else
score=score-1
endif
next
CTSM = WeightedAverage[SmoothingPeriod](score)
RETURN CTSM