Documenting Advanced Scans with our new Comment Feature

One of the latest features added to the Advanced Scan Engine is the ability to add comments to your scans.  You can use either the '#' character or the '//' characters to add comments in your scan expression.  When the scan engine sees one of these markers it will ignore the rest of the text on the current line all the way to the end of that line.  Necessarily, the scan engine now allows you to break scan parameters across new lines and preserves white space so that scans don't have to be single long lines any more.

Comments are a great way to help you remember what that tricky scan is actually doing as well as making the scan more readable.

Some scans might be pretty obvious such as this one:



Screen shot 2010-08-30 at 11.03.38 AM

But others can get quite complex…just what does that last part do? (Bullish MACD Crossover & Breakaway Gap Up)


Screen shot 2010-08-30 at 11.03.12 AM

Wouldn't it be much easier to read if it looked more like this:


Screen shot 2010-08-30 at 11.07.02 AM

You can also quickly adjust your scans by adding or removing parameters by making them comments:


Screen shot 2010-08-30 at 11.08.46 AM

The next scan is the same as the previous one, but in this case we decide to remove the Bullish Engulfing parameter by adding a comment marker at the beginning of the line:


Screen shot 2010-08-30 at 11.12.24 AM

That is much easier and faster than removing the line completely and having to add it back again.

Be aware that if your scan expression goes across multiple lines you may need multiple comment markers to remove it from a scan:

If we break the Bullish 50/200 MA Cross string into two lines vs one big, long one, we need to add more comments to make sure we don't get unintended parameters in the scan:


Screen shot 2010-08-30 at 11.42.55 AM

This works:


Screen shot 2010-08-30 at 11.43.42 AM

Oops!  This might not give you what you intended as only half the term is commented:


Screen shot 2010-08-30 at 11.44.16 AM

Pay attention to long lines to distinguish between a long line that wraps vs a line that is broken across multiple lines.

And remember to watch those 'and' / 'or' clauses.  Sometime a comment in the wrong place will give you syntax errors like we have in this example.  Here the scan engine sees the 'and' at the end of the first line and expects another search clause, but in this case there is none and you'll get an error.


Screen shot 2010-08-30 at 11.36.07 AM

Note that in the scan results, your comments do not display:


Screen shot 2010-08-30 at 12.34.27 PM

NEW "INTRO" VIDEO ALMOST COMPLETE – NEED FEEDBACK

We're putting the finishing touches on the first in a series of videos that we plan on releasing soon that will help people use StockCharts.com effectively.  The first video is called "Getting Started with StockCharts.com" and is intended for new subscribers.  It covers things like logging in, setting up your account, and learning all the features of the SharpCharts workbench.  While old-time pros might not get much out of it, I think it is still something that everyone should review just in case.

Here's the (incomplete) video.  Please watch and let me know what you think in the comments section below.

Be sure to set the player for 720p HD.

We hope to have the completed video available in the next day or two and we hope to do more of these videos on other topics very soon.

- Chip

BoJ Action Fails to Halt JPY Appreciation

Before we get into this week, let’s quickly talk about Jackson Hole. Right now it seems that the Market is just a few steps ahead of policymakers as there is growing feeling that central banks and bankers lack the essential tools needed to control this recovery. The decisions from this small group over the past few months all appear to be knee-jerk reactions – never intelligent stewardship or…

Forex news