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.
Size:
Color:
By chance, did the article come with code in any language (MSFL, MT4, EL etc)?
Size:
Color:
Size:
Color:
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.
Size:
Color:
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.
Size:
Color:
QUOTE:
Finally the algorithm ends up with all price increments of 0,01 above the last close,
And when/where does one stop?
Size:
Color:
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.
Size:
Color:
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.
Size:
Color:
Thanks Eugene. I will try and convert the codes to WLD4 since I don't have the .Net version.
Size:
Color:
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.
Size:
Color:
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.
Size:
Color: