Download MetaTrader 5

Tick Indicator and EAs - page 5

To add comments, please log in or register
dav12028
127
dav12028  

my chart doesn't look like this; Am I missing something here?

barnix
1310
barnix  

You need the News indicator from

https://c.mql5.com/forextsd/forum/86/forextsd_calendar_v1.51.zip

dav12028:
my chart doesn't look like this; Am I missing something here?
dav12028
127
dav12028  

thank barnix for all your effort here, but never mind I see it's not getting me there. Now I'm having trouble with the news indicator it wont attach. Why is it that the speed indicators need to work together with your news one; can't we just have one that works as is? just trying to figure it out. Anyhow, thanks again.

Dave

Sergey Golubev
Moderator
99768
Sergey Golubev  

Several months ago I wanted to use scalping with asctrend system in elite section. I described Igorad the following:

- let's imagine that price is the vehicle driving by some crazy driver without speedometer inside the vehicle. So, the driver does not know the speed. Vehicle is stopping trying to change the direction, or moving too fast sometimes and coming back and so on. Is it possible to create Speedometer indicator for this vehicle?

So he created this indicator (attached). You may see everything with new ticks. I tried it but realized later that it should be a system with many indicators and one indicator is not enough.

Later on Kalenzo or Raff coded some good indicator to estimate the speed (in public thread somewhere) but not for scalping sorry.

Later on somebody created MACD_ticks (not exact name of the indicator, sorry) and so on. It was posted on some public thread as well.

Files:
barnix
1310
barnix  

Modified Speedometer

dav12028
127
dav12028  
newdigital:
Several months ago I wanted to use scalping with asctrend system in elite section. I described Igorad the following:

- let's imagine that price is the vehicle driving by some crazy driver without speedometer inside the vehicle. So, the driver does not know the speed. Vehicle is stopping trying to change the direction, or moving too fast sometimes and coming back and so on. Is it possible to create Speedometer indicator for this vehicle?

Could you explain how you would have considered using it as a system for scalping. The use I make of it is only as a filter, meaning, not to take the trade when to slow, or exit when the move against your profit is too fast.

Sergey Golubev
Moderator
99768
Sergey Golubev  
dav12028:
Could you explain how you would have considered using it as a system for scalping. The use I make of it is only as a filter, meaning, not to take the trade when to slow, or exit when the move against your profit is too fast.

I tried to use it and realized that we need some more indicators same as ma_speedometer, MACD_speedometer and so on. It should be trading system. One indicator is not enough.

barnix
1310
barnix  

Modified Waddah Attar Buy Sell Volume

Files:
speed19.gif 39 kb
barnix
1310
barnix  

Modified Waddah Attar Buy Sell Volume 2

Files:
speed27.gif 39 kb
barnix
1310
barnix  

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');

Files:
kalman5.gif 2 kb
kalman.pdf 426 kb
To add comments, please log in or register