[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EquisMetaStock Group] Re: Zero Lag MACD Exploration



PureBytes Links

Trading Reference Links

Gladly Paul,

The theory:
In order to establish a normal value for something we need to look 
at its extreme low and high values over a period of time. It really 
doesn't matter what it is. In the case of rain we look at the Palmer 
Index, which is what Mark had asked about. Its another way of saying 
on average what value should we be seeing...are we above or below 
that. 50 is the norm.

The principle: 
Let's look at the indicator line by line using the following

{1}(Fml( "Zero Lag MACD" )
{2}-LLV(Fml( "Zero Lag MACD" ),48)) 
{3}/(HHV(Fml( "Zero Lag MACD" ),48)
{4}-LLV(Fml( "Zero Lag MACD" ),48)
{5}+.0000001)*100

Lets first look at line 3 and 4. Here we take the highest value over 
48 days and the lowest value over 48 days. This is now our range.

Lines 1 and 2 establish where we are today. It will tell us how far 
we are from the bottom. 

Next we need to establish some type of value that we can relate to 
in a percent. So in line 3 you will note a division sign which is 
used to divide our range into our present position. The resulting 
output would be in decimals.

In line 5 we do two very important things. We first add .0000001 to 
our range value. This is done to eliminate a division by zero error. 
We could have also used +prev-prev to do the same thing, again for 
the same reason. Finally we are going to multiply our result by 100. 
This gives us a scale that is from 0 to 100. 

Normalizing or indexing in this fashion is a great way to determine 
what an indicator is doing. There are problems with the method 
though that you should consider. One is the period of time. In our 
case we are only looking at 48 days worth of values. You really need 
to consider whether this is going to be an appropriate amount of 
time to establish a norm. A true statistician may feel that this is 
not enough time and may wish to increase the lookback period. 

Another problem with this form of normalizing is the range. We are 
basically range bound between 0 and 100. You will notice often times 
that the indicator flatlines at either the top or bottom. This is 
when you are range bound. Its important to consider what is 
happening at these points. If it happens often then it is possible 
that you are using a lookback that is too short. 

Another way of correcting the problem is to use a different scale. 
Instead of the 0 to 100 scale where 50 is your midpoint, you could 
use a bipolar scale. The midpoint of a bipolar scale is 0 with a 
positive and a negative deflection. The beauty of using this scale 
is that you now are using a +/- scale of 100. It will allow for a 
much wider scale.    


Hope this helps,

Preston
  

--- In equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
<paul_vicmar@xxx> wrote:
>
> Preston
> 
> Many thanks for your help and effort in this problem. However if 
you
> don´t mind I would like to ask about logic behind 
> (Fml( "Zero Lag MACD" )
> >  -LLV(Fml( "Zero Lag MACD" ),48)) 
> > /(HHV(Fml( "Zero Lag MACD" ),48)
> > -LLV(Fml( "Zero Lag MACD" ),48)
> > +.0000001)*100.
> Could you in English just explain what it means?
> Yours gratefully
> PAUL 
> 
> 
> 
> 
> --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> wrote:
> >
> > Paul,
> > 
> > That's great!
> > 
> > Okay, I had a chance to look at it with Metastock open and I 
think 
> > you will like this one better.
> > 
> > (Fml( "Zero Lag MACD" )
> >  -LLV(Fml( "Zero Lag MACD" ),48)) 
> > /(HHV(Fml( "Zero Lag MACD" ),48)
> > -LLV(Fml( "Zero Lag MACD" ),48)
> > +.0000001)*100
> > 
> > 
> > Basically a normalized Zero Lag MACD. As an indicator you can 
use 
> > the following with any indicator, just place your indicator 
where 
> > noted and remove the brackets.
> > 
> > {Normalized Indicator}
> > Ind:= {your indicator here};
> > Npds:=Input("periods to normalize",
> >  1,500,48);
> > Norm:=(Ind-LLV(Ind,Npds))
> >  /(HHV(Ind,Npds)-LLV(Ind,Npds)+.0000001)*100;
> > Norm
> > 
> > Enjoy,
> > 
> > Preston
> > 
> > --- In equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
> > <paul_vicmar@> wrote:
> > >
> > > Thanxs success.
> > > 
> > > PAUL
> > > 
> > > 
> > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> 
wrote:
> > > >
> > > > Try this:
> > > > 
> > > > (Fml( "Zero Lag MACD" ) -
> > > > Mov( Fml( "Zero Lag MACD"),9,EXPONENTIAL)/
> > > > Fml( "Zero Lag MACD" ) +
> > > >  Mov( Fml( "Zero Lag MACD"),9,EXPONENTIAL))* 100
> > > > 
> > > > If not I'm check it out later this pm.
> > > > 
> > > > Preston
> > > > 
> > > > 
> > > > --- In equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
> > > > <paul_vicmar@> wrote:
> > > > >
> > > > > Preston
> > > > > 
> > > > > Thanxs for the repsonse. Columm E is OK however Column F 
is 
> > still
> > > > > incorrect. 
> > > > > 
> > > > > 
> > > > > 
> > > > > 
> > > > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh <no_reply@> 
> > wrote:
> > > > > >
> > > > > > Paul,
> > > > > > 
> > > > > > I will be away from my computer until late afternoon so 
I 
> > can 
> > > > only 
> > > > > > give some glancing views right now. I do see one 
immediate 
> > > > problem.
> > > > > > 
> > > > > > Col E Prev MA
> > > > > > Ref Mov(Fml( "Zero Lag MACD" ),9,EXPONENTIAL),-1)
> > > > > > 
> > > > > > should be 
> > > > > > 
> > > > > > Col E Prev MA
> > > > > > Ref(Mov(Fml( "Zero Lag MACD" ),9,EXPONENTIAL),-1)
> > > > > > 
> > > > > > I also think column F should be changed to 
> > > > > > 
> > > > > > Col F %
> > > > > > ((Fml( "Zero Lag MACD" ) - Mov( Fml( "Zero Lag MACD"
> > > > > > ),9,EXPONENTIAL))/ ((Fml( "Zero Lag MACD" ) + Mov( Fml
> > ( "Zero Lag 
> > > > > > MACD"),9,EXPONENTIAL))* 100 
> > > > > > 
> > > > > > I don't have Metastock right now so that may not be 
correct. 
> > > > > > 
> > > > > > I'm not sure about the code not working. The original 
> > discussion 
> > > > was 
> > > > > > in January of 2007, so you could go back to 
> > > > > > http://www.purebytes.com/cgi-local/swish/swish-cgi.pl
> > > > > > and look at the original discussion about it. Part of 
the 
> > code 
> > > > given 
> > > > > > is Amibroker and won't work in Metastock.
> > > > > > 
> > > > > > hope this helps,
> > > > > > 
> > > > > > Preston
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > --- In equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
> > > > > > <paul_vicmar@> wrote:
> > > > > > >
> > > > > > > Preston
> > > > > > > 
> > > > > > > Thanxs for the heads up on the discussion of lag in 
moving 
> > > > > > averages. I
> > > > > > > had a read through.
> > > > > > > So I thought I would go ahead and see if I could not 
use 
> > the 
> > > > > > existing
> > > > > > > MACD exploration in Metastock and just substitute 
normal 
> > MACD 
> > > > with
> > > > > > > Zero lag MACD. And keep the trigger signal as a 9 day 
EMA, 
> > as it
> > > > > > > produces fewer whipsaws than for example the Zero lag 
MACD 
> > > > Trigger
> > > > > > > Signal. However there seems to be a problem.
> > > > > > > 
> > > > > > > Zero Lag MACD Exploration
> > > > > > > Col A Close
> > > > > > > CLOSE
> > > > > > > Col B Zero Lag MACD
> > > > > > > Fml( "Zero Lag MACD" )
> > > > > > > Col C Previous MACD
> > > > > > > Ref( Fml( "Zero Lag MACD" ),-1)
> > > > > > > Col D Mov Ave
> > > > > > > Mov( Fml( "Zero Lag MACD" ),9,EXPONENTIAL)
> > > > > > > Col E Prev MA
> > > > > > > Ref Mov(Fml( "Zero Lag MACD" ),9,EXPONENTIAL),-1)
> > > > > > > Col F %
> > > > > > > ((Fml( "Zero Lag MACD" ) - Mov( Fml( "Zero Lag MACD"
> > > > > > > ),9,EXPONENTIAL))/ Mov( Fml( "Zero Lag 
> > MACD" ),9,EXPONENTIAL)) 
> > > > * 
> > > > > > 100 
> > > > > > > Filter
> > > > > > > CROSS (Fml( "Zero Lag MACD" ),Mov( Fml( "Zero Lag 
> > > > > > MACD" ),9,EXPONENTIAL)
> > > > > > > Any advice to solve the problem would be helpful. 
> > > > > > > I also had a look at the JMA equivalent PMA, but I was 
> > unable 
> > > > to 
> > > > > > copy
> > > > > > > and paste the PMA into Metastock.
> > > > > > > http://trader.online.pl/MSZ/e-w-
Moving_Average_Phased.html
> > > > > > > I am using Metastock 6.52.
> > > > > > > 
> > > > > > > Yours
> > > > > > > PAUL
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh 
<no_reply@> 
> > > > wrote:
> > > > > > > >
> > > > > > > > Paul,
> > > > > > > > 
> > > > > > > > The original discussion was about lag in moving 
averages 
> > and 
> > > > > > occurred 
> > > > > > > > in 2001.
> > > > > > > > Go here 
> > > > > > > > http://www.purebytes.com/cgi-local/swish/swish-cgi.pl
> > > > > > > > and look under metastock and 2001 for all the 
> > discussions.
> > > > > > > > 
> > > > > > > > I'm not aware of the zerolag being part of the 
canned 
> > > > metastock 
> > > > > > > > package.
> > > > > > > > 
> > > > > > > > It's easy enough though to write it but you might 
want 
> > to 
> > > > > > consider 
> > > > > > > > using the smoothed version of a Jurik type MA that 
we 
> > came up 
> > > > > > with 
> > > > > > > > earlier this year. 
> > > > > > > > 
> > > > > > > > The mechanics of the exploration will be the same no 
> > matter 
> > > > > > whether 
> > > > > > > > you use an EMA, a Zerolag EMA, or a Jurik type EMA. 
Its 
> > just 
> > > > a 
> > > > > > matter 
> > > > > > > > of deciding which you want to use.
> > > > > > > > 
> > > > > > > > If you want to do a zerolag let me know and we'll 
> > proceed.
> > > > > > > > 
> > > > > > > > Preston
> > > > > > > > 
> > > > > > > > 
> > > > > > > > --- In equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
> > > > > > > > <paul_vicmar@> wrote:
> > > > > > > > >
> > > > > > > > > OK, so I have a page that provides a Zero Lag MACD 
> > > > exploration
> > > > > > > > > http://trader.online.pl/MSZ/e-ex-
> > > > Zero_Lag_EMA_Exploration.html 
> > > > > > > > > but the code for the indicator given is incorrect 
and 
> > comes 
> > > > up 
> > > > > > with 
> > > > > > > > an
> > > > > > > > > error message.
> > > > > > > > > 
> > > > > > > > > Indicator : DS_EMA_X_MP()
> > > > > > > > > 
> > > > > > > > > Formula : if ( Cross(mov(mov(mp(),4,e))4,e),mov(mov
(mp
> > > > (),8,e))
> > > > > > > > 8,e)),1,
> > > > > > > > >           if (Cross(mov(mov(mp(),8,e))8,e),mov(mov
(mp
> > > > (),4,e))
> > > > > > 4,e)),-
> > > > > > > > 1,
> > > > > > > > >           0))
> > > > > > > > > And whilst I understand your logic of using a MACD 
> > > > exploration 
> > > > > > and
> > > > > > > > > substituting normal MACD for Zero Lag MACD I don´t 
> > know if 
> > > > my
> > > > > > > > > understanding of Metastock formula is enough to 
> > achieve 
> > > > this. 
> > > > > > > > > I read somewhere on recent versions of Metastock
(9.1) 
> > that 
> > > > a 
> > > > > > zero 
> > > > > > > > lag
> > > > > > > > > MACD exploration comes as a standard exploration.
> > > > > > > > > 
> > > > > > > > > Yours
> > > > > > > > > 
> > > > > > > > > PAUL
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > --- In equismetastock@xxxxxxxxxxxxxxx, pumrysh 
> > <no_reply@> 
> > > > > > wrote:
> > > > > > > > > >
> > > > > > > > > > Paul,
> > > > > > > > > > 
> > > > > > > > > > Do you have a normal EMA crossover and MACD 
> > exploration 
> > > > that 
> > > > > > you 
> > > > > > > > like?
> > > > > > > > > > 
> > > > > > > > > > Preston
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > --- In 
equismetastock@xxxxxxxxxxxxxxx, "paul_vicmar" 
> > > > > > > > > > <paul_vicmar@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > I have been looking at Zero Lag EMA and MACD 
and 
> > have 
> > > > > > noticed 
> > > > > > > > how
> > > > > > > > > > > timely the signals are in respect to other MA 
> > systems.
> > > > > > > > > > > I have been trawling the net in all the usual 
> > sites to 
> > > > see 
> > > > > > if I 
> > > > > > > > > > could
> > > > > > > > > > > find a suitable Zero Lag MACD exploration or 
Zero 
> > Lag 
> > > > EMA 
> > > > > > > > Crossover
> > > > > > > > > > > Exploration. But without any success. 
> > > > > > > > > > > This is the formula I am using for Zero lag 
EMA 
> > > > > > > > > > > Period:= Input("What Period",1,250,10);
> > > > > > > > > > > EMA1:= Mov(CLOSE,Period,E);
> > > > > > > > > > > EMA2:= Mov(EMA1,Period,E);
> > > > > > > > > > > Difference:= EMA1 - EMA2;
> > > > > > > > > > > ZeroLagEMA:= EMA1 + Difference;
> > > > > > > > > > > ZeroLagEMA
> > > > > > > > > > > And this is the formula for Zero Lag MACD
> > > > > > > > > > > EMA1:= Mov(CLOSE,13,E);
> > > > > > > > > > > EMA2:= Mov(EMA1,13,E);
> > > > > > > > > > > Difference:= EMA1 - EMA2;
> > > > > > > > > > > ZeroLagEMA13:= EMA1 + Difference;
> > > > > > > > > > > EMA1:= Mov(CLOSE,21,E);
> > > > > > > > > > > EMA2:= Mov(EMA1,21,E);
> > > > > > > > > > > Difference:= EMA1 - EMA2;
> > > > > > > > > > > ZeroLagEMA21:= EMA1 + Difference;
> > > > > > > > > > > ZeroLagMACD:=ZeroLagEMA13 - 
> > ZeroLagEMA21;ZeroLagMACD
> > > > > > > > > > > Any help would be greatly appreciated.
> > > > > > > > > > > Thanxs
> > > > > > > > > > > PAUL
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>




 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/equismetastock/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:equismetastock-digest@xxxxxxxxxxxxxxx 
    mailto:equismetastock-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/