PureBytes Links
Trading Reference Links
|
Hi there,
Has anyone ever experimented with the MESA sine wave? It appears that under
the right conditions it can be a pretty good indicator for trading.
Now, I'd like to get an indicator that gives a reading of how 'smooth' the
sine wave is; and thus how tradeable the signals are.
Here is a formula I've been working on - it kind of works but I'd like
something better. Drop it into an indicator and put it on your chart with a
default MESA sine wave using 25 periods.
{MESA validity indicator - V0.1}
theta0:=Atan(MESASineWave(25), MESALeadSine(25));
theta1:=Ref(theta0,-1);
theta2:=Cum(If(theta0>=0 AND theta0<=170 AND theta1<=360 AND
theta1>=190,360,0))+theta0;
theta3:= Mov(theta2,3,E)- Mov(theta2,5,E);
theta4:=BBandTop(theta3, 20, S,2)- BBandBot(theta3, 20, S,2);
theta4;
1. theta0 uses the atan function with the two parts of the MESA sine wave to
try to determine the phase angle.
2. theta1 is yesterday's value of theta0
3. theta2 because the angle of sin,cos etc goes from zero to 360 degrees, it
wraps around back to zero when it hits 360. This 'undoes' the wrapping and
adds on 360 degrees for each time it wraps. Now we have a phase angle that
keeps going up from zero, and it looks like a diagonal line
4. theta3 is like a MACD on the diagonal increasing theta2. It works out how
much the phase angle increases each day, and thus how much further through
the cycle the MESA sine wave is. A pure sine wave increases by exactly the
same amount each day. a noisy sine wave increases by a different amount each
day.
THUS the closer the mesa wave is to a pure sine wave the lower this 'noise'
is.
5. theta4 uses a Bollinger band width to try and normalise the data a bit. A
lower reading means a purer sine wave.
The Mesa time periods and Bollinger band settings are Metastock defaults.
The moving average uses fibonacci numbers (no special reason, I usually pick
these as there is a nice increasing scale of numbers to pick from)
As I said it's not particularly great but may help illustrate what I'm
talking about. There is a certain amount of delay in the system, probably
from the theta3 step. I think converting the MESA sine wave into a phase
angle could be improved too.
Cheers,
Craig.
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/zMEolB/TM
---------------------------------------------------------------------~->
To unsubscribe from this group, send an email to:
Metastockusers-unsubscribe@xxxxxxxxxxx
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
|