Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 05-21-2007, 04:17 AM
Senior Member
 
Join Date: Mar 2006
Posts: 293
gody6000 is on a distinguished road
Talking Index of /Forex/BlackBoxes/Kalman (expert)

Notes for the Kalman filter with Auto Gain.

How I use this:

I am currently mostly using this tool in a manner similar to Bollinger bands,
using the trendline to determine the strength and direction of the trend,
and the exterior lines as guides for buing and selling.

Samples:
The number of bars you would consider to be enough to provide an estimate
of a coherence/stability on the time frame you are looking at. This depends on the nature
of your trading habits, and the sort of trends - or excursions from trends - you are
looking for.
I find the following useful:
60 for 1 minute bars (= 1 hour)
60 for 5 minute bars (= 5 hours)
24 for for the 15 minute, 30 minute, and 1 hour bars (=6, 12, and 24 hours, respectively)
30 or 60 or so for the 4 hour bars (= 5 or 10 trading days)
21 for the dailies (= 1 average working month)
13,26, or 52 on the weeklies ( one quarter, 1 half, and 1 year)
12 on the monthlies (much longer if you are working JPY crosses).
There is nothing magical about these numbers, they are just what I find convenient for my own
trading style. It is important to find ones suitable to your own, and then stick with them.
Changing the erratically is very bad for your pocket book!

DevLevel1 and DevLevel2:
These determine how many (one-sided) deviations from the trendline to put the edge lines.
1 and two work for me when I run this as an indicator; set these to 0 to suppress
their output.

Suppression_dB:
This works in conjunction with AutoGainOn boolean (true/false) variable. If AutoGainOn
is true, then this number is used as a starting point for estimating the actual suppression.
If AutoGainOn is false, then this value is used as the value for the suppression,
and not changed (i.e., it becomes the simple Kalman filter).
See the note at the end testing the validity of the autogain.

PredictBars 1 and 2:
Set these to non zero if you would like to see predictions PredictBars1 or
PredictBars2 in the future. If you have faith in your weather forcaster, you'll love these.
Otherwise, take them with a large grain of of salt (optimally placed between
your thumb and forefinger, and preceeded with a good shot of tequila...)

PrintCurrentState:
set this to true to print a line to the experts log after each update cycle
detailing the current suppression level in dB,
the value of the trend line at the last point, the speed of the trend in pips/bar,
and the return rate (speed/price) in annualized percent.

AutoGainOn:
Set this to true to turn the AutoGain on. If false, the value of Suppression_dB will
be fixed (and wyou will be running the standard Kalman filter).


********Note on AutoGain Validity*****
In some timeframes and some supplier's data, there is insufficient data for the
AutoGain to reach its optimal level. On data directly from Metatrader,
this is pretty much the case only on the monthlies, but in ay case it's a quick
check that is useful whenever you change time frames.

Make sure AutoGainOn is set to true, and so is PrintCurrentState. set the Suppression_dB
to any value (or leave it at zero).
Run the indicator, and look at the suppression level printed on the experts log. Call up the
indicator properties window, and insert this value into Suprression_dB,
and let the indicator run again. If it is more than half a dB or so away from the value
you set, you will need to find a better starting point. Those familiar with binary searching
can do this by hand in a few steps. For others - if the printed estimated gain is larger than
what you started with, increase it by about 10 dB and repeat. As long as the estimated
version is larger than what you put in, keep increasing the staring point by 10 or 20.
Eventually it should wind up being smaller than what you put in. Use the reported level
as the starting point, and repeat until what yo put in is pretty much what you get
as an estimate. Make a note of that value for the future, and use it as a starting point
if you want to run it later on the same time frame and same pair.

Eventually I'll get this replaced by a simple script to determine the value. In the meantime
you may find certain pathological points (on one minute data) on which the estimation of
the suppression collapses to some very large negative number. This shouldn't happen.
Let me know if it does. Occassionally a pair/timeframe will ehibit more than one
stability point (USDJPY, I think will do this). I use the smallerest reasonable value.

But on the whole the estimates are broadly accurate, and stable. You should expect them to
change slowly as the data changes.


work on your part for now. After you have initialized the indicator, bring up
its interface window from the

AutoGainOn:


// the indicators are currently set up for a 1 hour type chart, to produce
// the trend, 1 deviation on either side, 2 deviations on either side, and 2 deviations
// on either side calculated off the highs and lows.
//
// You will need to put GRFMatrixmath.mq4 in the "libraries" directory, and compile it.
// You will need to put GRFMatrix.mqh in the "include directory.
// This file goes in the "indicators directory, and will need to be compiled.
//
//Input variables:
// Samples sets the
// die off of the exponentially averaged deviations. Bigger numbers give
// smoother edges. 120 (5 days on the hourlies) works pretty well, but feel free to change it. It
// can be set to a non-integer number, but use numbers greater than 2.
//
// DevLevel (1 & 2) - deviation levels - By setting
// the deviation levels to zero, they don't get plotted. Otherwise they m
//
// Suppression_dB sets the level that noise will be suppressed. 0dB is usually appropriate
// 20dB gives the equivalent of long term averages, -20 gives a fast line. The only pairs
// I don't use this setting at 0 on are JPY crosses, in which I usuallly increase the suppression by 6
// dB or so.
//
// PredictBars - gives predictions for the center of trend in bars steps. For hourlies,
// I use 24 and 48. The information is printed on the "Experts" log. This gives
// an expected center and (IIRC) an 95% expected confidence interval. This will be fine tuned later.
//
// PrintCurrentState - if true, print the trend value and the speed of the trend (in pips/bar).
//
// Comments and questions - brobeck@ns.sympatico.ca . I really appreciate feed back. Thanks!
// CB
//

//Notes for the simple Kalman filter.
//
//How I use this:
// the indicators are currently set up for a 1 hour type chart, to produce
// the trend, 1 deviation on either side, 2 deviations on either side, and 2 deviations
// on either side calculated off the highs and lows.
//
//Input variables:
// Samples sets the
// die off of the exponentially averaged deviations. Bigger numbers give
// smoother edges. 120 (5 days on the hourlies) works pretty well, but feel free to change it. It
// can be set to a non-integer number, but use numbers greater than 2.
//
// DevLevel (1 & 2) - deviation levels - By setting
// the deviation levels to zero, they don't get plotted. Otherwise they m
//
// Suppression_dB sets the level that noise will be suppressed. 0dB is usually appropriate
// 20dB gives the equivalent of long term averages, -20 gives a fast line. The only pairs
// I don't use this setting at 0 on are JPY crosses, in which I usuallly increase the suppression by 6
// dB or so.
//
// PredictBars - gives predictions for the center of trend in bars steps. For hourlies,
// I use 24 and 48. The information is printed on the "Experts" log. This gives
// an expected center and (IIRC) an 95% expected confidence interval. This will be fine tuned later.
//
// PrintCurrentState - if true, print the trend value and the speed of the trend (in pips/bar).
//
// Comments and questions - brobeck@ns.sympatico.ca . I really appreciate feed back. Thanks!
// CB
//


http://www.gammarat.com/Forex/BlackBoxes/Kalman/
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 05-21-2007, 06:22 AM
Member
 
Join Date: Mar 2007
Posts: 23
Ted Noogent is an unknown quantity at this point
so.......does this thing do like martingale and stuff?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 05-21-2007, 10:10 AM
wibitiens's Avatar
Senior Member
 
Join Date: Dec 2006
Posts: 260
wibitiens is on a distinguished road
Hi Gody,

Thanks for sharing the indicator. By the way, how do you use this Kalman indicator? I don't really understand actually Thanks mate.

Cheers,
Attached Images
File Type: gif kalmanch.gif (11.8 KB, 414 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 05-21-2007, 10:13 AM
wibitiens's Avatar
Senior Member
 
Join Date: Dec 2006
Posts: 260
wibitiens is on a distinguished road
By the way, when I download the files, it doesn't seem to be in the right format, so I change it manually. Here are the files, hope you don't mind I post it here

Cheers,
Attached Files
File Type: rar Kalman.rar (17.3 KB, 149 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 08-20-2007, 05:32 AM
1Dave7's Avatar
Senior Member
 
Join Date: Aug 2007
Posts: 183
1Dave7 is on a distinguished road
Smile You need WinRAR to open this up!

I have attached it to this - Had to winzip it to attach it to this post. Unzip using winzip - extract the .exe to desktop or wherever and click on it to get the version of win that opens RAR files up.

Dave
<><<<
Attached Files
File Type: zip RAR Winzip Inside!.zip (1.11 MB, 66 views)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
kalman


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
forex club sentiment index kkeskar92 Suggestions for Trading Systems 6 06-19-2009 07:51 PM
Usd Index 006 General Discussion 18 02-11-2009 07:13 AM
The Volatility Index newdigital Documentation 0 10-04-2005 01:07 PM


All times are GMT. The time now is 04:10 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.