I've got a little window of free time at present so I'd like to re-visit the White Square Test for Supply indicator in an attempt to improve it. (After this puppy is better and if time allows I'd like to tackle the extremely elusive Gray Square Test for Supply in an UpTrend). The code for White Squares is currently:
This code requires a supplyTestBar to have volume lower than each of the previous 2 bars, a low lower than the previous bar, and a close above 50% of the spread. (The current code does seem to satisfy this >50% requirement. See below for excruciating detail*).
On p. 110 Williams writes "Testing is one of the best indications of strength. The prices will be marked down rapidly during the day (or any other time frame) but the price then recovers to close on the high of the day and will be accompanied by low volume."
It would seem that replacing "isUpCloseBar" with "isVeryHighCloseBar" would make supplyTestBar closer to Williams' definition.
Thoughts on this and other changes that might improve White Square Test for Supply?
The current code for a Cyan Circle noSupplyBar is:
This requires that a noSupplyBar be a narrow-spread down bar closing up with volume that is lower than the volumes of each of the two previous bars.
Thoughts for improvements? (As I am writing this I am looking at an example of a Cyan Circle noSupplyBar immediately preceding a White Square test for Supply which clearly is backwards).
Going on to the bar following a test, Williams writes on p. 35 "Any testing that does not respond immediately with higher prices, or certainly during the next day or so, can be considered an indication of weakness."
The current code for a Cyan Triangle successfulSupplyTestBar requires that the previous bar be a supplyTestBar and that the current bar be both an upBar and an UpCloseBar which seems to match Williams quite well.
Are there other requirements that would make this a stronger indicator of a potential upTrend?
*Excruciating detail: two lines of code determine isUpCloseBar. The way it's written all bars in which (spread / (close - low)) is less than 2 (i.e. above the 50% line) are UpCloseBars. For example, a bar with an OHLC of 12/64/5/35 will have a spread of 59 (64-5) and a median price of 34.5 ((59/2)+5). That means that a bar with a close of 34 is not an UpCloseBar and a bar with a close of 35 is. That seems to satisfy the requirement in your proposal above.
def x1 = if (high==low) then 2.0 else if (close == low) then 2.65 else (spread / (close - low));
def isUpCloseBar = (x1 < 2);
Last edited by snowcloud; September 28th, 2010 at 09:17 PM.
My window of free time is starting to close so I'm posting a new version of the VSA study with changes I had time to make over the past 10 days or so. I've described them below and as before I welcome comments about specific aspects of the study that work and other aspects that don't work. One thing I have noticed is that when volume is very low the study's indications are much less reliable than when volume is robust. I suppose that the study could account for low volume situations and adjust thresholds accordingly but for now simply being aware of the study's inconsistencies will have to do.
I have also noticed that when there is a dense cluster of symbols attached to a few adjacent bars that that very density provides a strong signal of impending movement. Many times I have seen lots of Green - usually a Circle followed by a Square and a combination of UpArrows - signaling the end of a downtrend and the beginning of an uptrend.
My window of free time is closing again so I won't be able to make any other changes to the study in the near future but am looking forward to reading comments from whomever wants to post.
Here are some notes on changes that have been made:
1. Changed text descriptions from, for example, "An UpBar indicates a return of Strength" to "Strength returning on UpBar". In most cases the first word of each description is Strength, Weakness, Bullish, or Bearish. This way it's easier to catch the gist of the message if it flashes on the screen only briefly.
2. In effortToMoveDownBar I changed "high < high" to "((high < high) OR (isWideSpreadBar && volume > 1.5 * sAvgVolume))" . This allows a bar with big volume and a wide spread to be considered an Effort-to-Fall bar even though its high might be higher than the previous bar's.
3. Added "&& MiddleTermTrendSlope > 0" to isUpThrustBar in order to filter out upThrusts on trends that are only short term.
4. Added Yellow Circle Stopping Volume at Highs for an above-the-candle signal for an UpThrust-like indication of trend reversal. I have noticed that Stopping Volume works extremely well at lows in a DownTrend to signal its possible end. I anticipate that the opposite criteria at highs will signal the end of Uptrends.
5. Changed the trend colors to the following in keeping with the ROYGBIV mapping of color to trend direction and strength.
light cyan bar - short term up, mid term down, long term down
light green - short term up, mid term up, long term down
green - short term up, mid term up, long term up
yellow bar - short term down, mid term up, long term up
orange bar - short term down, mid term down, long term up
red bar - short term down, mid term down, long term down
light gray bar - anything not matching the above.
6. Added new variables for trend length: shortTermLength = 5, midTermLength = 15, longTermLength = 40. This allows users to select any trend length in the Inputs dialog box of Edit Studies and Strategies.
7. Changed Color Bars default to true so that when loading the study it displays bars in color.
Last edited by snowcloud; October 2nd, 2010 at 06:20 PM.
The following 7 users say Thank You to snowcloud for this post:
Sorry it's taken me a bit to reply. Have been focused on understanding the Market's current trading range. I want to share one image. It's a screen-shot of algo-based software I lease (on the left) vs TradeGuider (the real VSA) on the right. (I own TradeGuider.)
The message is this: The high-end decision-support tools attempt to reduce noise ...provide visually simple signals. But even then, market dynamics create difficult challenges. That's what money management is for.
I won't have time to contribute to the .ts work, for the near-term ...but wanted to pop in and give you guys an example of the challenges associated with simplicity. Notwithstanding, I think that's the path that is most important.
Lastly, were you to ignore market timing and enter a position - anywhere ...any level ...just respecting the direction of the trend ...it will be your exit which defines your success. If you enter and the market promptly goes against you, you have to ask yourself - am I early or is this reversal? The ability to identify levels at which large volume traders last entered long or distributed (short) will draw the line in the sand. If you enter and the market goes your way, it will be money management issues that define your exit: e.g., is the next profit level one which provides a 3:1 reward to risk, do I have an edge greater than 100%, is my expected short-term ROI greater than 10% (or annualized greater than 40%) ...that sort of stuff.
So ...try and keep the visual signals to a minimum. There's a lot of other stuff to think about!
The following user says Thank You to swimtrader for this post:
Thanks very much for your input, Steve. Very interesting charts and good advice on money and trade management issues. One question - did the Algo package print the "Downtrend Signal Invalidated" text or did you add it? If the latter did the algo package provide other notice that the downtrend signal was invalidated?
Also, what are the numbers under and above the candles?
I labelled the Algo plot. Like most systems, there are requirements for signals to achieve confirmation. That short signal was not confirmed, and for now remains invalid. The numbers you see are TD Sequential.
Interestingly, shortly after I posted, TradeGuider signaled weakness. I've attached. The cyan up arrow is a trend indicator. The blue bar is a high-volume up bar. VSA tenets that weakness is seen on up bars. The "Indicator Information" is revealed by clicking the green square. In doing so, we are told to be cautious about seeing the trend indicator and blue bar as a start of trend up, as there is weakness in the market. Again, a signal ...and it is what follows that either confirms or invalidates the initial signal. Further, context counts. A sign of weakness in a weak background will be more significant.
That's my feeling, currently; there is a background of weakness. (Institutional investors have their eye on Friday and today's rally may be short-lived.) (Fade that comment!)
After that last comment, I thought it would be wrong to have an opinion. I try and avoid that as much as possible, in my trading!
I use Tom DeMark's systematic approach in decision-making. A TD Supply Line breakout is "unexpected" and if qualifying conditions are met, one can initiate a fresh long position, intra-bar ...i.e. without having to wait for the close to confirm.
So I ran the numbers.
This morning's breakout does not qualify. This adds objective support to TradeGuider's VSA warning. Moreover, this emphasizes the need to use objective measures to minimize subjective bias.