Attached is the complied version for both the multiple time frame and single time frame Kalman Filter. Just think of it as a different kind of exponential moving average. The settings are straight forward.
For Applied_Price use the following:
0 - Open Price
1 - Low Price
2 - High Price
3 - Close Price
I don't have any other types of pricing added in, and due to the nature of the filter I won't be adding any more in either. I would like to mention that the period is a little different than what you are used to in MAs. It still technically does the same thing as the period in a EMA, but due to the nature of the Kalman filter increasing the period doesn't have the same effect as it does on other moving averages. You can play around with it, but a personal suggestion is to keep the period at 20,50,100 or higher. The Kalman is setup for some generic settings right now, but if anyone has the ambition to mess with the matrices it uses for calculations, let me know and I will shoot the code your way.
Since, as you will notice, the normal Kalman can't really effectively be a "long term trend indicator" like a 200 SMA, you can use the multiple time frame version to run the Kalman on longer time frames and use that as a "trend indicator." Personally I prefer this since it creates less lag and simulates the "looking at longer chart to make sure signals match" theory. One idea is to plot a Daily or H4 Kalman on a 15 or 30 min chart, and use it to play off the long term trend for that day.
I just finished debugging the indicator today, and although highly useful, this version of the indicator isn't really my focus right now. I working on optimizing it for my specific needs which involves some heavy math work, but this version is setup to be a "middle man" in the smoothness vs response time battle that MAs always experience. Additionally since I just finished this today I do not have a strategy that is currently being applied to, and I do not have a golden road to riches just by using a smoother filter. Use the filter as you like, maybe if you toy around with it and get creative it just might find it's way into your next trading strategy.
200 EMA (Blue) vs 200 Kalman (Red)
http://i295.photobucket.com/albums/m...s200kalman.gif
15M chart with Daily Kalman
http://i295.photobucket.com/albums/m...rtd1kalman.gif
Different Kalman Periods
-Blue: 500 Kalman
-Light Blue: 200 Kalman
-Green: 100 Kalman
-Red: 50 Kalman
-Orange: 20 Kalman
http://i295.photobucket.com/albums/m...manperiods.gif
For Applied_Price use the following:
0 - Open Price
1 - Low Price
2 - High Price
3 - Close Price
I don't have any other types of pricing added in, and due to the nature of the filter I won't be adding any more in either. I would like to mention that the period is a little different than what you are used to in MAs. It still technically does the same thing as the period in a EMA, but due to the nature of the Kalman filter increasing the period doesn't have the same effect as it does on other moving averages. You can play around with it, but a personal suggestion is to keep the period at 20,50,100 or higher. The Kalman is setup for some generic settings right now, but if anyone has the ambition to mess with the matrices it uses for calculations, let me know and I will shoot the code your way.
Since, as you will notice, the normal Kalman can't really effectively be a "long term trend indicator" like a 200 SMA, you can use the multiple time frame version to run the Kalman on longer time frames and use that as a "trend indicator." Personally I prefer this since it creates less lag and simulates the "looking at longer chart to make sure signals match" theory. One idea is to plot a Daily or H4 Kalman on a 15 or 30 min chart, and use it to play off the long term trend for that day.
I just finished debugging the indicator today, and although highly useful, this version of the indicator isn't really my focus right now. I working on optimizing it for my specific needs which involves some heavy math work, but this version is setup to be a "middle man" in the smoothness vs response time battle that MAs always experience. Additionally since I just finished this today I do not have a strategy that is currently being applied to, and I do not have a golden road to riches just by using a smoother filter. Use the filter as you like, maybe if you toy around with it and get creative it just might find it's way into your next trading strategy.
200 EMA (Blue) vs 200 Kalman (Red)
http://i295.photobucket.com/albums/m...s200kalman.gif
15M chart with Daily Kalman
http://i295.photobucket.com/albums/m...rtd1kalman.gif
Different Kalman Periods
-Blue: 500 Kalman
-Light Blue: 200 Kalman
-Green: 100 Kalman
-Red: 50 Kalman
-Orange: 20 Kalman
http://i295.photobucket.com/albums/m...manperiods.gif
Attached File(s)
Kalman Filter.ex4
13 KB
|
970 downloads
Kalman Filter - MTF.ex4
3 KB
|
815 downloads
Kiss'n all the way to the top!