Friday, October 3, 2014

Active-Trader - Fib Lines Improvements

Welcome back Active Traders.

In response to a comment from my friend Franklin, I started to contemplate ways to improve the drawing and calculation of fib levels.  If you have not read my prior posts on the topic, go back and take a look because I have found fib lines to be the single most significant discovery in all my years of watching the markets.

My first idea was to write a script in Thinkorswim - In a language I believe they call it Thinkscript. But then it occurred to me there's a much simpler approach.  Simply configure the settings inside the Fib Extensions tool to draw not just the major (red) lines, but also to draw all the subsequent green and white lines.

To make that happen, I needed to calculate all the subsequent lines as as percentage of the original 100% move.  In other words, instead of drawing the 1 and 1.618 lines, then drawing the lower lines at 38.1 and 61.8, simply calculate the levels for the intermediate (tree) lines and just add those to the Fib Extensions tool in Thinkorswim.

To calculate the levels,  I wrote a recursive algorithm in C# which calculates the levels to an arbitrary level of depth, but stopped at 3,  I figured the levels would work as follows:

Fire Lines
0 - Tree Lines
1 - Snow Lines
2 - Minor Lines (no name for these that I am aware of).

Here is what the output looked like for the lines between 1.0 and 1.618:

Lowerline: 1.2361 Upperline: 1.3819 Level: 0
Lowerline: 1.0902 Upperline: 1.1459 Level: 1
Lowerline: 1.0345 Upperline: 1.0557 Level: 2
Lowerline: 1.1115 Upperline: 1.1246 Level: 2
Lowerline: 1.1804 Upperline: 1.2016 Level: 2
Lowerline: 1.2918 Upperline: 1.3262 Level: 1
Lowerline: 1.2574 Upperline: 1.2705 Level: 2
Lowerline: 1.3049 Upperline: 1.3131 Level: 2
Lowerline: 1.3475 Upperline: 1.3606 Level: 2
Lowerline: 1.4721 Upperline: 1.5278 Level: 1
Lowerline: 1.4164 Upperline: 1.4376 Level: 2
Lowerline: 1.4934 Upperline: 1.5065 Level: 2
Lowerline: 1.5623 Upperline: 1.5835 Level: 2

Then I went to enter all those into the Fib Extensions tool in Thinkorswim  I figure I could make the minor lines lighter lines with dashes, etc so the lines would not overwhelm the chart.  But I quickly learned that the Fib Extensions tool in Thinkorswim was limited to 15 arcs.  Sigh, so much for that plan.

In any event I came up with the following configuration which includes the red and green lines and calculate those automatically when you highlight wave 1.  Using those, I was able to draw the fib lines for IWM.  The red and green lines drew automatically, but I had to draw the snow lines manually due to the 15 arc limit in Thinkorswim.

In the end, it looks like the Thinkscript might be a better solution, but this is somewhat of an improvement.

Have a great weekend and week ahead.

3 comments:

  1. There you go! I am glad I encouraged this. Like yourself, I did not include the snow lines in my fib tool. Yes, 15 levels, sigh...

    I have the thinkscript, however it uses predefined waves 1 high and lows.

    I can't believe you used C# to write this haha, I just used my plain old TI-86. Good luck bud, thanks for keeping this blog alive.

    Wow, are we both programming professionals?

    ReplyDelete
  2. Hi Franklin. Thanks for reading and for the comment.

    Much more to come on the topic of voodoo, will share when ready. And yes, there will be code!

    Thanks and take care.

    ReplyDelete
  3. Good job Chris and Franklin, looking forwards for news in 2015!

    ReplyDelete