Forex



Go Back   Forex Trading > Downloads > Indicators - Metatrader 4
Forex Forum Register More recent 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
  #51 (permalink)  
Old 08-03-2007, 02:30 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Kalman Filtering

p-position
v-velocity
a-random, time-varying acceleration
T-is the time between step k and step k+1


The question which is addressed by the Kalman filter is this: Given our knowledge of the behavior of the system, and given our measurements, what is the best estimate of position and velocity?

MATLAB source:
==============================
function kalman(alpha, duration, dt)

% function kalman(alpha, duration, dt) - Kalman filter simulation
% alpha = forgetting factor (alpha >= 1)
% duration = length of simulation (seconds)
% dt = step size (seconds)
% Copyright 1998 Innovatia Software. All rights reserved.
% Innovatia Software

measnoise = 10; % position measurement noise (feet)
accelnoise = 0.5; % acceleration noise (feet/sec^2)

a = [1 dt; 0 1]; % transition matrix
c = [1 0]; % measurement matrix
x = [0; 0]; % initial state vector
xhat = x; % initial state estimate

Q = accelnoise^2 * [dt^4/4 dt^3/2; dt^3/2 dt^2]; % process noise covariance
P = Q; % initial estimation covariance
R = measnoise^2; % measurement error covariance

% set up the size of the innovations vector
Inn = zeros(size(R));

pos = []; % true position array
poshat = []; % estimated position array
posmeas = []; % measured position array

Counter = 0;
for t = 0 : dt: duration,
Counter = Counter + 1;
% Simulate the process
ProcessNoise = accelnoise * [(dt^2/2)*randn; dt*randn];
x = a * x + ProcessNoise;
% Simulate the measurement
MeasNoise = measnoise * randn;
z = c * x + MeasNoise;
% Innovation
Inn = z - c * xhat;
% Covariance of Innovation
s = c * P * c' + R;
% Gain matrix
K = a * P * c' * inv(s);
% State estimate
xhat = a * xhat + K * Inn;
% Covariance of prediction error
P = a * P * a' + Q - a * P * c' * inv(s) * c * P * a';
% Save some parameters in vectors for plotting later
pos = [pos; x(1)];
posmeas = [posmeas; z];
poshat = [poshat; xhat(1)];
end

% Plot the results
t = 0 : dt : duration;
t = t';
plot(t,pos,'r',t,poshat,'g',t,posmeas,'b');
grid;
xlabel('Time (sec)');
ylabel('Position (feet)');
title('Kalman Filter Performance');
Attached Images
File Type: gif kalman5.gif (1.6 KB, 1574 views)
File Type: gif kalmanplot.gif (12.2 KB, 1586 views)
Attached Files
File Type: pdf kalman.pdf (425.5 KB, 190 views)

Last edited by barnix; 08-03-2007 at 07:30 PM.
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
  #52 (permalink)  
Old 08-03-2007, 07:25 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Kalman Filtering indicator
Index of /Forex/BlackBoxes/Kalman
Attached Images
File Type: gif kalman1.gif (25.8 KB, 1530 views)
Attached Files
File Type: zip kalman.zip (24.1 KB, 270 views)

Last edited by barnix; 08-03-2007 at 09:17 PM.
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
  #53 (permalink)  
Old 08-03-2007, 09:36 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Kalman filter toolbox for Matlab
Example of Kalman filtering a particle moving in the plane at constant velocity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Here is a simple example. Consider a particle moving in the plane at constant velocity subject to random perturbations in its trajectory. The new position (x1, x2) is the old position plus the velocity (dx1, dx2) plus noise w.
[ x1(t) ] = [1 0 1 0] [ x1(t-1) ] + [ wx1 ]
[ x2(t) ] [0 1 0 1] [ x2(t-1) ] [ wx2 ]
[ dx1(t) ] [0 0 1 0] [ dx1(t-1) ] [ wdx1 ]
[ dx2(t) ] [0 0 0 1] [ dx2(t-1) ] [ wdx2 ]
We assume we only observe the position of the particle.
[ y1(t) ] = [1 0 0 0] [ x1(t) ] + [ vx1 ]
[ y2(t) ] [0 1 0 0] [ x2(t) ] [ vx2 ]
[ dx1(t) ]
[ dx2(t) ]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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
  #54 (permalink)  
Old 08-04-2007, 11:46 AM
Senior Member
 
Join Date: Mar 2007
Posts: 188
lodol2 is on a distinguished road
hi

hi

very intresting thing. can you post an example chart how you trade this. I read your explanation but not easy to get it. would be nice to sse some examples.

thx

lodol
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
  #55 (permalink)  
Old 08-06-2007, 08:10 PM
Junior Member
 
Join Date: Jun 2007
Posts: 9
lovesub69 is on a distinguished road
Tick indicator - request.

Hi,

Do somebody have indicator which count’s how many up- and down- ticks are in one bar.
Or maybe somebody can make it - I think it shouldn’t be hard. Formula could be //up-ticks/ - /down-ticks/ = x/ - and it would be nice to see it in histogram.

Thank You.
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
  #56 (permalink)  
Old 08-06-2007, 08:57 PM
iscuba11's Avatar
Senior Member
 
Join Date: May 2006
Location: Houston
Posts: 398
iscuba11 is on a distinguished road
Smile

Try below indicators
Attached Files
File Type: mq4 Tick_on_Chart Own Window .mq4 (2.6 KB, 290 views)
File Type: mq4 Tick_on_Chart.mq4 (2.5 KB, 243 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
  #57 (permalink)  
Old 08-07-2007, 12:08 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Sorry,
it is an experimental system.
The indicators is in experimental phase.
At the moment I can't trade with this sistem.
Regards


Quote:
Originally Posted by lodol2 View Post
hi

very intresting thing. can you post an example chart how you trade this. I read your explanation but not easy to get it. would be nice to sse some examples.

thx

lodol
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
  #58 (permalink)  
Old 08-07-2007, 12:14 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Fast Fourier Transformation library:
#_lib_FFT.mq4
Copy in -> experts\libraries

Fast Fourier Transformation indicators:
#_i_FFT_separate_Speed_WABSV2_buy.mq4
#_i_FFT_separate_Speed_WABSV2_sell.mq4
#_i_FFT_separate_Speed.mq4
#_i_FFT_separate.mq4
Copy in ->experts\indicators
Attached Images
File Type: gif kalman2.gif (21.4 KB, 1465 views)
Attached Files
File Type: mq4 #_lib_FFT.mq4 (27.9 KB, 257 views)
File Type: mq4 #_i_FFT_separate_Speed_WABSV2_buy.mq4 (2.6 KB, 238 views)
File Type: mq4 #_i_FFT_separate_Speed_WABSV2_sell.mq4 (2.6 KB, 229 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
  #59 (permalink)  
Old 08-07-2007, 12:18 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Fast Fourier Transformation indicators:
Attached Files
File Type: mq4 #_i_FFT_spectrum_Speed.mq4 (2.6 KB, 169 views)
File Type: mq4 #_i_FFT_spectrum.mq4 (2.5 KB, 170 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
  #60 (permalink)  
Old 08-07-2007, 12:54 PM
Senior Member
 
Join Date: Mar 2006
Posts: 1,069
barnix is on a distinguished road
Fast Fourier Transformation indicators:
#_i_FFT_separate_Speedometer_buy.mq4
#_i_FFT_separate_Speedometer_sell.mq4
Attached Images
File Type: gif kalman3.gif (22.2 KB, 1353 views)
Attached Files
File Type: mq4 #_i_FFT_separate_Speedometer_buy.mq4 (2.6 KB, 178 views)
File Type: mq4 #_i_FFT_separate_Speedometer_sell.mq4 (2.6 KB, 178 views)
File Type: mq4 Speedometer_v1_mod_v01.mq4 (2.5 KB, 186 views)

Last edited by barnix; 08-07-2007 at 12:56 PM.
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
Forex Tick indicator, forex tick trading, kalman, metatrader tick, metatrader tick chart, metatrader tick charts, metatrader tick indicator, mt4 tick chart, MT4 tick indicator, speed, speed indicator, speedometer, tick by tick indicator, tick chart, tick charts, tick indicator, tick indicator forex, tick indicator metatrader, tick indicator mt4, tick indicators, tick mq4, ticks indicator, Ticks.mq4, TICKSMOOTHER, Tick_on_chart


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
What's the best way to check if the tick is the first tick of the new bar? blooms Metatrader 4 2 10-31-2006 07:10 AM
Problem using Variables Tick-by-Tick unltdsoul Metatrader 4 2 07-04-2006 04:36 AM
Using tick data? 100% MQ? Willis11of12 Metatrader 4 5 03-28-2006 03:20 PM


All times are GMT. The time now is 12:05 AM.



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