This post was contributed by a guest author, and does not necessarily reflect the views of Richard or MovetheMarkets.com
As we covered in a previous post, QuoteTracker is a powerful charting tool. Paintbars allow you to put custom graphics on your charts and even fire alerts when certain conditions are met. It’s not designed to be a dedicated scanning tool like Trade Ideas, but it can be used to go through a watchlist of stocks that you have already created and look for setups that you define.
The particular setup I’m going to be focusing on here is the ubiquitous “Dummy” setup, and I’ll be using Richard’s Dummy paintbar rules. There’s a bit of work that goes into getting this going, but it should save time over repeatedly cycling through charts every 15-30 minutes visually scanning for a dummy setup.
Step 1. Create paintbars for your setup (Richard’s code is found here and a tutorial of setting up a paintbar is found here). I created one for longs and one for shorts, as Richard described. In the setup, choose what kind of alerts you want by clicking on the “Alert (on or off) Properties” button:
I chose only to highlight the row with yellow:
Step 2. Create the type of chart that your setup will use. For this example, I’ll use a 15-minute intraday candle chart. You want a chart that is as simple as possible, with only the data your paintbar needs:
I set up the paintbars like so:
This chart is going to be running only in the background, so size it as small as you like. Once your chart is set up with the paintbars and indicators, right click it and “Save Chart Template”. I saved mine as “Dummy Alert”.
Step 3. Now, you select the portfolio that you are going to use as your watchlist. I run a scan on Prophet.net that gives me stocks that gap up and down, and I watch them for dummy entries. Just manually stick your symbols in the portfolio list, until you’re at this point:
You then choose a handy function from the menu: Charts–>Show All Charts. It will say “Are you sure you want to do this?” and you say yes. Boom! A chart will be opened for each symbol in the portfolio. Right click one of them, and select “Load Chart Template”, and pick your saved template (mine’s called “Dummy Alert”, and is postage stamp sized). Then right click the chart and select “Sync Open Charts”. All of your open charts will resize and change type and indicators to match the one you chose. Now any time your paintbar alert is triggered, the row will light up in your portfolio since your little chart-minions are watching them for you. Just open more charts as you normally would and use the thumbtack thingy to link them to your portfolio, and place them on top of your little dummy charts. If you get an alert, click it and the linked chart will show you your chart with indicators and setups as normal, and your watcher charts will stay behind the scenes. You could also do this for more than one portfolio at a time, limited only by your datafeed. There’s even a “Close All Charts” function on the Charts menu if you make a mistake and want to start over without clicking X’s for 5 minutes.
There’s a lot of subtle things that will hit you at this point, depending on if you pop-up alerts, set a duplicate alert threshold, and if you get quotes for all portfolios or just the current one. Please post any findings or gotchas in the comments! One of them is that according to Richard’s formula based on the current bar, you will get an alert every time your chart moves on to a new candle if it makes an inside bar with the right prerequisites. As the next few ticks come in, it can invalidate your dummy setup, giving you frequent false alerts. I’d prefer to see a paintbar that only references bars that are [1] or more units back. This would give you only one alert per formed bar, and would keep you from trading from incomplete candles. The paintbar would still show up on the current bar, ahead of the bar you are tracking, so looking at past charts you’d have to remember that. Here’s an example paintbar code:
Long–
if (SMA(5)[1] > SMA(5)[2]) AND (SMA(5)[2] > SMA(5)[3]) AND (SMA(5)[1] >= (Bar Low[1] - (Bar Low[1] * 0.0015))) AND (SMA(5)[1] < Bar Close[1]) AND (Bar High[1]-Bar Low[1]) <= (Bar High[2]-Bar Low[2]) AND (Bar High[1]-Bar Low[1]) <= (Bar High[3]-Bar Low[3]) AND (Bar High[1]<=Bar High[2]) AND (Bar Low[1]>=Bar Low[2]) AND ((Bar High[1] - Bar Low[1]) <= (Bar High[1] * 0.01)) set color to Blue and stop
Short–
if (SMA(5)[1] < SMA(5)[2]) AND (SMA(5)[2] < SMA(5)[3]) AND (SMA(5)[1] <= (Bar High[1] + (Bar High[1] * 0.0015))) AND (SMA(5)[1] > Bar Close[1]) AND (Bar High[1]-Bar Low[1]) <= (Bar High[2]-Bar Low[2]) AND (Bar High[1]-Bar Low[1]) <= (Bar High[3]-Bar Low[3]) AND (Bar High[1]<=Bar High[2]) AND (Bar Low[1]>=Bar Low[2]) AND ((Bar High[1] - Bar Low[1]) <= (Bar High[1] * 0.01)) set color to Blue and stop
For some reason, the duplicate alert threshold isn’t working as I thought it would. I set mine to 15 minutes, which is the same as the period of my chart, so I shouldn’t see it more than once every 15 minutes, but I still get an alert on every tick. Not a big deal for me, as it just highlights my row, but if I was using sounds or pop-ups I’d be crazy by now. Well, crazier. There’s another subtle thing :-P If any of this isn’t clear, let me know and I’ll write up more about it, or if you can fix the alert threshold, post in comments!
This post was contributed by a guest author, and does not necessarily reflect the views of Richard or MovetheMarkets.com
February 5th, 2007 at 2:13 pm
Prospectus,
Thanks for the post. One quick question: how to run the charts on the background?
Thank you!
February 5th, 2007 at 3:36 pm
To fix the Threshold problem you could try to use the Bar Time variable so the alert will only occur after the majority of the bar is formed.
Andrew
February 5th, 2007 at 3:54 pm
@Pablo: Not sure what you mean exactly, but if you’re having trouble with the layering of your windows you can go to Menu–Preferences–Misc tab and scroll down in the box. There’s some “On top” and “not on top” that you need to mess with…
@Andrew: There’s a Bar Time variable? How does it work?
EDIT: Never mind, I found it: http://www.quotetracker.biz/QTHelp/paintbars.htm
Thanks for pointing that out!