Chartmill Channel (Monest channels)
Author: dannyoh
Creation Date: 9/20/2012 2:54 AM
profile picture

dannyoh

#1
In TASC July 2012 issue, there was an article on Chartmill channels. I was wondering if anybody has tried coding it as an indicator in Wealth-Lab.
profile picture

Eugene

#2
By chance, did the article come with code in any language (MSFL, MT4, EL etc)?
profile picture

dannyoh

#3
No codes were provided but there were some explanations.
Pls see below:
http://www.chartmill.com/documentation.php?t=Monest%20Channels%20%28explanation%29
profile picture

Eugene

#4
Been there. I don't quite get the picture and don't feel like to be a pioneer. When authors consider coding it in any popular scripting language or even building an Excel worksheet, I may take a look.
profile picture

dannyoh

#5
I got this from the author:

- take the last close (you could also experiment with mean price, weighted average price or pivot price of the day and so on, but let's focus on the close here)
- the algorithm adds one cent to that price and checks going back (to the left, that is) how many periods are lower than this price it stores the price (i.e. last close+0,01) together with that length
- next add another 0,01 to that level and count the extra periods that you can go back without prices being higher, again the new price level (now last close+0,02) is stored together with the extra length of the channel
- go on, each time storing the price increment of 0,01 together with the extra channel length you get
Finally the algorithm ends up with all price increments of 0,01 above the last close, together with the extra length that's added to the channel
Now look at the biggest extra length you get anywhere, the according price level is where the upper Chartmill Channel line should be.
The lower channel line is constructed in a similar way by going down in 0,01 increments from the last close.
profile picture

Eugene

#6
QUOTE:
Finally the algorithm ends up with all price increments of 0,01 above the last close,

And when/where does one stop?
profile picture

dannyoh

#7
Here's what I got from the author:

We cut of the algorithm based on filter parameters. For instance, if we want small and long channels, we're generally not interested in extra length added on price levels x% or yATR higher than the last close.
Another thing we tried is taking the top 3 of length increases and constructed channel (resistance) lines on all of them.
profile picture

Eugene

#8
Another possible idea may be to simply stop after some arbitrary lookback reached (e.g. 1000 bars)?

I've tried to visualize the idea using yATR as the cutoff, didn't dedicate too much time to it. Below is my attempt.

P.S. No, I will not code it in WL4. ;)

CODE:
Please log in to see this code.
profile picture

dannyoh

#9
Thanks Eugene. I will try and convert the codes to WLD4 since I don't have the .Net version.
profile picture

DIY

#10
Hi dannyoh, how would you interpret the chart as drawn from Eugene's code? I can visualise some features(?) from the chart but I am sure there is a better explanation.
profile picture

Eugene

#11
I believe these Monest channels are drawn on their website using the value obtained on the last bar only. The channels drawn by this code are just trying to visualize past values.