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

Re: [EquisMetaStock Group] Coding request



PureBytes Links

Trading Reference Links

Hi John


Here's a tip for you that doesn't answer your question directly but should help you find your own answers.

An exponential moving average ALWAYS moves towards the price. This has several implications.

If the price is above the EMA then the EMA is moving upwards.
If the price is below the EMA then the EMA is moving downwards.
When there are two or more EMAs the shortest EMA will move fastest towards the price.
When the price crosses an EMA the direction of that EMA reverses.

These traits do not apply to other types of moving averages but do apply to Wilders(), also an exponential moving average.


Regards

Roy
 
----- Original Message ----- 
From: johnnic1948 
To: equismetastock@xxxxxxxxxxxxxxx 
Sent: Tuesday, November 07, 2006 1:11 PM
Subject: [EquisMetaStock Group] Coding request


Would someone please be kind enough to confirm that the following 
simple code does what I want it to do?

If the closing price crosses above the 30 week EMA or is already 
above the EMA, and the EMA has turned upwards, then.....

The code I have written is:

(Cross(C,Mov(C,30,E)) OR C > Mov(C,30,E)) 

AND
(Mov(C,30,E) > Ref(Mov(C,30,E),-1) 

AND
Ref(Mov(C,30,E),-1) > Ref(Mov(C,30,E),-2) 

AND
Ref(Mov(C,30,E),-2) < Ref(Mov(C,30,E),-3));

Even if it is correct, is there a more elegant way of achieving the 
same end?

Thanks

John



 

[Non-text portions of this message have been removed]



 
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/