The Range of the day, sometimes referred to as the “True Range” is divided into 100 equal segments. You can then determine a Closing Score for the close of the day by determining where on this range, 0 – 100, the closings occurred. The pine script code for that calculation is: CS100 = (((close-low) / (high-low) *100.
Anything above 70 indicates a strong close and positive trader sentiment. A close around 100 or very close to it, is so strong that it can actually indicate the end of a run, and thus has the potential to be a contrarian indicator.
Any close below 30 indicates a weak close and negative trader sentiment. Close’s, close to or at zero indicate very negative sentiment and just as a close at 100 can be counter intuitive a close at zero often indicates exhaustion within the traders of this equity, and you can see prices climb from this point forward about 50% of the time.
The negative close scores (less than 50) are inverted to produce the same length of the bars as the positive scores (greater than 50).
Inputs for this indicator, “UPPER CLOSING SCORE TRIGGER” and “LOWER CLOSING SCORE TRIGGER” allow for the user to determine where positive and negative signals are cutoff. I set them at 70 for the positive indicator and 30 for the negative indicator. Neutral numbers, those ranging between 31 and 69 do not provide enough certainty to help assist in your trading decisions.
I consider to be the second most important feedback from the markets that we, as traders have the opportunity to view, second only to price. For this reason the only columns that are drawn is when the is greater than the Average Daily ( ADV ). This is a very simple calculation (VxCNT = (V/VOLMA) and provides a factor that the Closing Score is multiplied by. Thus, each column drawn on the chart displays the Closing Score multiplied by a factor that is obtained by dividing the Mov Avg by todays . There is also an input to adjust this parameter as well and is titled “EMA Length To Calculate Lookback.”
If you want to liberalize the threshold at which is considered you can accomplish that in two ways. Change the length of the VOLMA in inputs and adjust the input titled “VOLTEST.” VOLTEST is currently set at (1) and this produces a simple test: is todays above the current Vol Mov Avg? Any number less than 1 such as 0.95 would allow you to consider volumes that are close to, but not above the current Vol Mov Avg .
The Closing Score is plotted as Columns with the longer bar behind it providing the added strength that you can infer from that Vol of that day.
Soon I hope we will be able to scan for stocks meeting specific conditions. Here is what I will be scanning for using this indicator. When you see several strong green bars as a stock’s prices is declining, you have a good candidate to watch closely to see a strong reversal.
Small boxes along the blue zero line indicates if any of the following three conditions have appeared. White boxes indicates Dojis, Red boxes indicates a close, very close to zero and a green box indicates the close was close to 100.
My programming skills are meager and my math is worse, so please don’t be shy if you see a problem or have a suggestion for improving any element of this indicator. I would love anyone else’s ideas on additional ways to extract more insight from market sentiment or getting into the trader's mind?