Great ideas, Steve. Coincidentally, the concept of sensitivity settings that would be user-settable occurred to me yesterday but your articulation of the idea is much more fully formed than mine. Bravo and best wishes on your journey of discovery! I look forward to hearing about whatever you find.
On a related note I had an idea for modifying the code for upThrusts and PseudoUpThrusts in order to filter out the ones that don't really qualify as upThrusts. This idea was triggered by a particularly egregious transgressor this morning at 5:08 AM PT on a 2min 6e chart - a Red DownArrow condition 3 confirmed upThrust that was clearly out of place, coming at the end of a 15-period downtrend that had started to turn up in the last 5 bars. When I looked at the upThrust code I saw that, by gosh, this candle did indeed fit the criteria:
A ShortTermTrendSlope looks at the last 5 bars and because this particular candle was up over the last 5 bars it was deemed an UpThrust even though the last 15 bars were down (The current code defaults to 15-period MidTerm trends and 40-period LongTerm trends). To filter this kind of candle out I suggest changing the code to:
The following code could be copied from the Yellow Triangle Weakness signal to contirbute additional strength to any of the above. This would require upThrusts to have the highest high of the last 5 bars. (Alternatively, 5 could be changed to 3 or 2 to make it less strict).
&& High == Highest(high,5) 
The following user says Thank You to snowcloud for this post:
Ever since I began watching the VPA I have noticed that the Grey Square tests for supply in uptrends are very rare and I frankly haven't paid much attention to them while I looked at other symbols, particularly upThrusts. The White Square tests for supply have drawn more of my attention:
If I understand Williams correctly, these tests typically occur after an extended downtrend, sometimes fairly soon after the downtrend has reached its bottom and at other times during extended sideways action at lows. A successful test for lows (indicated by a Cyan Triangle) indicates that Smart Money has tested for supply before it has begun marking the price up. If these assumptions are correct, maybe changing the code to require a supply test to come after an extended downtrend might help create a more robust indication that an uptrend might be imminent. Maybe two kinds of supply tests at lows are called for - one close to the end of a downtrend and another after an extended sideways period.
The first would only occur when the trend color is RED.
rec supplyTestBar = (isTwoDaysLowVol && low < low && isUpCloseBar && shortTermTrendSlope < 0) && MidTermTrendSlope < 0 && LongTermTrendSlope < 0;
The second would require some new code to define sideways-at-lows action.
As I see it, here's what is needed to improve this indicator:
Problem: It's "noisy" ...too much of a good thing. Good signals aren't all over the chart. If they're "sensitive" (statistical concept) and "specific", they have better predictive value. Proposal: Reduce the signals to Tom Williams' "Main Signs of Strength" and "Main Signs of Weakness" [pp. 110-111] He advocates nine. (The current study has 27, many similar and redundant.) Also consider replacing situations where unconfirmed signals are displayed and then confirmed signals follow. Why not just display confirmed signals, under certain conditions?
Problem: There are definitions within the script that are questionable. For example, I think the code calls for a close to come off the low by 40% to qualify as a supply test. Proposal: Thresholds and how they're calculated warrants a re-examation to ensure it's in keeping with the principals behind a "test." VSA requires a test to be 50% or more off the close. Doing so might reduce the number of signals while improving specificity and positive predictive value.
Problem: The most important signals are lagging. If you look closely, you'll see frequent examples of the study correctly calling a turning point right after it occurred. Proposal: Find the cause for this. This is a fundamental challenge to writing any indicator ...but I think this study would be improved, in this regard. Signals must be anticipatory to be of value.
Problem: The study misses primary concepts. Earlier I mentioned the importance of signaling tests of supply. Your subsequent proposal sounds like a good starting point. That gray square is an important signal and should appear more than 5/3500 bars. Another critical issue - volume and range expansion on take-off. Key. (Similarly, concomitant volume/range contraction - on decline.) Proposal: Make sure that signals such as "Stopping Volume" or "Buying Climax" reflect these important conditions in their calculation - that is, the concomitant expansion/contraction of volume and range when price advances/declines. (Tom DeMark's Range Expansion Index (REI) is his focus on range expansion, e.g. I'm not aware of any indicator that combines VEI/REI, however. VSA visually follows this constantly.)
Were we to capitalize on all the hard work, good script, and valuable experience achieved by you and the other contributors ...and just sort of take 9-10 primary signs of strength and weakness ...agree on their calculations - with a close eye on ensuring the signal is not late - and then check for predictive value (a simple statistical test) ...this might become more valuable. A trader still has to understand the concepts and make decisions based upon market activity that cannot be interpreted by computer code.
Last edited by swimtrader; September 18th, 2010 at 09:16 AM.
The following user says Thank You to swimtrader for this post:
Great ideas as usual, Steve. Thank you! I intend to follow up on all of them one-at-a-time but probably won't get started until later this week or next. I've got another project that begins today and it's likely to occupy me for the next week or so.
When I get to it I will attack the Supply Tests first.
The reason for using a Threshold (Sensitivity) setting of "0" to indicate "Off" is to minimize the number of Inputs that must be displayed in the Properties box under Edit Studies and Strategies. Having both a Threshold (Sensitivity) setting and an On/Off setting would require two Inputs for each symbol. It's an efficiency thing.
Currently, I haven't written any new code for threshold sensitivity settings for any of the symbols and won't get to it until my time frees up sometime in the next few weeks. In a nutshell a given symbol's threshold setting would make it more or less sensitive to the criteria that triggers it. For example, a threshold setting for Supply Test would allow the user to set whether it could be triggered only when all three trends (LT, MT, ST) are down (very high threshold), when only the Long-term trend is down (fairly low threshold), or some other combination of trends.